我们想将neo4J集群从neo4J 3.4.x升级到neo4J 3.5.2,但是现在我们面临以下问题:
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.<init>(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
以下是代码段:
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");
}
}
neo4J 3.4.x没问题,所以我绝对必须对最新版本进行一些更改。有人有同样的问题吗?谢谢。
答案 0 :(得分:0)
这是我从neo4J社区论坛获得的解决方案:
我唯一要做的更改:
public RegisterTransactionEventHandlerExtensionFactory() {
super(ExtensionType.DATABASE, "registerTransactionEventHandler");
}