Neo4jPHP交易错误

时间:2014-01-13 14:51:54

标签: php neo4j neo4jphp

我正在使用最新版本的jadell的Neo4JPHP库和Neo4j版本2.当我尝试提交2个不同的cypher查询时,它会给我一个InvalidFormat错误。代码是:

    $transaction = $this->client->beginTransaction();
    $queryA = new Everyman\Neo4j\Cypher\Query($this->client, "start n=node(485183) return id(n) as neoid, n.mongoid as mongoid");
    $queryB = new Everyman\Neo4j\Cypher\Query($this->client, "start n=node(485182) return id(n) as neoid, n.mongoid as mongoid");
    try{
        $results = $transaction->addStatements(array($queryA, $queryB), true);
    }
    catch( Exception $e){
        echo "<pre>";
        print_r( $e->getMessage());
        die;
    }

    return $results;

它给出了一个例外并打印出来:

Error in transaction [200]:
Headers: Array
(
    [Content-Encoding] =>  UTF-8
    [Content-Type] =>  application/json
    [Access-Control-Allow-Origin] =>  *
    [Transfer-Encoding] =>  chunked
    [Server] =>  Jetty(9.0.5.v20130815)
)
Body: Array
(
    [results] => Array
        (
        )

    [errors] => Array
        (
            [0] => Array
                (
                    [code] => Neo.ClientError.Request.InvalidFormat
                    [message] => Unable to deserialize request: Can not deserialize instance of java.util.LinkedHashMap out of START_ARRAY token
 at [Source: org.eclipse.jetty.server.HttpConnection$Input@62427798{HttpChannelOverHttp@79b9ce8d{r=2,a=DISPATCHED,uri=/db/data/transaction/commit},HttpConnection@15a7c96a{FILLING},g=HttpGenerator{s=START},p=HttpParser{s=END,270 of 270}}; line: 1, column: 95]
                )

        )

)

Google和StackOverflow上没有关于此问题的信息。

0 个答案:

没有答案