neo4j-contrib / java-rest-binding

Java Bindings for the Neo4J Server REST API, providing an implementation of GraphDatabaseService
Other
120 stars 72 forks source link

Getting a 502 Bad gateway while saving nodes - RANDOMLY #76

Open mica16 opened 9 years ago

mica16 commented 9 years ago
Internal server error, for (POST) [/api/meetings/participate] ->
play.api.Application$$anon$1: Execution exception[[RuntimeException: Error reading as JSON '<html><body><h1>502 Bad Gateway</h1>
2014-11-15T17:32:11.834142+00:00 app[web.2]: The server returned an invalid or incomplete response.
2014-11-15T17:32:11.834143+00:00 app[web.2]: </body></html>
2014-11-15T17:32:11.834144+00:00 app[web.2]: ']]
2014-11-15T17:32:11.834146+00:00 app[web.2]:    at play.api.Application$class.handleError(Application.scala:293) ~[com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
2014-11-15T17:32:11.834148+00:00 app[web.2]:    at play.api.DefaultApplication.handleError(Application.scala:399) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
2014-11-15T17:32:11.834150+00:00 app[web.2]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:264) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
2014-11-15T17:32:11.834152+00:00 app[web.2]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:264) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
2014-11-15T17:32:11.834153+00:00 app[web.2]:    at scala.Option.map(Option.scala:145) [org.scala-lang.scala-library-2.10.4.jar:na]
2014-11-15T17:32:11.834155+00:00 app[web.2]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:264) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
2014-11-15T17:32:11.834156+00:00 app[web.2]: Caused by: java.lang.RuntimeException: Error reading as JSON '<html><body><h1>502 Bad Gateway</h1>
2014-11-15T17:32:11.834158+00:00 app[web.2]: The server returned an invalid or incomplete response.
2014-11-15T17:32:11.834159+00:00 app[web.2]: </body></html>
2014-11-15T17:32:11.834160+00:00 app[web.2]: '
2014-11-15T17:32:11.834162+00:00 app[web.2]:    at org.neo4j.rest.graphdb.util.JsonHelper.readJson(JsonHelper.java:57) ~[org.neo4j.neo4j-rest-graphdb-2.0.1.jar:na]
2014-11-15T17:32:11.834163+00:00 app[web.2]:    at org.neo4j.rest.graphdb.util.JsonHelper.jsonToSingleValue(JsonHelper.java:62) ~[org.neo4j.neo4j-rest-graphdb-2.0.1.jar:na]
2014-11-15T17:32:11.834165+00:00 app[web.2]:    at org.neo4j.rest.graphdb.RequestResult.toEntity(RequestResult.java:114) ~[org.neo4j.neo4j-rest-graphdb-2.0.1.jar:na]
2014-11-15T17:32:11.834166+00:00 app[web.2]:    at org.neo4j.rest.graphdb.RequestResult.toMap(RequestResult.java:120) ~[org.neo4j.neo4j-rest-graphdb-2.0.1.jar:na]
2014-11-15T17:32:11.834209+00:00 app[web.2]:    at org.neo4j.rest.graphdb.ExecutingRestAPI.getNodeById(ExecutingRestAPI.java:97) ~[org.neo4j.neo4j-rest-graphdb-2.0.1.jar:na]
2014-11-15T17:32:11.834211+00:00 app[web.2]:    at org.neo4j.rest.graphdb.RestAPIFacade.getNodeById(RestAPIFacade.java:59) ~[org.neo4j.neo4j-rest-graphdb-2.0.1.jar:na]
2014-11-15T17:32:11.834213+00:00 app[web.2]: Caused by: org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
2014-11-15T17:32:11.834214+00:00 app[web.2]:  at [Source: java.io.StringReader@1e0cea19; line: 1, column: 2]
2014-11-15T17:32:11.834216+00:00 app[web.2]:    at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) ~[org.codehaus.jackson.jackson-core-asl-1.9.7.jar:1.9.7]
2014-11-15T17:32:11.834218+00:00 app[web.2]:    at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521) ~[org.codehaus.jackson.jackson-core-asl-1.9.7.jar:1.9.7]
2014-11-15T17:32:11.834219+00:00 app[web.2]:    at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442) ~[org.codehaus.jackson.jackson-core-asl-1.9.7.jar:1.9.7]
2014-11-15T17:32:11.834221+00:00 app[web.2]:    at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1198) ~[org.codehaus.jackson.jackson-core-asl-1.9.7.jar:1.9.7]
2014-11-15T17:32:11.834222+00:00 app[web.2]:    at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485) ~[org.codehaus.jackson.jackson-core-asl-1.9.7.jar:1.9.7]
2014-11-15T17:32:11.834224+00:00 app[web.2]:    at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770) ~[org.codehaus.jackson.jackson-mapper-asl-1.9.7.jar:1.9.7]

It happens randomly in a few cases, so I don't think it's due to my code.

Any idea?

1708krishna commented 4 years ago

Could anyone please address this issue. These kinds of random issues with neo4j is causing people to migrate to alternative graph DBs

alexfrieden commented 4 years ago

This project is now no longer supported. They recommend switching to the java driver https://neo4j.com/developer/java/