我正在尝试使用此处描述的Java API将数据插入到Neo4J中:http://neo4j.com/docs/stable/batchinsert-examples.html。我下载了neo4j-community-2.1.6-unix.tar.gz
并将其解压缩,然后创建了BatchInserters.inserter("/path/to/neo4j/data/graph.db")
并开始导入过程。
我的Java项目使用以下Maven依赖项来获取Neo4j:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>2.2.0-M01</version>
</dependency>
如果我运行导入并且数据已存在于data/graph.db
(即使只做一个bin/neo4j start; bin/neo4j stop
),那么我会收到此错误:
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)
如果我改为离开data/graph.db
目录并执行导入,导入似乎按计划进行,但我之后无法启动数据库 - 这是不成功后{1中的日志中的内容}}:
bin/neo4j start
据我所知,似乎没有实际的恢复。
如果我需要旧版本的导入程序代码库或其他东西,我在哪里可以找到它?
答案 0 :(得分:1)
想出来 - 就像将我的Maven依赖关系更改为<version>2.1.6</version>
一样简单。咄。