users@jersey.java.net

Method is not recognized as valid Java method annotated with @HttpMethod

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Tue, 21 Apr 2009 09:55:01 -0400

Belated congratulations and thank you to the jersey dev team on jersey
1.0.3 release.

I have been changing quite a few things in my projects environment and
have somehow managed to break my server. When I start the server I get
the following error. Source code suggest that the dispatcher is null for
method but I am not sure what the dispatcher is.

Any idea what to look for?

[ERROR]INFO: Scanning for root resource and provider classes in the
packages:
[ERROR] com.test.server
[ERROR]Apr 21, 2009 8:20:43 AM
com.sun.jersey.api.core.PackagesResourceConfig init
[ERROR]INFO: Root resource classes found:
[ERROR] class com.test.server.UIServerRestInterface
[ERROR]Apr 21, 2009 8:20:43 AM
com.sun.jersey.api.core.PackagesResourceConfig init
[ERROR]INFO: Provider classes found:
[ERROR] class com.test.server.JAXBContextResolver
[ERROR]Apr 21, 2009 8:20:43 AM
com.sun.jersey.spi.spring.container.SpringComponentProviderFactory register
[ERROR]INFO: Registering Spring bean, UIServerRestInterface, of type
com.test.server.UIServerRestInterface as a root resource class
[ERROR]Apr 21, 2009 8:20:44 AM
com.sun.jersey.spi.spring.container.servlet.SpringServlet initiate
[ERROR]SEVERE: Exception occurred when intialization
[ERROR]com.sun.jersey.api.container.ContainerException: Method, public
javax.ws.rs.core.Response
com.test.server.UIServerRestInterface.updateRepositoryItem(java.lang.String,java.lang.String,java.io.InputStream,java.lang.String),
annotated with POST of resource, class
com.test.server.UIServerRestInterface, is not recognized as valid Java
method annotated with @HttpMethod.
[ERROR] at
com.sun.jersey.server.impl.model.method.ResourceHttpMethod.<init>(ResourceHttpMethod.java:92)
[ERROR] at
com.sun.jersey.server.impl.model.method.ResourceHttpMethod.<init>(ResourceHttpMethod.java:69)
[ERROR] at
com.sun.jersey.server.impl.model.ResourceClass.processSubResourceMethods(ResourceClass.java:258)
[ERROR] at
com.sun.jersey.server.impl.model.ResourceClass.<init>(ResourceClass.java:128)
[ERROR] at
com.sun.jersey.server.impl.application.WebApplicationImpl.newResourceClass(WebApplicationImpl.java:348)
[ERROR] at
com.sun.jersey.server.impl.application.WebApplicationImpl.getResourceClass(WebApplicationImpl.java:321)
[ERROR] at
com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:807)

-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com