我已将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$2.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)