通过 java 代码生成数据库后,Neo4j 2.2.2 服务器未启动

Neo4j 2.2.2 server does not start after db is generated via java code

我是 Neo4j 的新手。我正在 Java 中使用 Neo4j 2.2.2 和 Spring 数据尝试一些应用程序。 我正在使用 spring-data-neo4j (2.2.2.RELEASE) 连接 Neo4j 数据库。我已经使用 Spring 数据中的存储库成功完成了所有 CRUD 操作。 但我无法在 Neo4J UI 工具中打开和查看此数据库。 当我尝试从控制台启动 Neo4J 服务器时,我收到以下错误消息。

emuser1@em02-desktop:~/Installations/neo4j-community-2.2.2/bin$ ./neo4j start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Starting Neo4j Server...WARNING: not changing user
process [14509]... waiting for server to be ready.. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.

我检查了我的数据库存储中的 message.log 文件。它显示以下异常。

java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /home/emuser1/Installations/neo4j-community-2.2.2/data/graph.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:59) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.server.database.LifecycleManagingDatabase.newGraphDatabase(LifecycleManagingDatabase.java:44) ~[neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:110) ~[neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:203) [neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117) [neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69) [neo4j-server-2.2.2.jar:2.2.2]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.state.DataSourceManager@498af5c0' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) [neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330) ~[neo4j-kernel-2.2.2.jar:2.2.2]
... 8 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@7ccdb0dd' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) [neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-kernel-2.2.2.jar:2.2.2]
... 10 common frames omitted
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UpgradingStoreVersionNotFoundException: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean state.
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:86) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:158) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:259) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:134) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:560) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:461) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-kernel-2.2.2.jar:2.2.2]
... 13 common frames omitted
2015-06-20 05:41:58.344+0000 INFO [o.n.s.CommunityNeoServer]: Successfully shutdown Neo4j Server.
2015-06-20 05:41:58.345+0000 ERROR [o.n.s.CommunityBootstrapper]: Failed to start Neo Server on port [7474]
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@1414ed5' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:255) ~[neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117) [neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69) [neo4j-server-2.2.2.jar:2.2.2]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@1414ed5' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:203) ~[neo4j-server-2.2.2.jar:2.2.2]
... 2 common frames omitted
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /home/emuser1/Installations/neo4j-community-2.2.2/data/graph.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:59) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.server.database.LifecycleManagingDatabase.newGraphDatabase(LifecycleManagingDatabase.java:44) ~[neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:110) ~[neo4j-server-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.2.2.jar:2.2.2]
... 4 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.state.DataSourceManager@498af5c0' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330) ~[neo4j-kernel-2.2.2.jar:2.2.2]
... 8 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@7ccdb0dd' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.2.2.jar:2.2.2]
... 10 common frames omitted
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UpgradingStoreVersionNotFoundException: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean state.
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:86) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:158) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:259) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:134) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:560) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:461) ~[neo4j-kernel-2.2.2.jar:2.2.2]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.2.2.jar:2.2.2]
... 13 common frames omitted

谁能帮帮我。我做错了什么吗?

提前致谢。

注意:我和here有同样的问题。但一直没有令人满意的答案。

您的版本有些混乱。 Spring Data Neo4j 2.2.2 适用于 Neo4j 1.9 左右。 SDN 3.0 与 Neo4j 2.0 和仅 SDN 3.3.1(即将发布)与 Neo4j 2.2.2。 SDN 3.3.0 与 Neo4j 2 一起工作。1.x

这就是它要求您在 conf/neo4j.properties 中进行 allow_store_upgrade=true 配置设置的原因。

但我建议将您的 SDN 项目升级到 SDN 3.3.0,然后重新导入您的数据并仍然从 Neo4j 2.1 升级到 2.2,但至少您会有标签和模式索引。