I've been playing around with Michael's
batch-import to create a bunch of nodes/relationships in a neo4j instance I'm running on a vagrant VM and somehow I've managed to lock the database and I'm not entirely sure how to fix it!
These are the last lines of /var/lib/neo4j/data/log/neo4j.0.0.log
Mar 5, 2013 12:20:24 AM org.neo4j.server.logging.Logger log
INFO: Loaded neo4j tuning properties from conf/neo4j.properties
Mar 5, 2013 12:20:24 AM org.neo4j.server.logging.Logger log
SEVERE: Failed to start database.
Mar 5, 2013 12:20:24 AM org.neo4j.server.logging.Logger log
SEVERE:
java.lang.IllegalStateException: Database locked.
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:289)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:227)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:79)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:70)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:205)
at org.neo4j.server.database.CommunityDatabase.start(CommunityDatabase.java:55)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:124)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:85)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:49)
Mar 5, 2013 12:20:24 AM org.neo4j.server.logging.Logger log
SEVERE: Failed to start Neo Server on port [7474]
I stopped the database before running my import using 'service neo4j-service stop' and then ran a shell script which executed the following:
java -server -Xmx2G -jar /tmp/batch-importer.jar /var/lib/neo4j/data/graph.db /usr/share/football/batch_import/nodes.csv /usr/share/football/batch_import/rels.csv
Where the CSV files contain nodes/relationships and the /tmp/batch-importer.jar is a build of the JAR from batch-import which I copied onto the machine.
The version of neo is 1.8.2 running on Ubuntu 12.04 but I've been successful with using the batch-import on a 1.9.M04 instance on OS X 10.8.2.
I am running the Open JDK on the VM (going to switch to the Sun JDK now), would that likely be the cause of a database lock?
Thanks in advance,
Mark