ciao!
in un servizio restful ho aggiunto un metodo, e da quel momento ottengo questo errore:
codice:
Grave: Exception while loading the app
Grave: Undeployment failed for context /wsb2b
Informazioni: file:/E:/Project/JAVA/WSB2B/build/web/WEB-INF/classes/_WSB2BPU logout successful
Grave: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild:
start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException:
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 com.cimoda.entities.CrClienti
com.cimoda.service.CrClientiFacadeREST.find(java.lang.Integer) and public java.util.List
com.cimoda.service.CrClientiFacadeREST.findCl(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@4f3f5b95']
i metodi incriminati sono questi:
codice:
@GET
@Path("{id}")
@Produces({"application/xml", "application/json"})
public CrClienti find(@PathParam("id") Integer id) {
return super.find(id);
}
@GET
@Path("{cl}")
@Produces({"application/xml", "application/json"})
@Override
public List<CrClienti> findCl(@PathParam("cl") String cl) {
return super.findCl(cl);
}
ma sinceramente non riesco a capire!