0
votes

I have followed this guide when creating a Spring Data Neo4j application.

I have included:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>3.3.1.RELEASE</version>
</dependency>

In my pom.xml

When trying to start the server I get the following error:

"Starting Neo4j Server failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@' was successfully initialized, but failed to start."

The message log says:

"Error starting org.neo4j.kernel.EmbeddedGraphDatabase"

I have read that the Spring Data Neo4j and the Neo4j server versions might not be compatible with each other.

Question: How can I know which versions are compatible?

Stacktrace:

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.
2
Did you shut down your Spring App before starting the Neo4j server? You can't access the store-files from two different processes. - Michael Hunger
Please share the full stacktrace. - Michael Hunger
Added the stacktrace - Andreas
And the Spring App does not run when starting the Neo4j server - Andreas

2 Answers

0
votes

I did solve the problem by closing the stream as stated by Michael Hunger (misunderstood what was meant by shutting down the spring app).

I.e.

ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("appContext.xml"); context.close();

0
votes

There is currently not a central list that shows Spring Data Neo4j compatibility with Neo4j versions. That would be very helpful though, as when incompatible versions are used SDN tends to throw strange exceptions, e.g. Can't move to Neo4j 2.2.0 and Spring Data Neo4j 3.3.0.RELEASE