Showing results for 
Search instead for 
Did you mean: 

Graph Algorithm - A* algorithm returns java.lang.ArrayIndexOutOfBoundsException: -1

Node Link

Hey all, I'm trying to follow this talk by Will Lyon and Craig Taverner - I've loaded an OSM Map extract using this OSM Importer for Neo4j and have managed to construct the routing graph and the point-of-interest graph. I'm now attempting to route by running the following query (essentially calling as mentioned in the talk):

MATCH (a:PointOfInterest) WHERE = 'from_this_location'
MATCH (b:PointOfInterest) WHERE = 'to_this_location'
CALL,b,'distance','lat','lon',{relationshipQuery:'ROUTE', nodeQuery:'Routable', direction:'BOTH', defaultValue:1.0})
YIELD nodeId, cost
MATCH (n) WHERE id(n)=nodeId
RETURN COLLECT({lat:n.location.latitude, lon:n.location.longitude}) AS route

However, the following error is returned:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure ``: Caused by: java.lang.ArrayIndexOutOfBoundsException: -1

I've tried this on the following docker images to no avail:

  • Neo4j 3.5.5 Enterprise (with graph algorithms 3.5.7) and
  • Neo4j 3.5.9 Enterprise (with graph algorithms 3.5.9)

Any idea what may be the issue - am I missing something or is this likely a bug?