Reputation: 24005
I'm attempting to insert data into Neo4J using the Java APIs described here: http://neo4j.com/docs/stable/batchinsert-examples.html . I downloaded neo4j-community-2.1.6-unix.tar.gz
and unpacked it, then created a BatchInserters.inserter("/path/to/neo4j/data/graph.db")
and began the import process.
My Java project uses the following Maven dependency to get Neo4j:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>2.2.0-M01</version>
</dependency>
If I run the import and data already exists at data/graph.db
(even by doing just a bin/neo4j start; bin/neo4j stop
), then I get this error:
org.neo4j.kernel.impl.store.NotCurrentStoreVersionException:
Was expecting store version [v0.A.4] but found [StringPropertyStore v0.A.3].
Store cannot be upgraded automatically.
at org.neo4j.kernel.impl.store.StoreVersionMismatchHandler$1.mismatch(StoreVersionMismatchHandler.java:38)
at org.neo4j.kernel.impl.store.CommonAbstractStore.verifyCorrectTypeDescriptorAndVersion(CommonAbstractStore.java:322)
at org.neo4j.kernel.impl.store.CommonAbstractStore.checkVersion(CommonAbstractStore.java:198)
at org.neo4j.kernel.impl.store.CommonAbstractStore.<init>(CommonAbstractStore.java:119)
at org.neo4j.kernel.impl.store.AbstractDynamicStore.<init>(AbstractDynamicStore.java:92)
at org.neo4j.kernel.impl.store.DynamicStringStore.<init>(DynamicStringStore.java:53)
at org.neo4j.kernel.impl.store.StoreFactory.newDynamicStringStore(StoreFactory.java:254)
at org.neo4j.kernel.impl.store.StoreFactory.newRelationshipTypeTokenStore(StoreFactory.java:273)
at org.neo4j.kernel.impl.store.StoreFactory.newRelationshipTypeTokenStore(StoreFactory.java:260)
at org.neo4j.kernel.impl.store.StoreFactory.newNeoStore(StoreFactory.java:171)
at org.neo4j.kernel.impl.store.StoreFactory.newNeoStore(StoreFactory.java:147)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.<init>(BatchInserterImpl.java:257)
at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:94)
at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:88)
at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:63)
at org.neo4j.unsafe.batchinsert.BatchInserters.inserter(BatchInserters.java:51)
If I instead leave the data/graph.db
directory uncreated and perform the import, the import seems to go as planned, but I can't start up the database afterward - here's what's in the log after an unsuccessful bin/neo4j start
:
% cat data/log/console.log
2014-12-11 21:52:22.942+0000 INFO [API] Setting startup timeout to: 120000ms based on -1
Detected incorrectly shut down database, performing recovery..
No actual recovery seems to be performed though, as far as I can tell.
If I need an older version of the importer codebase or something, where could I find that?
Upvotes: 0
Views: 255
Reputation: 24005
Figured it out - it was as easy as changing my Maven dependency to <version>2.1.6</version>
. Duh.
Upvotes: 1