cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site maintenance this Wednesday, February 1. Disruptions expected as we migrate the forums.

java.lang.RuntimeException

Hi
when I connect java application created database with neo4j theh getting following exception
please have a look

Exception in thread "main" java.lang.RuntimeException: Error starting database server at C:\Users\ns.Neo4jDesktop\neo4jDatabases\database-83f54246-62ac-4175-9ae1-a0592caeef83\installation-4.0.2\data\databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:167)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
at org.neo4j.dbms.api.DatabaseManagementServiceBuilder.newDatabaseManagementService(DatabaseManagementServiceBuilder.java:85)
at org.neo4j.dbms.api.DatabaseManagementServiceBuilder.build(DatabaseManagementServiceBuilder.java:78)
at org.neo4j.example.HelloworldApplication.createDb(HelloworldApplication.java:62)
at org.neo4j.example.HelloworldApplication.main(HelloworldApplication.java:52)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.locker.LockerLifecycleAdapter@42f8285e' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: C:\Users\ns.Neo4jDesktop\neo4jDatabases\database-83f54246-62ac-4175-9ae1-a0592caeef83\installation-4.0.2\data\databases\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.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
... 5 more
Caused by: org.neo4j.kernel.internal.locker.FileLockException: Lock file has been locked by another process: C:\Users\ns.Neo4jDesktop\neo4jDatabases\database-83f54246-62ac-4175-9ae1-a0592caeef83\installation-4.0.2\data\databases\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.locker.Locker.storeLockException(Locker.java:176)
at org.neo4j.kernel.internal.locker.Locker.checkLock(Locker.java:96)
at org.neo4j.kernel.internal.locker.GlobalFileLocker.checkLock(GlobalFileLocker.java:58)
at org.neo4j.kernel.internal.locker.GlobalLocker.checkLock(GlobalLocker.java:28)
at org.neo4j.kernel.internal.locker.LockerLifecycleAdapter.start(LockerLifecycleAdapter.java:36)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
... 7 more

1 REPLY 1

Most Likely Cause

  • Recent stop and restart of that Neo4j instance
  • Another instance of Neo4j is running and connected to that database instance
  • Some other command or utility was attempting to modify the data, and did not cleanly exit.

Best Quick Fix

Have you tried turning it off and back off again?
Wait a couple minutes and try again. If that fails, reboot your computer.
If that fails, you probably have a permissions issue, which can be tricky to resolve in Windows.

Looks like you're running this instance as a user named "ns.Neo4jDesktop," from within that user's directory. I suspect you are not logged-in as that user. You might want to try a fresh install, and let it live in your User directory.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online