Hi David, unfortunately I think the root cause of the failure to commit is lost in the thrown exception. You can have a look in messages.log for the cause, or just attach you message.log here with a rough timestamp when this happened. When we dig up that root cause we can argue if it's strange and unexpected, or not :)
Btw, whether anything actually gets committed or not is dictated by the presence of write operations in there, but the code path in the transaction manager is the same. 2013/12/31 M. David Allen <allen.m.da...@gmail.com> > As I'm updating code for 2.0.0, I'm wrapping a lot of old code that only > serves to inspect a graph (not update it) in transactions, using the new > idiom: > > try ( Transaction tx = myDb.beginTx() ) { > accessSomeData(); > tx.finish(); > } > > After the try block finishes, I'm getting exceptions of this form: > > org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction > at > org.neo4j.kernel.TopLevelTransaction.close(TopLevelTransaction.java:134) > at blah.blah.mycode > > Caused by: javax.transaction.RollbackException: Failed to commit, > transaction rolled back > at > org.neo4j.kernel.impl.transaction.TxManager.rollbackCommit(TxManager.java:623) > at > org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:402) > at > org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:122) > at > org.neo4j.kernel.TopLevelTransaction.close(TopLevelTransaction.java:124) > ... 70 more > > What are the various causes of this, and how can I troubleshoot them? > > This is all code that ran without any problem on 1.9.3 - so I'm thinking I > should look into areas of difference there. > > Sometimes this happens when iterating over the results of executing a > cypher query from java. Sometimes it happens when I'm using a > TraversalDescription I built. > > Strangely enough, since these are read-only operations, I can *ignore* the > failure exception, and everything seems peachy (the data came back from the > graph database just fine). I'm just wondering why they're happening. > > Any suggestions or pointers? > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.