简体   繁体   English

Neo4j无法启动

[英]Neo4j not starts

I'm trying to run Neo4j database with java but it gives me the following error : 我正在尝试使用Java运行Neo4j数据库,但它给了我以下错误:

java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /home/matteo/neo4j-community-2.2.2/data/graph.db
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334)
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:108)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:95)
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:67)
    at Getter.main(Getter.java:46)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions@2e9a2123' failed to initialize. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489)
    at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:106)
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330)
    ... 6 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.index.lucene.LuceneKernelExtension@1c3c1d18' failed to initialize. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489)
    at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72)
    at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:74)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483)
    ... 9 more
Caused by: java.lang.NoSuchFieldError: LUCENE_36
    at org.neo4j.index.impl.lucene.LuceneDataSource.<clinit>(LuceneDataSource.java:88)
    at org.neo4j.index.lucene.LuceneKernelExtension.init(LuceneKernelExtension.java:52)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483)
    ... 12 more

Where is the problem?? 问题出在哪儿?? Thank you very much! 非常感谢你! Matteo 马特奥

Since you're running embedded Neo4j this looks like you're missing lucene-core-3.6.2.jar on your classpath. 由于您正在运行嵌入式Neo4j,因此看起来您的类路径中缺少lucene-core-3.6.2.jar

Best practice is to use a build system supporting transitive dependencies like gradle or maven. 最佳实践是使用支持传递性依赖项(例如gradle或maven)的构建系统。 For those the most easy this is have a dependency on neo4j-community artifact, eg http://mvnrepository.com/artifact/org.neo4j/neo4j/2.2.5 . 对于最简单的人来说,这取决于neo4j-community工件,例如http://mvnrepository.com/artifact/org.neo4j/neo4j/2.2.5 This will pull in all other required jars. 这将拉入所有其他需要的罐子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM