在创建Spring Data Neo4j应用程序时,我已遵循此guide。
我已经包括:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>3.3.1.RELEASE</version>
</dependency>
在我的 pom.xml
中尝试启动服务器时出现以下错误:
“启动Neo4j服务器失败:组件 'org.neo4j.server.database.LifecycleManagingDatabase @'是 成功初始化,但未能启动。“
消息日志说:
“启动org.neo4j.kernel.EmbeddedGraphDatabase时出错”
我已经读过Spring Data Neo4j和Neo4j服务器版本可能彼此不兼容。
问题:我如何知道哪些版本兼容?
堆栈跟踪:
2015-07-09 13:03:56.231+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
2015-07-09 13:03:56.244+0000 ERROR [o.n.s.d.LifecycleManagingDatabase]: Failed to start database.
java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, D:\neo4j
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:335) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.server.database.LifecycleManagingDatabase$1.newGraphDatabase(LifecycleManagingDatabase.java:44) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:110) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:203) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.desktop.runtime.DatabaseActions.start(DatabaseActions.java:71) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.desktop.ui.StartDatabaseActionListener$1.run(StartDatabaseActionListener.java:61) [neo4j-desktop-2.2.3.jar:2.2.3]
at java.awt.event.InvocationEvent.dispatch(Unknown Source) [na:1.7.0_75]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [na:1.7.0_75]
at java.awt.EventQueue.access$300(Unknown Source) [na:1.7.0_75]
at java.awt.EventQueue$3.run(Unknown Source) [na:1.7.0_75]
at java.awt.EventQueue$3.run(Unknown Source) [na:1.7.0_75]
at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_75]
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_75]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [na:1.7.0_75]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [na:1.7.0_75]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [na:1.7.0_75]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [na:1.7.0_75]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [na:1.7.0_75]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [na:1.7.0_75]
at java.awt.EventDispatchThread.run(Unknown Source) [na:1.7.0_75]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.state.DataSourceManager@5a7c7505' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:331) ~[neo4j-desktop-2.2.3.jar:2.2.3]
... 22 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@50f074ae' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) [neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:117) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-desktop-2.2.3.jar:2.2.3]
... 24 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-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:158) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:259) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:134) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:564) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:460) ~[neo4j-desktop-2.2.3.jar:2.2.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) [neo4j-desktop-2.2.3.jar:2.2.3]
... 27 common frames omitted
2015-07-09 13:03:56.244+0000 INFO [o.n.s.CommunityNeoServer]: Successfully shutdown Neo4j Server.
答案 0 :(得分:0)
我确实通过关闭Michael Hunger所述的流来解决问题(误解了关闭spring应用程序的含义)。
即
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(&#34; appContext.xml&#34;); context.close();
答案 1 :(得分:0)
目前还没有一个中心列表显示Spring Data Neo4j与Neo4j版本的兼容性。这将是非常有用的,因为当使用不兼容的版本时,SDN倾向于抛出奇怪的例外,例如 Can't move to Neo4j 2.2.0 and Spring Data Neo4j 3.3.0.RELEASE