Вопрос

I had an Endpoint.java as a resource in glassfish+netbeans. I deleted this file and made another resource called Users.

Glassfish starts with:

INFO:   EJB5181:Portable JNDI names for EJB Endpoint: [java:global/rest/Endpoint, java:global/rest/Endpoint!com.shintsha.rest.server.Endpoint]

and then

I get the error

 org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
[[FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by @Consumes and @Produces annotations at Java methods public java.lang.String com.shintsha.rest.server.Users.getUser(java.lang.String) and public java.lang.String com.shintsha.rest.server.Endpoint.getUser(java.lang.String) at matching regular expression /([^/]+?). These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source='org.glassfish.jersey.server.model.RuntimeResource@7b77c647']
    at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:410)

My ApplicationConfig.java simply extends the rs.application with no code.

Can I somehow delete this? I looked at asadmin but the jndi doesn't show.

Это было полезно?

Решение

Solution:

clean project in netbeans,close it and restart and redeploy the server.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top