neo4j-graph-analytics / book

67 stars 88 forks source link

Failed to invoke procedure `gds.alpha.shortestPath.astar.stream`: Caused by: java.lang.NullPointerException #4

Open itaybraha opened 4 years ago

itaybraha commented 4 years ago

When submitting the query for A* shortest path on page 59, I get a NullPointerException.

MATCH (source:Place {id: "Den Haag"}), (destination:Place {id: "London"})
CALL gds.alpha.shortestPath.astar.stream({
    startNode: source,
    endNode: destination,
    nodeProjection: "*",
    relationshipProjection: {
        all: {
            type: "*",
            properties: "distance",
            orientation: "UNDIRECTED"
        }
    },
    relationshipWeightProperty: "distance",
    propertyKeyLat: "latitude",
    propertyKeyLon: "longitude"
})
YIELD nodeId, cost
RETURN gds.util.asNode(nodeId).id AS place, cost;
abonec commented 3 years ago

The same here

suxizhi commented 3 years ago

Is the problem solved? How to fix it

xNiux commented 2 years ago

Have the same problem. It appear only if a path is found. If I change start or end by an nonexistent entry, there is no error (but no result for sure !)