插入数据时出现Neo4j异常

时间:2013-10-19 10:27:35

标签: neo4j cypher graph-databases neo4jphp

我正在尝试使用脚本将批量数据插入Neo4j。一段时间后,脚本会出现以下异常。

PHP Fatal error:  Uncaught exception 'Everyman\Neo4j\Exception' with message 'Unable to execute query [400]:
Headers: Array
(
    [Content-Length] =>  3031
    [Content-Type] =>  application/json; charset=UTF-8
    [Access-Control-Allow-Origin] =>  *
    [Server] =>  Jetty(6.1.25)
)
Body: Array
(
    [message] => An identifier is used with different types. The identifier `  UNNAMED2` is used both as Relationship and as Collection
    [exception] => CypherTypeException
    [fullname] => org.neo4j.cypher.CypherTypeException
    [stacktrace] => Array
        (
            [0] => org.neo4j.cypher.internal.symbols.SymbolTable.add(SymbolTable.scala:33)
            [1] => org.neo4j.cypher.internal.symbols.SymbolTable$$anonfun$checkNoOverlapsExist$1.apply(SymbolTable.scala:47)
            [2] => org.neo4j.cypher.internal.symbols.SymbolTable$$anonfun$checkNoOverlapsExist$1.apply(SymbolTable.scala:46)
            [3] => scala.collection.immutable.Map$Map1.foreach(Map.scala:109)
            [4] => org.neo4j.cypher.internal.symbols.Symbol in phar:///var/www/zomato9/application/library/neo4jphp.phar/lib/Everyman/Neo4j/Command.php on line 116

同样的查询在控制台上工作,并从发生异常的同一点重新启动脚本一段时间再次工作,直到它再次失败。捕获异常并使脚本休眠几秒钟不会破坏脚本。

有关此处可能发生的事情的任何建议吗?

更新:添加了示例查询

START a = node:?("?:?"), b = node:?("?:?")
            MATCH a-[c1:ACTIVITY_LIST*]->z, z-[r1:ACTIVITY_LIST]->y
            WHERE z.TIMESTAMP >= '.$time.' AND y.TIMESTAMP < '.$time.'
            CREATE n = {?}, clist = {COMMENT_ID: ''}, a-[:IN_?]->n, n-[:OUT_?]->b, n-[:COMMENT_LIST]->clist, z-[:ACTIVITY_LIST]->n, n-[:ACTIVITY_LIST]->y
            DELETE r1
            RETURN n;

0 个答案:

没有答案