创建新节点时的ResourceAcquisitionFailedException

时间:2014-09-23 16:44:10

标签: neo4j

我工作的应用程序的用户正在使用neo4j 2.1.1报告此特定异常。这似乎是零星的,难以复制。这是一个已知问题,还是与任何特定的误用或错误相关联?我很乐意提供有关如何重现这一点的更多信息,但我不能。

创建此堆栈跟踪的代码非常简单:

Node n = null;

try (Transaction tx = db.beginTx()) {           
    n = db.createNode();
    // Lots of extra code snipped here because it never makes it that far...
} 

似乎在createNode()方法上抛出了异常:

SEVERE: Servlet.service() for servlet [Jersey REST Service] in context with path [/plus] threw exception
org.neo4j.kernel.impl.persistence.ResourceAcquisitionFailedException: TM encountered an unexpected error condition.
        at org.neo4j.kernel.impl.persistence.PersistenceManager$ResourceHolder.enlist(PersistenceManager.java:412)
        at org.neo4j.kernel.impl.persistence.PersistenceManager$ResourceHolder.forWriting(PersistenceManager.java:394)
        at org.neo4j.kernel.impl.api.KernelTransactionImplementation.ensureWriteTransaction(KernelTransactionImplementation.java:190)
        at org.neo4j.kernel.impl.api.KernelTransactionImplementation.upgradeToDataTransaction(KernelTransactionImplementation.java:220)
        at org.neo4j.kernel.impl.api.KernelStatement.dataWriteOperations(KernelStatement.java:83)
        at org.neo4j.kernel.InternalAbstractGraphDatabase.createNode(InternalAbstractGraphDatabase.java:1107)
        at org.mitre.provenance.db.neo4j.Neo4JStorage.store(Neo4JStorage.java:1101)

(这里有大量与servlet相关的异常消息)

在底部,有这样的:

Caused by: javax.transaction.RollbackException: Tx status is: STATUS_MARKED_ROLLBACK
        at org.neo4j.kernel.impl.transaction.TransactionImpl.enlistResource(TransactionImpl.java:191)
        at org.neo4j.kernel.impl.persistence.PersistenceManager$ResourceHolder.enlist(PersistenceManager.java:405)
        ... 45 more

1 个答案:

答案 0 :(得分:1)

自2.1.1以来已经应用了很多修复,因此请确保在最新的稳定版本(截至今天的2.1.4)上运行。如果问题仍然存在于2.1.4,请考虑在https://github.com/neo4j/neo4j/issues/new

处提交github问题