The ResourceConfig instance does not contain any root resource classes

I have finished building a web service several times start up tomcat and get the above error even though my classes have @path annotations and my web.xml is properly setup for web services.

Here is a solution I found out, make sure to do a manual project build from Eclipse when you are done working on it. For some unknown reason even though the project is on auto build, the resource configurator did not pick up my new restful project until I did a manual build. The manual build is only required the first time you need to add the restful service to your resources, the servlet entry below is all you need to add to your web.xml to enable restful services to be configured by resource locator.

[cc lang=”xml”]
rest

com.sun.jersey.server.impl.container.servlet.ServletAdaptor

1


rest
/rs/*
[/cc]

3 Replies to “The ResourceConfig instance does not contain any root resource classes”

  1. Thanks for the suggestion. After I did what you suggested, things started to work. I think you have managed to pinpoint the real problem.

Leave a Reply

Your email address will not be published. Required fields are marked *