cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

The ResourceConfig instance does not contain any root resource classes

I'm Neo4j Desktop on Windows and one of my dbs fails to start.

I've had this on both version Neo4j 3.4.5 & and upgraded to Neo4j 3.4.7. Upgrading to the latest version didn't resolve the issue.

I've ran this situation before and was lazy and just created a fresh database but now I want to learn how to resolve it. It usually happens when migrating version / installing the plugins. In my instance I've cleared out all the plugins from each version folder for this one database. It's a windows machine so I wouldn't think permissions would be an issue like I've see people post about back in the Neo4j 2.0 days. I'll paste in snippets from the logs from what I see and prevents the database from starting:

2018-09-04 16:49:56.493+0000 INFO  Server thread metrics has been registered successfully
2018-09-04 16:49:56.955+0000 ERROR The ResourceConfig instance does not contain any root resource classes.
2018-09-04 16:49:56.956+0000 WARN  unavailable 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:1359)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:180)
	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:799)
	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:795)
	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:795)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:790)
	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:509)
	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:339)
	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:605)
	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:207)
	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394)
	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:427)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:848)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
	at org.eclipse.jetty.server.Server.start(Server.java:419)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:386)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.neo4j.server.web.Jetty9WebServer.startJetty(Jetty9WebServer.java:324)
	at org.neo4j.server.web.Jetty9WebServer.start(Jetty9WebServer.java:154)
	at org.neo4j.server.AbstractNeoServer.startWebServer(AbstractNeoServer.java:321)
	at org.neo4j.server.AbstractNeoServer.access$700(AbstractNeoServer.java:102)
	at org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter.start(AbstractNeoServer.java:527)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:212)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
	at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntryPoint.java:22)
2018-09-04 16:49:56.983+0000 ERROR Failed to start Neo4j on 127.0.0.1:7474: org.neo4j.server.web.NeoServletContainer-cc7909f@974411a7==org.neo4j.server.web.NeoServletContainer,jsp=null,order=-1,inst=false
2018-09-04 16:49:56.994+0000 INFO  Stopping...
2018-09-04 16:49:57.373+0000 INFO  Stopped.
2018-09-04 16:49:57.374+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@5e557671' was successfully initialized, but failed to start. Please see the attached cause exception "The ResourceConfig instance does not contain any root resource classes.". Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@5e557671' was successfully initialized, but failed to start. Please see the attached cause exception "The ResourceConfig instance does not contain any root resource classes.".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@5e557671' was successfully initialized, but failed to start. Please see the attached cause exception "The ResourceConfig instance does not contain any root resource classes.".
	at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:220)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111)
	at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
	at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntryPoint.java:22)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter@5e557671' was successfully initialized, but failed to start. Please see the attached cause exception "The ResourceConfig instance does not contain any root resource classes.".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:212)
	... 3 more
Caused by: javax.servlet.ServletException: org.neo4j.server.web.NeoServletContainer-cc7909f@974411a7==org.neo4j.server.web.NeoServletContainer,jsp=null,order=-1,inst=false
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:691)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:427)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:848)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
	at org.eclipse.jetty.server.Server.start(Server.java:419)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:386)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.neo4j.server.web.Jetty9WebServer.startJetty(Jetty9WebServer.java:324)
	at org.neo4j.server.web.Jetty9WebServer.start(Jetty9WebServer.java:154)
	at org.neo4j.server.AbstractNeoServer.startWebServer(AbstractNeoServer.java:321)
	at org.neo4j.server.AbstractNeoServer.access$700(AbstractNeoServer.java:102)
	at org.neo4j.server.AbstractNeoServer$ServerComponentsLifecycleAdapter.start(AbstractNeoServer.java:527)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
	... 5 more
Caused by: 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:1359)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:180)
	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:799)
	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:795)
	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:795)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:790)
	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:509)
	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:339)
	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:605)
	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:207)
	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394)
	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:670)
	... 27 more
2018-09-04 16:49:57.375+0000 INFO  Neo4j Server shutdown initiated by request
3 REPLIES 3

Which version is this?
Can you show the contents of the plugins folder?
Did you copy anything into the lib folder?
Can you share the changes you made to the config?

It's with desktop v. 1.19

plugins folder is empty

Nothing added to lib

No changes to the config, it's just a local copy I run on my desktop.

I'm need to document more carefully how to replicate the problem. I want to say if you try and install the APOC plugin while it's running or upgrade neo versions while it's running, it'll install and prompt for reboot but the reboot will fail. Those are two scenarios I need to test to see if they create my problem.

What does work, is create a new instance, copy only the data folder into the new instance and that will start and run. So that's been my work around when this has happened to me. I should also try going the other direction, copy the bin/lib/etc... folders from a clean instance to see what happens there.

Please let us know if you can reproduce it and how.

I meant the Neo4j version too