Skip to content

Upgrade to Neo4j Ogm 3.1.1 #13999

@georgwittberger

Description

@georgwittberger

I am reporting a bug which occurred when I upgraded my project from Spring Boot version 2.0.3.RELEASE to version 2.0.4.RELEASE.

I am using Spring Data Neo4j in the project and include the spring-boot-starter-data-neo4j dependency.
Since Spring Boot version 2.0.4 the starter seems to provide Spring Data Neo4j version 5.0.9.RELEASE. The POM of Spring Data Neo4j defines the Neo4j OGM version 3.0.4 to be used, see here: https://github.com/spring-projects/spring-data-neo4j/blob/5.0.9.RELEASE/pom.xml
But the BOM of Spring Boot 2.0.4 defines the Neo4j OGM version 3.1.0, see here: https://github.com/spring-projects/spring-boot/blob/v2.0.4.RELEASE/spring-boot-project/spring-boot-dependencies/pom.xml

The really annoying issue here is that this is not only a "formal" mismatch but I encountered a weird runtime error with this new version constellation. When querying a Spring Data repository with a query method like findByUserId(String userId) I suddenly got the following exception:

java.lang.ClassNotFoundException: org.neo4j.ogm.cypher.Filter$NestedPathSegment

Looking into the problem I found out that the inner class NestedPathSegment exists in the Neo4j OGM version up to 3.0.4, see here: https://github.com/neo4j/neo4j-ogm/blob/v3.0.4/core/src/main/java/org/neo4j/ogm/cypher/Filter.java
But then it suddenly disappeared in Neo4j OGM version 3.1.0 which is managed by Spring Boot, see here: https://github.com/neo4j/neo4j-ogm/blob/v3.1.0/core/src/main/java/org/neo4j/ogm/cypher/Filter.java

Perhaps this is the reason why Spring Data Neo4j project did not move to that version so far.

I workaround the issue by overriding the Neo4j OGM version to force usage of 3.0.4 at the moment, to be compliant with Spring Data. I do it in gradle.properties:

neo4j-ogm.version=3.0.4

I am unsure if that issue is correct at your address because also the Neo4j OGM project does not seem to be consistent with their implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions