我试图用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
这个错误是什么意思,为什么我收到它?