启动org.neo4j.kernel.EmbeddedGraphDatabase时出错并且无法解析依赖关系

时间:2016-09-14 03:52:43

标签: java neo4j

我只想用java测试Neo4j。当我运行一个demo时,有一些错误。这里有代码:

Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, D:\myoffice\JAVA_workspace\neo4j\target\database\learn1
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:333)
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:63)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:92)
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:198)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:69)
    at neo4j.Neo4j.main(Neo4j.java:129)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions@3b08a056' failed to initialize. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:480)
    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:310)
    ... 5 more
Caused by: org.neo4j.kernel.extension.KernelExtensions$UnsatisfiedDepencyException: java.lang.IllegalArgumentException: Could not resolve dependency of type:org.neo4j.io.fs.FileSystemAbstraction
    at org.neo4j.kernel.extension.KernelExtensions$KernelExtensionHandler.invoke(KernelExtensions.java:249)
    at com.sun.proxy.$Proxy3.getFileSystem(Unknown Source)
    at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newKernelExtension(LuceneLabelScanStoreExtension.java:71)
    at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newKernelExtension(LuceneLabelScanStoreExtension.java:39)
    at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:103)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:474)
    ... 8 more
Caused by: java.lang.IllegalArgumentException: Could not resolve dependency of type:org.neo4j.io.fs.FileSystemAbstraction
    at org.neo4j.graphdb.DependencyResolver$Adapter$1.select(DependencyResolver.java:84)
    at org.neo4j.kernel.extension.KernelExtensions.resolveDependency(KernelExtensions.java:205)
    at org.neo4j.kernel.InternalAbstractGraphDatabase$DependencyResolverImpl.resolveDependency(InternalAbstractGraphDatabase.java:1428)
    at org.neo4j.graphdb.DependencyResolver$Adapter.resolveDependency(DependencyResolver.java:92)
    at org.neo4j.kernel.extension.KernelExtensions$KernelExtensionHandler.invoke(KernelExtensions.java:245)
    ... 13 more

这是包裹: enter image description here

非常感谢!

1 个答案:

答案 0 :(得分:1)

测试时类路径中存在哪些实际依赖项?您需要neo4j-io-2.2.4.jar,可以通过包名称推断,或searching Maven Central推断。