neo4j cypher json给出了http 500服务器错误

时间:2014-03-27 10:12:16

标签: json curl neo4j

我需要在neo4j中创建一些节点,为此我在我的c ++程序中使用json和curl。

这是我收到的请求和回复。

About to connect() to localhost port 7474 (#0)
Trying ::1...
Connection refused
Trying 127.0.0.1...
Connected to localhost (127.0.0.1) port 7474 (#0)
 POST /db/data/cypher HTTP/1.1
Host: localhost:7474
Accept: */*
Content-Type: application/json
Content-Length: 4294967295
Expect: 100-continue

HTTP/1.1 100 Continue
{
   "params" : {
      "props" : {
         "LocalAsNumber" : 0,
         "NodeDescription" : "10TiMOS-B-4.0.R2 ",
         "NodeId" : "10.227.28.95",
         "NodeName" : "BLR_WAO_SARF7"
      }
   },
   "query" : "CREATE (n:Router { props }) RETRUN n"
}


HTTP/1.1 500 Server Error
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 0
Server: Jetty(9.0.5.v20130815)
HTTP error before end of send, stop sending

关闭连接0

我总是得到“500服务器错误”。查询有问题吗?

1 个答案:

答案 0 :(得分:1)

查看您的查询:

"CREATE (n:Router { props }) RETRUN n"

它应该是RETURN:

"CREATE (n:Router { props }) RETURN n"