문제

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