如何在eclipse中运行java和neo4j以使用bolt协议
我正在Eclipse中使用maven依赖项,并尝试使用bolt协议连接neo4j和java。我正在MacOS中运行应用程序。 我正在使用Eclipse3、JavaVersion8和JRE1.8。这是我的pom.xml ** 在运行应用程序之后,我得到了所有这些错误如何在eclipse中运行java和neo4j以使用bolt协议,java,maven,neo4j,bolt,Java,Maven,Neo4j,Bolt,我正在Eclipse中使用maven依赖项,并尝试使用bolt协议连接neo4j和java。我正在MacOS中运行应用程序。 我正在使用Eclipse3、JavaVersion8和JRE1.8。这是我的pom.xml ** 在运行应用程序之后,我得到了所有这些错误 Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFaca
Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /Users/arundhatiwahane/Documents/Neo4j/default.graphdb
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:199)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:130)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:101)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.lambda$createDatabaseCreator$0(GraphDatabaseFactory.java:89)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$$Lambda$1/1130478920.newDatabase(Unknown Source)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:183)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:66)
at com.sampledb.createDatabase(sampledb.java:41)
at com.sampledb.main(sampledb.java:34)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.StoreLockerLifecycleAdapter@1b15e2a9' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:443)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:195)
... 8 more
Caused by: org.neo4j.kernel.StoreLockException: Store and its lock file has been locked by another process: /Users/arundhatiwahane/Documents/Neo4j/default.graphdb/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
at org.neo4j.kernel.internal.StoreLocker.storeLockException(StoreLocker.java:94)
at org.neo4j.kernel.internal.StoreLocker.checkLock(StoreLocker.java:80)
at org.neo4j.kernel.internal.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:40)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
... 10 more
请帮助我找出所有错误。另一个进程正在锁定,请将其杀死 试一试 或 阅读异常的描述
Caused by: org.neo4j.kernel.StoreLockException: Store and its lock file has been locked by another process: /Users/arundhatiwahane/Documents/Neo4j/default.graphdb/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
如果终止进程无法解决问题,则需要向目录添加写入权限
chmod -R 777 /Users/arundhatiwahane/Documents/Neo4j/
@在尝试向目录添加写入权限时,我的回答中的命令也尝试了相同的操作,并且也遵循了此页面中的说明。仍然没有解决我的问题的运气我能够在eclipse中使用bolt api运行neo4j java。我已经删除了新的EmbeddedDatabase,代码运行良好。
ps aux | grep neo4j
ps aux | grep java
Caused by: org.neo4j.kernel.StoreLockException: Store and its lock file has been locked by another process: /Users/arundhatiwahane/Documents/Neo4j/default.graphdb/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
chmod -R 777 /Users/arundhatiwahane/Documents/Neo4j/