Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-28-2019 06:47 AM
We wanted to upgrade our neo4J cluster from neo4J 3.4.x to neo4J 3.5.2, but now we are facing with the following problem:
2019-01-28 08:52:41.894+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@72dc9f9d' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@72dc9f9d' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService". org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@72dc9f9d' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService". at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:184) at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:123) at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90) at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntryPoint.java:22) Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@72dc9f9d' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService". at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:177) ... 3 more Caused by: java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, /var/lib/neo4j/data/databases at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:216) at com.neo4j.commercial.edition.CommercialGraphDatabase.(CommercialGraphDatabase.java:20) at com.neo4j.server.database.CommercialGraphFactory.newGraphDatabase(CommercialGraphFactory.java:40) at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:78) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452) ... 5 more Suppressed: org.neo4j.kernel.lifecycle.LifecycleException: Component 'com.sila.neo4j.transaction.RegisterTransactionEventHandlerExtensionFactory$1@5e1d6ace' failed to transition from stopped to shutting_down. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService". at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:526) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185) at org.neo4j.kernel.extension.AbstractKernelExtensions.shutdown(AbstractKernelExtensions.java:94) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:518) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185) at org.neo4j.graphdb.facade.spi.ClassicCoreSPI.shutdown(ClassicCoreSPI.java:171) at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.shutdown(GraphDatabaseFacade.java:357) at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:224) ... 9 more Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService 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.sila.neo4j.transaction.$Proxy24.getGraphDatabaseService(Unknown Source) at com.sila.neo4j.transaction.RegisterTransactionEventHandlerExtensionFactory$1.shutdown(RegisterTransactionEventHandlerExtensionFactory.java:34) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:518) ... 16 more Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'com.sila.neo4j.transaction.RegisterTransactionEventHandlerExtensionFactory$1@5e1d6ace' was successfully initialized, but failed to start. Please see the attached cause exception "No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService". at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111) at org.neo4j.kernel.extension.AbstractKernelExtensions.start(AbstractKernelExtensions.java:82) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111) at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:211) ... 9 more Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type interface org.neo4j.graphdb.GraphDatabaseService 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.sila.neo4j.transaction.$Proxy24.getGraphDatabaseService(Unknown Source) at com.sila.neo4j.transaction.RegisterTransactionEventHandlerExtensionFactory$1.start(RegisterTransactionEventHandlerExtensionFactory.java:26) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452) ... 14 more
Here is the snippet of the code:
public class RegisterTransactionEventHandlerExtensionFactory extends KernelExtensionFactory<RegisterTransactionEventHandlerExtensionFactory.Dependencies> {
@Override
public Lifecycle newInstance(KernelContext kernelContext, final Dependencies dependencies) throws Throwable {
return new LifecycleAdapter() {
private SilaTransactionEventHandler handler;
private ExecutorService executor;
@Override
public void start() throws Throwable {
executor = Executors.newFixedThreadPool(2);
handler = new SilaTransactionEventHandler(dependencies.getGraphDatabaseService(), executor);
dependencies.getGraphDatabaseService().registerTransactionEventHandler(handler);
}
@Override
public void shutdown() throws Throwable {
executor.shutdown();
dependencies.getGraphDatabaseService().unregisterTransactionEventHandler(handler);
}
};
}
interface Dependencies {
GraphDatabaseService getGraphDatabaseService();
}
public RegisterTransactionEventHandlerExtensionFactory() {
super("registerTransactionEventHandler");
}
}
There was no problem with neo4J 3.4.x, so there must me definitely some change in the the latest version. Does anyone has the same problem? Thanks.
Solved! Go to Solution.
01-28-2019 10:38 PM
Also in 3.5 there are 2 kinds of Extension Factories now, global and per database.
Only the per database one has access to a db.
See
01-28-2019 07:59 AM
what neo4j dependencies do you have in your pom.xml or build.gradle?
01-28-2019 11:39 AM
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graphdb-api</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>3.5.2</version>
<type>test-jar</type>
</dependency>
01-28-2019 01:18 PM
try to add org.neo4j:neo4j-kernel
as well as normal (aka non-test-jar) as well.
01-28-2019 10:38 PM
Also in 3.5 there are 2 kinds of Extension Factories now, global and per database.
Only the per database one has access to a db.
See
01-29-2019 01:28 AM
Thanks. It really solved the problem.
01-29-2019 01:10 AM
I added org.neo4j:neo4j-kernel to pom.xml, but I ended with the same problem. This is our current pom.xml:
<properties>
<neo4j.version>3.5.2</neo4j.version>
</properties>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-graphdb-api</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>${neo4j.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.8</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
<dependency>
<groupId>org.neo4j.test</groupId>
<artifactId>neo4j-harness</artifactId>
<version>${neo4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
<version>1.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.1.2.RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>env_properties/local</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>dev</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>env_properties/dev</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>test</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>env_properties/test</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>release</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>env_properties/release</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>prod</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>env_properties/prod</directory>
</resource>
</resources>
</build>
</profile>
</profiles>
All the sessions of the conference are now available online