我試圖用Cypher語句將幾個節點和邊插入到Neo4j圖中。在執行查詢後,我從服務器收到一個不太有意義的scala.MatchError
響應。我在版本2.2.0中使用Neo4j。Cypher上的「scala.MatchError」CREATE查詢
這是我的Cypher查詢(請注意,這原本是一個多較大查詢的一部分,但是這是我已經收窄至):
CREATE (node55549aefd9aa7:Arg {prop_node55549aefd9aa7})
參數此查詢(以JSON符號):
{
"prop_node55549aefd9aa7": {
"startLine": 48,
"endLine": 51,
"type": 1,
"byRef": false,
"variadic": false,
"name": "query",
"default": null,
"__node_id": "node55549aefd9aa7"
}
}
這是錯誤的反應是我得到:
scala.MatchError: (default,null) (of class scala.Tuple2)
at org.neo4j.cypher.internal.compiler.v2_2.mutation.CreateNode$$anonfun$org$$$$c818f6fea869bbb25aedba7c5faae2d$$$$e$$fromAnyToLiteral$1$1.apply(CreateNode.scala:40)
at org.neo4j.cypher.internal.compiler.v2_2.mutation.CreateNode$$anonfun$org$$$$c818f6fea869bbb25aedba7c5faae2d$$$$e$$fromAnyToLiteral$1$1.apply(CreateNode.scala:40)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
// Several dozen lines of stack trace omitted
我正在使用everyman/neo4jphp庫從我的PHP應用程序訪問Neo4j。我懷疑相關性不大的公司,不過,因爲使用命令行上簡單的捲曲呼叫直接談論REST API時的誤差也可重現:
curl -D - \
--user neo4j:XXXX \
-H "content-type: application/json" \
-d'{"statements":[{"statement":"CREATE (node55549aefd9aa7:Arg {prop_node55549aefd9aa7})", "parameters": {"prop_node55549aefd9aa7": {"startLine": 48, "endLine": 51, "type": 1, "byRef": false, "variadic": false, "name": "query", "default": null, "__node_id": "node55549aefd9aa7"}}}]}' \
http://localhost:7474/db/data/transaction/commit
這個錯誤是什麼意思,爲什麼我收到它?