I am trying to check whether neo4j-rest-binding supports transactional http end point.
neo4j-rest-binding works for me only without transactions.
Transaction tx = graphDb.beginTx();
engine.query("CREATE (person1 { personId: 1, started: 1361708546 })", Collections.EMPTY_MAP);
tx.success();
Exception in thread "main" java.lang.RuntimeException: Error reading as JSON ''
at org.neo4j.rest.graphdb.util.JsonHelper.readJson(JsonHelper.java:57)
at org.neo4j.rest.graphdb.util.JsonHelper.jsonToSingleValue(JsonHelper.java:62)
at org.neo4j.rest.graphdb.RequestResult.toEntity(RequestResult.java:114)
at org.neo4j.rest.graphdb.RequestResult.toMap(RequestResult.java:120)
at org.neo4j.rest.graphdb.batch.RecordingRestRequest.toMap(RecordingRestRequest.java:135)
at org.neo4j.rest.graphdb.ExecutingRestAPI.query(ExecutingRestAPI.java:544)
at org.neo4j.rest.graphdb.ExecutingRestAPI.query(ExecutingRestAPI.java:564)
at org.neo4j.rest.graphdb.RestAPIFacade.query(RestAPIFacade.java:234)
at org.neo4j.rest.graphdb.query.RestCypherQueryEngine.query(RestCypherQueryEngine.java:50)
at Test.neo4jRestFacade(Test.java:284)
at Test.main(Test.java:48)
Caused by: java.io.EOFException: No content to map to Object due to end of input
at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2775)
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863)
at org.neo4j.rest.graphdb.util.JsonHelper.readJson(JsonHelper.java:55)
... 10 more
Am I doing something wrong or neo4j-rest-binding is not ready to use with transactions?
I have also tried executeBatch with cypher queries (without transactions) but it gives me similar exception about empty JSON.