`

Jersey : The ResourceConfig instance does not contain any root resource classes

阅读更多
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
	at com.sun.jersey.server.impl.application.RootResourceUriRules.
<init>(RootResourceUriRules.java:99)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.
_initiate(WebApplicationImpl.java:1331)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700
(WebApplicationImpl.java:168)
	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f
(WebApplicationImpl.java:774)
	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f
(WebApplicationImpl.java:770)
	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate
(WebApplicationImpl.java:770)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate
(WebApplicationImpl.java:765)
	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate
(ServletContainer.java:489)
	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.
initiate(ServletContainer.java:319)
	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:605)
	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
	at com.sun.jersey.spi.container.servlet.ServletContainer.
init(ServletContainer.java:374)
	at com.sun.jersey.spi.container.servlet.ServletContainer.
init(ServletContainer.java:557)
	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
	at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3190)
	at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:404)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1309)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1601)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1610)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1610)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.
run(ContainerBase.java:1590)
	at java.lang.Thread.run(Unknown Source)


When you are working with Jersey REST web services, you would encounter the following exception. This is occurred either of two reasons.
1.com.sun.jersey.config.property.packages doesn’t exist in your web.xml.
2.com.sun.jersey.config.property.packages included a package path, but that is not included any jersey services.
If you check the above two reasons and resolve it, the below exception will be resolved.
3.or rename package and start then change back again
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics