Neo4j 插入带有标签的节点时,rest API批处理终结点出现500错误
我正在尝试使用RESTAPI的批处理端点插入带有标签的节点 我点击的URL是:Neo4j 插入带有标签的节点时,rest API批处理终结点出现500错误,neo4j,Neo4j,我正在尝试使用RESTAPI的批处理端点插入带有标签的节点 我点击的URL是:http://localhost:7474/db/data/batch 有效载荷是 [{"body": {"ConceptId": "78890", "Name": "This is a node"}, "to": "/node", "method": "POST"}, {"body": "Moo", "to": "{0}/labels", "method": "POST"}] 500响应主体是: <html&
http://localhost:7474/db/data/batch
有效载荷是
[{"body": {"ConceptId": "78890", "Name": "This is a node"}, "to": "/node", "method": "POST"}, {"body": "Moo", "to": "{0}/labels", "method": "POST"}]
500响应主体是:
<html><head><title>Error</title></head><body><p><pre>Illegal character in path at index 2: ./{0}/labels</pre></p><p><pre>IllegalArgumentException
at java.net.URI.create(URI.java:859)
at java.net.URI.resolve(URI.java:1043)
at org.neo4j.server.rest.batch.BatchOperations.calculateTargetUri(BatchOperations.java:104)
at org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:193)
at org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:171)
at org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)
at org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:126)
at org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:76)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
at java.lang.Thread.run(Thread.java:724)</pre></p></body></html>
Error索引2处路径中的非法字符:./{0}/labelsIllegalArgumentException
在java.net.URI.create(URI.java:859)
位于java.net.URI.resolve(URI.java:1043)
位于org.neo4j.server.rest.batch.BatchOperations.calculateTargetUri(BatchOperations.java:104)
位于org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:193)
位于org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:171)
位于org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)
位于org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:126)
位于org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:76)
位于java.lang.reflect.Method.invoke(Method.java:606)
位于org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
运行(Thread.java:724)
据我所知,语法是正确的,根据和this等来源
有人能帮忙吗?如果相关的话,我使用的是2.1.2。David
您缺少第一个操作的作业id。试试这个:
如果第一个操作没有“id”:0,第二个操作中的{0}就无法取消引用
恩典与和平
吉姆
[{"id":0, "body": {"ConceptId": "78890", "Name": "This is a node"}, "to": "/node", "method": "POST"}, {"body": "Moo", "to": "{0}/labels", "method": "POST"}]