Neo4j http API NullPointerException

92 Views Asked by At

I am using the HTTP API to query the Neo4j server. The exact same queries with slightly different values do not work consistently. Infact the entire system breaks because of the NullPointer exception that is being thrown. Cannot figure out the root of this problem

{
       "query":"START n=node( { current_user_node } ), n1 = node( { contact_node } ) CREATE UNIQUE n-[:has_contact {device: {device_id}, name: {name} }]->(n1)",
      "params":{"current_user_node":2,"contact_node":5941,"device_id":"F1485935-48F8-4624-AF5D-67529AE91227","name":"Samir Coll "}
}

The above query returns

{
    "exception": "NullPointerException",
    "fullname": "java.lang.NullPointerException",
    "stacktrace": []
}

I tried the above query in the neo4j-shell from the command line and the query returned a null.

While

{
    "query":"START n=node( { current_user_node } ), n1 = node( { contact_node } ) CREATE UNIQUE n-[:has_contact {device: {device_id}, name: {name} }]->(n1)",
    "params":{"current_user_node":1,"contact_node":5658,"device_id":"FA2C589A-6AB5-4D78-ADED-7146CA71D0FC","name":"Jayesh New"}
}

The above returns

{ "columns": [], "data": [] }

The data is empty as the relationship already exists.

I am running neo4j 2.0.0 stable. All the nodes mentioned in the above queries are valid. I am very unsure as to how to proceed with this. Would appreciate it if someone can help with the problem.

0

There are 0 best solutions below