简体   繁体   中英

Neo4J REST API Call Error - Error reading as JSON ''

this is a newo4j rest api call related error - from my java code I'm making a REST API call to a remote Neo4J Database by passing query and parameters, the query being executed is as below

*MERGE (s:Sequence {name:'CommentSequence'}) ON CREATE SET s.current = 1 ON MATCH SET s.current=s.current+1 WITH s.current as sequenceCounter MERGE (cmnt01:Comment {text: {text}, datetime:{datetime}, type:{type}}) SET cmnt01.id = sequenceCounter WITH cmnt01 MATCH (g:Game {game_id:{gameid}}),(b:Block {block_id:{bid}, game_id:{gameid}}),(u:User {email_id:{emailid}}) MERGE (b)-[:COMMENT]->(cmnt01)<-[:COMMENT]-(u)*

Basically this query is generating a sequence number at run time and sets the 'CommentId' property of the Comment Node as this Sequence number before attaching the comment node to a Game's block ie For every comment added by the user I'm adding a sequence number as it's id.

This is working for almost 90% of the cases but there are couple of cases in a day when it fails with below error

ERROR com.exectestret.dao.BaseGraphDAO - Query execution error:**Error reading as JSON ''**

Why does the Neo4J Query not return any proper error code ? It just says error reading as JSON ''.

Neo4J Version is

Neo4j Community Edition 2.2.1

Thanks, Deepesh

It gets HTML back and can't read it as JSON, but should output the failure HTML can you check the log output for that and share it too?

Also check your graph.db/messages.log and data/log/console.log for any error messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM