java - 带有neo4j嵌入式版本2.3.8的NotInTransactionException

java - 带有neo4j嵌入式版本2.3.8的NotInTransactionException,第1张

我已将neo4j嵌入式版本1.9.8升级到2.3.8,后期升级服务器已启动。但是从下面的代码获取NotInTransactionException。索引似乎有些问题

 protected Record getNext() throws Exception {
    if (hits == null) {
        hits = index.query(query);
    }
    T next = hits.next();
    if (next == null) {
        return finished();
    } else {
        return nodeToRecord.call(next);
    }
}

以下是错误。我的班级名称是GraphNodeIterator

Unexpected error : org.neo4j.graphdb.NotInTransactionException
at org.neo4j.kernel.impl.core.ThreadToStatementContextBridge.assertInUnterminatedTransaction(ThreadToStatementContextBridge.java:72)
at org.neo4j.kernel.impl.core.ThreadToStatementContextBridge.getTopLevelTransactionBoundToThisThread(ThreadToStatementContextBridge.java:106)
at org.neo4j.kernel.impl.core.ThreadToStatementContextBridge.getKernelTransactionBoundToThisThread(ThreadToStatementContextBridge.java:113)
at org.neo4j.kernel.impl.core.ThreadToStatementContextBridge.get(ThreadToStatementContextBridge.java:65)
at org.neo4j.kernel.impl.coreapi.LegacyIndexProxy.query(LegacyIndexProxy.java:363)
at com.nodalgeography.graph.GraphNodeIterator.getNext(GraphNodeIterator.java:32)
at com.nodalgeography.graph.GraphNodeIterator.getNext(GraphNodeIterator.java:14)
at com.googlecode.totallylazy.iterators.StatefulIterator.hasNext(StatefulIterator.java:23)
at com.googlecode.totallylazy.iterators.StatefulIterator.next(StatefulIterator.java:36)
at com.googlecode.totallylazy.Computation.call(Computation.java:80)
at com.googlecode.totallylazy.callables.LazyCallable.get(LazyCallable.java:19)
at com.googlecode.totallylazy.Lazy.call(Lazy.java:22)
at com.googlecode.totallylazy.Computation.isEmpty(Computation.java:121)
at com.googlecode.totallylazy.iterators.SegmentIterator.hasNext(SegmentIterator.java:18)

最佳答案:

0 个答案:

没有答案
本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复