cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

No dependency satisfies type interface org.neo4j.kernel.internal.GraphDatabaseAPI

I am in the process of upgrading from Neo4J 3.4.3 to 3.5.3 and running into this issue while trying to run my embedded server:

Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /opt/app/castl-server/data
	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:216)
	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:135)
	at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:133)
	at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:122)
	at org.neo4j.graphdb.factory.GraphDatabaseFactory$EmbeddedDatabaseCreator.newDatabase(GraphDatabaseFactory.java:178)
	at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:210)
	at castl.server.Neo4jEmbeddedServer.createGraphDatabase(Neo4jEmbeddedServer.java:55)
	at castl.server.Neo4jEmbeddedServer.<init>(Neo4jEmbeddedServer.java:35)
	at castl.server.Neo4JModule.<init>(Neo4JModule.java:53)
	at castl.server.CastlServer.<init>(CastlServer.java:29)
	atcastl.server.Bootstrap.main(Bootstrap.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.GlobalKernelExtensions@5ef6ae06' failed to initialize. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.kernel.internal.GraphDatabaseAPI".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:434)
	at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102)
	at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:211)
	... 10 more
Caused by: org.neo4j.kernel.extension.FailedToBuildKernelExtensionException: Failed to build kernel extension KernelExtension:ShellServerExtensionFactory[shell] due to a missing dependency: No dependency satisfies type interface org.neo4j.kernel.internal.GraphDatabaseAPI
	at org.neo4j.kernel.extension.KernelExtensionFailureStrategies.wrap(KernelExtensionFailureStrategies.java:35)
	at org.neo4j.kernel.extension.KernelExtensionFailureStrategies.access$000(KernelExtensionFailureStrategies.java:26)
	at org.neo4j.kernel.extension.KernelExtensionFailureStrategies$1.handle(KernelExtensionFailureStrategies.java:70)
	at org.neo4j.kernel.extension.AbstractKernelExtensions.init(AbstractKernelExtensions.java:68)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:413)
	... 13 more
Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.kernel.internal.GraphDatabaseAPI
	at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:66)
	at org.neo4j.graphdb.DependencyResolver$Adapter.resolveDependency(DependencyResolver.java:145)
	at org.neo4j.kernel.impl.util.DependenciesProxy$ProxyHandler.invoke(DependenciesProxy.java:80)
	at com.sun.proxy.$Proxy20.getGraphDatabaseAPI(Unknown Source)
	at org.neo4j.shell.impl.ShellServerExtensionFactory.newInstance(ShellServerExtensionFactory.java:49)
	at org.neo4j.shell.impl.ShellServerExtensionFactory.newInstance(ShellServerExtensionFactory.java:29)
	at org.neo4j.kernel.extension.AbstractKernelExtensions.newInstance(AbstractKernelExtensions.java:120)
	at org.neo4j.kernel.extension.AbstractKernelExtensions.init(AbstractKernelExtensions.java:62)
	... 14 more

Here are the dependencies included in my POM

        <dependency>
            <groupId>org.neo4j.community</groupId>
            <artifactId>it-test-support</artifactId>
            <version>3.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
            <version>3.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-bolt</artifactId>
            <version>3.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-kernel</artifactId>
            <version>3.5.3</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-resource</artifactId>
            <version>3.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-shell</artifactId>
            <version>3.4.12</version>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-kernel-api</artifactId>
            <version>3.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-collections</artifactId>
            <version>3.5.3</version>
        </dependency>

I believe I have included all necessary artifacts in my pom and am unsure how to satisfy the dependency, anyone else experience this difficulty when updating dependencies? Any help would be appreciated.

Thanks!

1 ACCEPTED SOLUTION

Was just about to write a comment regarding neo4j-shell. Note that neo4j-shell has been removed in 3.5 - it was a very old tool using RMI which has been superseeded by cypher-shell.

So check your dependency tree why you have neo4j-shell there - in most cases there's no reason to keep it.

View solution in original post

3 REPLIES 3

Are you using a kernel extension? If so make sure to change its constuctor to use 2 parameters, see the example from APOC:

public ApocKernelExtensionFactory() {
        super(ExtensionType.DATABASE, "APOC");
    }

Hi Stefan, I was able to resolve my issue by updating my neo4j-shell dependency to the latest "3.5.0-beta01" version. This version has changed the constructor of the ShellServerExtensionFactory to include both parameters that you mentioned. Is there any sort of ETA when we can expect a stable 3.5.* release of the neo4j-shell?

Was just about to write a comment regarding neo4j-shell. Note that neo4j-shell has been removed in 3.5 - it was a very old tool using RMI which has been superseeded by cypher-shell.

So check your dependency tree why you have neo4j-shell there - in most cases there's no reason to keep it.