neo4j-contrib / neo4j-elasticsearch

Neo4j ElasticSearch Integration
Apache License 2.0
210 stars 79 forks source link

`Cannot inherit from final class` Error with multiple plugins #26

Closed ahmetkizilay closed 7 years ago

ahmetkizilay commented 7 years ago

Hello,

I am trying to run this plugin along with GraphAware's time-tree plugin. Even though I can run each plugin individually, I get the following error when I try to start the database with both plugins active

Is there a way to avoid this problem?

2016-10-10 14:37:27.911+0000 INFO  Starting...
2016-10-10 14:37:28.403+0000 INFO  Bolt enabled on localhost:7687.
2016-10-10 14:37:31.305+0000 INFO  [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime disabled.
2016-10-10 14:37:34.974+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' 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@349cc412' 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:215)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@349cc412' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
    ... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /home/ahmetkizilay/WORK/TOOLS/neo4j-community-3.0.6/data/databases/graph.db
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
    at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
    at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:55)
    at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@22067885' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
    ... 10 more
Caused by: java.lang.VerifyError: Cannot inherit from final 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:331)
    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:132)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader$1.fetchNextOrNull(ProcedureJarLoader.java:110)
    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:85)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:77)
    at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:125)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    ... 12 more
jexp commented 7 years ago

I think it sounds like a version problem that the Procedure-Loader runs into. Could you raise this issue on github.com/neo4j/neo4j/issues ?

ahmetkizilay commented 7 years ago

Thanks @jexp Submitted the issue: neo4j/neo4j#8142

ahmetkizilay commented 7 years ago

@jexp I investigated this a little further. Both plugins depend on guava. Graphaware Framework jar already bundles the classes. So I skipped copying the guava jar file from the dependencies into the plugins folder and the error disappeared.

jexp commented 7 years ago

Ah cool, thanks a lot.