Search code examples
javaneo4jneo4j-apoc

Neo4j Gephi Cypher error: Error with cypher query on nodes without property "name"


This question is similar to the one asked in apoc.gephi.add doesn't work : NODE[25512922] has no property with propertyKey='name' yet, I want to add a few things: the issue is with Neo4j 3.2.12 and APOC version 3.2.0.3, if the node does not contain the property "name" (exactly this string), then it raises the error:

NODE[x] has no property with propertyKey='name'

Even if the node contains properties with the substring 'name' (example, "propertyname"), it throws the same error. On checking the code in https://raw.githubusercontent.com/neo4j-contrib/neo4j-apoc-procedures/3.2/src/main/java/apoc/gephi/Gephi.java, it looks like the last block of code in the method caption(Node n) should take care of it (the absence of a node property with string "name"). However, for some reason, it is not able to detect the substring "name" in the property names. Can someone shed some light on this issue?


Solution

  • I have made some tests on the lastest version, and everything is working.

    So I started to check the commit log of the procedure, and I have found this : https://github.com/neo4j-contrib/neo4j-apoc-procedures/commit/8b25b05fa461ae0177db1b0604f628b73f12e08d#diff-d27b3f05da2e50dbcd2c95ca367b0e65

    So it's a bug on the procedure, but it has been correted on the version 3.2.0.4. So you just have to upgrade your apoc version.