我正在尝试删除一个节点。
我知道要首先删除节点,我必须删除关系。
MATCH (n:`Dummy`)
WHERE n.uuid='1aa41234-aaaa-xxxx-ffff-xxxx11xx0x62'
OPTIONAL MATCH (n)-[r]-()
delete n,r
但它不起作用
javax.transaction.HeuristicRollbackException: Failed to commit transaction Transaction(80074, owner:"qtp10775679-13464")[STATUS_NO_TRANSACTION,Resources=1], transaction rolled back ---> Transaction handler failed.
最佳答案
错误消息表明 transaction event handler's beforeCommit方法抛出异常。如果发生这种情况,事务将被回滚。
也许data/graph.db/messages.log
包含堆栈跟踪。如果没有,我建议将 beforeCommit()
的内容包装到一个 try catch block 中,该 block 捕获任何异常,打印其堆栈跟踪并重新抛出它。
关于javax.transaction.HeuristicRollbackException : Failed to commit transaction Transaction,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31781718/