neo4j-contrib / spatial

Neo4j Spatial is a library of utilities for Neo4j that faciliates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial operations on the data like searching for data within specified regions or within a specified distance of a point of interest. In addition classes are provided to expose the data to geotools and thereby to geotools enabled applications like geoserver and uDig.

Home Page:http://neo4j-contrib.github.io/spatial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Support for Neo4j Version 5

seabamirum opened this issue · comments

I migrated to Neo4j version 5.4, and noticed that spatial functions are no longer working. The getRelationships() method in Neo4j v5 now returns a ResourceIterable instead of Iterable, so a NoSuchMethodError is thrown.

https://github.com/neo4j/neo4j/blob/5.4/community/graphdb-api/src/main/java/org/neo4j/graphdb/Node.java

Caused by: org.neo4j.driver.exceptions.ClientException: Failed to invoke procedure `spatial.withinDistance`: Caused by: java.lang.NoSuchMethodError: 'java.lang.Iterable org.neo4j.graphdb.Node.getRelationships(org.neo4j.graphdb.Direction, org.neo4j.graphdb.RelationshipType[])'
	at org.neo4j.driver.internal.util.ErrorUtil.newNeo4jError(ErrorUtil.java:76) ~[neo4j-java-driver-5.4.0.jar:5.4.0-94f9c20aa48a5f4328c03953bf1bc64dab271784]

Compiled a local branch against Neo4j5 and this seems to work again. Most of the changes were related to logging. Not sure how to get this into a PR though.