简体   繁体   English

Neo4J REST API调用错误-错误读取为JSON''

[英]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 这是一个与newo4j rest api调用相关的错误-从我的Java代码中,我通过传递查询和参数对远程Neo4J数据库进行REST API调用,正在执行的查询如下

*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. 基本上,此查询在运行时生成序列号,并将注释节点附加到游戏块之前,将注释节点的'CommentId'属性设置为此序列号,即,对于用户添加的每个注释,我都添加一个序列号因为它是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 这适用于几乎90%的案例,但是一天中有几次案例由于以下错误而失败

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

Why does the Neo4J Query not return any proper error code ? 为什么Neo4J查询未返回任何正确的错误代码? It just says error reading as JSON ''. 它只是说错误读取为JSON''。

Neo4J Version is Neo4J版本是

Neo4j Community Edition 2.2.1

Thanks, Deepesh 谢谢,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? 它会返回HTML,并且不能将其读取为JSON,但是应该输出失败的HTML,您可以检查日志输出并共享吗?

Also check your graph.db/messages.log and data/log/console.log for any error messages. 还要检查您的graph.db/messages.logdata/log/console.log是否有任何错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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