Java程序无法在Neo4j数据库上创建锁定

时间:2013-08-26 20:25:16

标签: neo4j

连接到Neo4j时出现以下错误:

Exception in thread "main" java.lang.RuntimeException:  org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.StoreLockerLifecycleAdapter@1798b372' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:281)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:88)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:207)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:69)
at com.neo4j.NeoStart.createDatabase(NeoStart.java:41)
at com.neo4j.NeoStart.main(NeoStart.java:26)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.StoreLockerLifecycleAdapter@1798b372' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:259)
... 6 more
Caused by: org.neo4j.kernel.StoreLockException: Could not create lock file
at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:74)
at org.neo4j.kernel.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:40)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)

我已经在ubuntu 12.04中安装了neo4j: apt-get install neo4j

我正在使用的DB_PATH如下: private static final String neo4j_DB_PATH =“ /var/lib/neo4j/data/graph.db ”;

请帮我解决这个问题...

1 个答案:

答案 0 :(得分:2)

您确定neo4j服务器使用的uid是否具有对数据目录的写权限?你确定没有多个实例在运行吗?您可以在终端上使用ps axf|grep neo4j进行检查。