Hi,

How can I load my database with multiple processes? 

This is my init function:

static GraphDatabaseService graphDb;
private static final String DB_PATH = 
"C:/Users/Reihane/Documents/Neo4j/default.graphdb";
public boolean init() throws DBException {
if (graphDb == null)
graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);
engine = new ExecutionEngine(graphDb);
return true;
}

and this is the exception my code throws:

java.lang.RuntimeException: Error starting 
org.neo4j.kernel.EmbeddedGraphDatabase, 
C:\Users\Reihane\Documents\Neo4j\default.graphdb
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.Neo4jClient.init(Neo4jClient.java:168)
at edu.usc.bg.base.DBWrapper.init(DBWrapper.java:62)
at edu.usc.bg.base.Client.executeDoLoad(Client.java:1013)
at edu.usc.bg.base.Client.runBG(Client.java:892)
at edu.usc.bg.BGMainClass.main(BGMainClass.java:41)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 
'org.neo4j.kernel.StoreLockerLifecycleAdapter@7a536ac6' was successfully 
initialized, but failed to start. Please see attached cause exception.
at 
org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:504)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
at 
org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:310)
... 9 more
Caused by: org.neo4j.kernel.StoreLockException: Unable to obtain lock on 
store lock file: 
C:\Users\Reihane\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.StoreLocker.checkLock(StoreLocker.java:87)
at 
org.neo4j.kernel.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:44)
at 
org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:498)
... 11 more
Caused by: java.io.IOException: Couldn't lock lock file 
C:\Users\Reihane\Documents\Neo4j\default.graphdb\lock because another 
process already holds the lock.
at 
org.neo4j.kernel.impl.nioneo.store.FileLock.getLockFileBasedFileLock(FileLock.java:115)
at 
org.neo4j.kernel.impl.nioneo.store.FileLock.getOsSpecificFileLock(FileLock.java:63)
at 
org.neo4j.kernel.DefaultFileSystemAbstraction.tryLock(DefaultFileSystemAbstraction.java:89)
at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:74)
... 13 more

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to