2013-08-16 55 views
1

的請求:的Neo4j REST一批非法路徑索引2字符:./{0}/properties/

[{ 
    "method": "GET", 
    "to": "/node/1890", 
    "id": 0 
    }, 
{ 
    "method": "PUT", 
    "to": "{0}/properties/Name", 
    "body": "NewName", 
    "id": 1 
}] 

的迴應:

{ 
    "message": "Illegal character in path at index 2: ./{0}/properties/Name", 
    "exception": "IllegalArgumentException", 
    "fullname": "java.lang.IllegalArgumentException", 
    "stacktrace": ["java.net.URI.create(URI.java:859)", "java.net.URI.resolve(URI.java:1043)", "org.neo4j.server.rest.batch.BatchOperations.calculateTargetUri(BatchOperations.java:100)", "org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:181)", "org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:159)", "org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)", "org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:117)", "org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:72)", "java.lang.reflect.Method.invoke(Method.java:601)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)"], 
    "cause": { 
     "message": "Illegal character in path at index 2: ./{0}/properties/Name", 
     "exception": "URISyntaxException", 
     "stacktrace": ["java.net.URI$Parser.fail(URI.java:2829)", "java.net.URI$Parser.checkChars(URI.java:3002)", "java.net.URI$Parser.parseHierarchical(URI.java:3086)", "java.net.URI$Parser.parse(URI.java:3044)", "java.net.URI.<init>(URI.java:595)", "java.net.URI.create(URI.java:857)", "java.net.URI.resolve(URI.java:1043)", "org.neo4j.server.rest.batch.BatchOperations.calculateTargetUri(BatchOperations.java:100)", "org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:181)", "org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:159)", "org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)", "org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:117)", "org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:72)", "java.lang.reflect.Method.invoke(Method.java:601)", "org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)"], 
     "fullname": "java.net.URISyntaxException" 
    } 
} 

這裏有什麼問題嗎? 在messages.log或任何其他日誌中沒有錯誤。不知道爲什麼日誌是空的。我不得不關閉X-Stream頭來獲取這些信息。

現在我知道了,既然我已經知道節點的ID,我可以直接引用它,而且我會。但是,似乎這是一個應該起作用的問題。

回答

-1

我想對第二請求的URL應該是

/node/{0}/properties/foo 
+0

不工作 - 「消息」:「:./node/{0}/properties/Name在指數7路徑中具有非法字符」 , – LameCoder