cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create embedded instance with 3.4.10

joe
Node Link

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

9 REPLIES 9

joe
Node Link

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

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

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

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

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.

I had the same problem and for me it was because I was still using the neo4j-kernel dependency which also has the "org.neo4j.graphdb.factory" package but no "GraphDatabaseFactory" file in it.

Is it resolved now for you?

yes

Le mer. 28 août 2019 à 14:35, Michael Hunger via Neo4j Online Community neo4jcommunity@discoursemail.com a écrit :

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

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.