3

I'm trying to insert bulk data into Neo4j using a script. After a while the script breaks with the following Exception.

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

The same query works from console and restarting the script from the same point where exception occurred works again for a while until it fails again. Catching the Exception and making the script sleep for few seconds does not break the script.

Any suggestions on what might be happening here?

UPDATE: Added a sample query

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;
Gunjan
  • 1,177
  • 2
  • 11
  • 22
  • 1
    Can you post the Cypher query that is causing the error? – Josh Adell Oct 21 '13 at 06:23
  • I have multiple scripts for inserting data about users, reviews, photos etc.. and its happening for all of them. As far as I can tell, this seems to be independent of the actual query because (1) Happens for multiple scripts (2) The same query works after a sleep Added a sample query – Gunjan Oct 21 '13 at 06:48
  • probably some character encoding issue. could you find the specific line of data where it breaks? (you can find it simply by looking at the highest node in the crashed db and compare it to the data) – ulkas Oct 27 '13 at 19:28

0 Answers0