1

私は、elasticsearch を使用したい neo4j プラグインを作成しています。neo4j の実行中に、次のエラーが発生します。

ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@435a13ac' was successfully initialized, but failed to start. Please see the attached cause exception "org.apache.log4j.Logger". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@435a13ac' was successfully initialized, but failed to start. Please see the attached cause exception "org.apache.log4j.Logger".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@435a13ac' was successfully initialized, but failed to start. Please see the attached cause exception "org.apache.log4j.Logger".
    at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:219)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@435a13ac' was successfully initialized, but failed to start. Please see the attached cause exception "org.apache.log4j.Logger".
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:211)
    ... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /home/gaurav_verma/.ineo/instances/staging2/data/databases/graph.db
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:211)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:126)
    at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:58)
    at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:88)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
    ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@72c8de78' was successfully initialized, but failed to start. Please see the attached cause exception "org.apache.log4j.Logger".
    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.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:207)
    ... 9 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/log4j/Logger;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
    at java.lang.Class.getDeclaredFields(Class.java:1916)
    at org.neo4j.kernel.impl.proc.FieldInjections.setters(FieldInjections.java:90)
    at org.neo4j.kernel.impl.proc.ReflectiveProcedureCompiler.compileFunction(ReflectiveProcedureCompiler.java:318)
    at org.neo4j.kernel.impl.proc.ReflectiveProcedureCompiler.compileFunction(ReflectiveProcedureCompiler.java:119)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:95)
    at org.neo4j.kernel.impl.proc.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:82)
    at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:275)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
    ... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 21 more

以下は私のpomエントリです:

<dependency>
     <groupId>org.elasticsearch.client</groupId>
     <artifactId>transport</artifactId>
     <version>6.2.4</version>
</dependency>

<dependency>
     <groupId>log4j</groupId>
     <artifactId>log4j</artifactId>
     <version>1.2.17</version>
</dependency>

log4j-core および log4j-api pom エントリも使用してみましたが、それでも同じエラーが発生します。依存関係ツリーも見て、 commons-logging:commons-logging:jar の競合する 2 つのバージョンを見つけましたが、これを解決する方法がわかりません。

何が問題で、これを解決する方法を誰か教えてください。

4

1 に答える 1