The problem

As some background, I’m running the following:

  • Jersey 1.15
  • Apache Tomcat 7

The specific error that we’re going to fix is:

SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
SEVERE: Missing dependency for method public at parameter at index 0
SEVERE: Method, public, annotated with GET of resource, class, is not recognized as valid resource method.

If you’re running Tomcat like I am then you’ll see this in your catalina.out log file.

The fix

Your request object, that is the parameter to the method that’s mentioned in the error ( in the example), needs a valueOf method added. Something like this:


  public static YourRequest valueOf(String reqJson) {
    ObjectMapper mapper = new ObjectMapper();
    try {
      return mapper.readValue(reqJson, YourRequest.class);
    } catch (Exception e) {
      throw new RuntimeException(e);