The ResourceConfig instance does not contain any root resource classes

The ResourceConfig instance does not contain any root resource classes

While working with Jetty and Jersey I got this exception which says below:

com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes

  • Solution: In my case I was my resource package name was not matching with initparam as below:

The ResourceConfig instance does not contain any root resource classes

  • To fix this issue I have to match package name:

The ResourceConfig instance does not contain any root resource classes

  • If your configuration is not same as me and you are using your is web application where you should have web.xml then add below:

For more information please visit Jetty documentation here

Leave a Reply

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