Avoiding Neo4j Automatic And Unusual Relationship Termination

Posted By : Mohit Sharma | 27-Jun-2017

Hi Guys, for all those who are using Spring-data-neo4j, if you are using bolt driver to establish communication with graph DB you need to check Bolt version compatibility with Spring Boot version and OGM version.

Otherwise, neo4j DB will not work properly. It might also break relationships with the nodes and behave unusual. 

I have faced this situation in past and it consumed alot of time to idtentify the problem. Everytime we persist an entitly it's relation breaks automatically. 
Finally it narrowed down to version compatability.

Here are Spring data Version, Bolt Version , OGM Version compatability information.

 

 

Neo4j OGM Version Neo4j Version Bolt Version# Spring Data Neo4j Version Spring Boot Version
3.0.0+ 3.0.x, 3.1.x3.0.x, 3.1.x 1.1.0+1.1.0+ 5.0.0+ 2.0.0+2.0.0+
2.1.0+2.1.0+ 2.3.x, 3.0.x, 3.1.x 1.1.0+1.1.0+ 4.2.0+4.2.0+ 1.5.0+1.5.0+
2.0.2+2.0.2+ 2.3.x,3.0.x2.3.x, 3.0.x 1.0.0+1.0.0+ 4.1.2 – 4.1.6+4.1.2 – 4.1.6+ 1.4.x1.4.x
2.0.1*2.0.1* 2.2.x, 2.3.x 1.0.0-RC11.0.0-RC1 4.1.0 – 4.1.14.1.0 – 4.1.1 1.4.x1.4.x
1.1.5*1.1.5* 2.1.x, 2.2.x, 2.3.x2.1.x, 2.2.x, 2.3.x N/A 4.0.0+4.0.0+ 1.4.x1.4.x

``


* These versions are no longer actively developed or supported.
# Not applicable to Embedded and HTTP drivers

 

Transitive dependencies

The following table list transitive dependencies between specific versions of projects related to OGM. When reporting issues or asking for help on StackOverflow or neo4j-users slack channel always verify versions used (e.g through mvn dependency:tree) and report them as well.

 

Spring Boot Version Spring Data Neo4j Version Neo4j OGM Version Bolt Version

1.5.3

4.2.3

2.1.2

1.1.0

1.4.6

4.1.7

2.0.5

1.0.6

 

Dependency Management

For building an application, your build automation tool needs to be configured to include the Neo4j OGM dependencies.

The OGM dependencies consist of neo4j-ogm-core, together with the relevant dependency declarations on the driver you want to use. OGM 2.1 provides support for connecting to Neo4j by configuring one of the following Drivers:

  • neo4j-ogm-http-driver – Uses HTTP to communicate between the OGM and a remote Neo4j instance.
  • neo4j-ogm-embedded-driver – Connects directly to the Neo4j database engine.
  • neo4j-ogm-bolt-driver – Uses native Bolt protocol to communicate between the OGM and a remote Neo4j instance.

If you’re not using a particular driver, you don’t need to declare it.

Neo4j OGM projects can be built using Maven, Gradle or any other build system that utilises Maven’s artifact repository structure.

For updated information kindly check: https://neo4j.com/developer/neo4j-ogm/

 

THANKS


 

 

 

 

About Author

Author Image
Mohit Sharma

Mohit is a bright Web App Developer and has good knowledge of Java.

Request for Proposal

Name is required

Comment is required

Sending message..