Unable to create embedded instance with 3.4.10


(Joe) #1

Hi,

I'm trying to wire up an embedded Neo4j server instance with 3.4.10, but I'm getting a runtime error:

Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.kernel.impl.query.QueryExecutionEngine
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:73)
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:68)
at org.neo4j.graphdb.DependencyResolver$Adapter.resolveDependency(DependencyResolver.java:130)
at org.neo4j.bolt.v1.runtime.BoltFactoryImpl.start(BoltFactoryImpl.java:71)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
... 18 more

There must be a dependency missing, but I've been through the docs with a fine tooth comb and I can't work it out.

My pom is simple:

<properties>
  <neo4j.version>3.4.10</neo4j.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j</artifactId>
        <version>${neo4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-community</artifactId>
        <version>${neo4j.version}</version>
    </dependency>
 </dependencies>

I ought to be able to wire up an embedded server with

GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(new File("/tmp/neo4j.db"));

But instead I get the exception:

java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /tmp/neo4j.db

at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:212)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:125)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:137)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:130)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:107)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:199)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:75)
at functional.truespeed.graphservice.OGMBootstrapFunctionalSpec.test2(OGMBootstrapFunctionalSpec.groovy:56)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.bolt.v1.runtime.BoltFactoryImpl@2dbd803f' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.kernel.impl.query.QueryExecutionEngine".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.extension.KernelExtensions.start(KernelExtensions.java:84)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:208)
... 7 more
Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.kernel.impl.query.QueryExecutionEngine
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:73)
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:68)
at org.neo4j.graphdb.DependencyResolver$Adapter.resolveDependency(DependencyResolver.java:130)
at org.neo4j.bolt.v1.runtime.BoltFactoryImpl.start(BoltFactoryImpl.java:71)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
... 14 more

Can someone please point me to my error (or a doc that explains my mistake).

Many thanks,
Joe


(Joe) #2

I note that with neo4j 3.4.11, the dependency for GraphDatabaseFactory isn't even present - which is a bit confusing.


(Joe) #3

And it appears to work fine with 3.4.9. Did something changed between .9 and .11?


(Michael Hunger) #4

do you have any exclusions? and scoping that prevents things from being loaded?
are the jars in your m2 directory not broken?


(Michael Hunger) #5

Perhaps an old dependency somewhere else in your pom or transitive dep?
You don't need neo4j-community imho.


(Joe) #6

No exclusions, exactly as reported above.
Works with 3.4.9 but fails in two different ways with 3.4.10 and 3.4.11.


(Michael Hunger) #7

Hmm, odd. Could you raise a GH issue about that. Thanks so much.