gpt4 book ai didi

java - Neo4j 2.0,java - 无法使用较旧的数据存储版本启动 Neo4j

转载 作者:搜寻专家 更新时间:2023-10-31 08:26:28 25 4
gpt4 key购买 nike

我曾经在我的 java maven 项目中使用 neo4j-community-1.9.4。我切换到 2.0 版并在 2.0 中制作了全新的数据库。当我运行相同的 java 代码时,出现错误:

Exception in thread "main" org.neo4j.kernel.impl.storemigration.UpgradeNotAllowedByConfigurationException: Failed to start Neo4j with an older data store version. To enable automatic upgrade, please set configuration parameter "allow_store_upgrade=true"
at org.neo4j.kernel.impl.storemigration.ConfigMapUpgradeConfiguration.checkConfigurationAllowsAutomaticUpgrade(ConfigMapUpgradeConfiguration.java:39)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.attemptUpgrade(StoreUpgrader.java:64)
at org.neo4j.kernel.impl.nioneo.store.StoreFactory.tryToUpgradeStores(StoreFactory.java:104)
at org.neo4j.kernel.impl.nioneo.store.StoreFactory.newNeoStore(StoreFactory.java:86)
at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.<init>(NeoStoreXaDataSource.java:232)
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:423)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:226)
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.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:56)
at tools.Import.main(Import.java:32)

有什么想法吗?谢谢。

最佳答案

Neo4j 2.0 需要显式商店升级,因为旧版本将无法再在升级后的商店上运行。异常提到了这一点:

Failed to start Neo4j with an older data store version. To enable automatic upgrade, please set configuration parameter "allow_store_upgrade=true"

只需将 allow_store_upgrade=true 添加到您的 neo4j.properties 文件,然后再次启动数据库。然后它应该进行升级。您可以在此处阅读更多相关信息:

http://docs.neo4j.org/chunked/stable/deployment-upgrading.html#explicit-upgrade

关于java - Neo4j 2.0,java - 无法使用较旧的数据存储版本启动 Neo4j,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21418107/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com