Search code examples
neo4jgraphaware

Neo4j Graphaware precompute error: database shuts down


I am trying the neo4j graphaware precompute functionality when I am encountering the following error:

2017-05-25 12:59:31.876+0000 ERROR [c.g.r.b.RuntimeKernelExtension] Could not start GraphAware Runtime because the database didn't get to a usable state within 5 minutes.
2017-05-25 12:59:31.879+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@16f1582c' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@16f1582c' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@16f1582c' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:230)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:68)
    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@16f1582c' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:443)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:202)
    ... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /var/lib/neo4j/data/databases/graph_test_full_test.db
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:199)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:130)
    at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:57)
    at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
    ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@6c038a54' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:443)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:195)
    ... 9 more
Caused by: java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor$EmptyMethodVisitor has interface org.springframework.asm.MethodVisitor as super class
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:138)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:115)
    at org.neo4j.collection.PrefetchingRawIterator.peek(PrefetchingRawIterator.java:50)
    at org.neo4j.collection.PrefetchingRawIterator.hasNext(PrefetchingRawIterator.java:36)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:89)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:80)
    at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:206)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
    ... 11 more

I have put the necessary jars in /plugin directory. Following are the jar files:

graphaware-reco-3.1.4.49.11.jar  graphaware-server-community-all-3.1.4.49.jar   my-reco.jar

I have also added the necessary configurations in neo4j.conf as mentioned in the documentation. I looked into the graphaware code.

A "Could not start GraphAware Runtime because the database..." message appears when database.isAvailable(5*60*1000) gives false output (in my case, instantly), which lead me to conclusion that my database is shutting down. I saw the logs to get the exact thing.

Here are the logs:

2017-05-25 12:59:30.879+0000 INFO  Attempting to instantiate as a singleton...
2017-05-25 12:59:30.879+0000 DEBUG Not a singleton.
2017-05-25 12:59:30.879+0000 INFO  Attempting to instantiate using public no-arg constructor...
2017-05-25 12:59:30.885+0000 INFO  Success.
2017-05-25 12:59:30.966+0000 INFO  Node Inclusion Policy set to com.graphaware.common.policy.inclusion.composite.CompositeNodeInclusionPolicy@2ae16e60
2017-05-25 12:59:30.966+0000 INFO  Max recommendations set to 30
2017-05-25 12:59:30.966+0000 INFO  Relationship type set to RECOMMEND
2017-05-25 12:59:30.968+0000 INFO  Registering module reco with GraphAware Runtime.
2017-05-25 12:59:30.968+0000 INFO  [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime bootstrapped, starting the Runtime...
2017-05-25 12:59:31.870+0000 INFO  Shutting down GraphAware Runtime...
2017-05-25 12:59:31.870+0000 INFO  Shutting down module reco
2017-05-25 12:59:31.870+0000 INFO  Terminating task scheduler...
2017-05-25 12:59:31.870+0000 INFO  Task scheduler terminated successfully.
2017-05-25 12:59:31.870+0000 INFO  GraphAware Runtime shut down.

Can anybody help me with this?


Solution

  • IncompatibleClassChangeError indicates that there is an incompatible class change somewhere.

    The GraphAware jar files you are using require neo4j 3.1.4. Make sure that you are running neo4j 3.1.4. Also, if you have written any Java code, make sure that it was built with the appropriate versions for GraphaAware and neo4j libraries.