Cause of neo4j IndexOutOfBoundsException on getRelationships()

梦想与她 提交于 2019-12-13 02:38:40

问题


This is happening in neo4j version 2.3.0-M02

Why might this code ....

Iterable<Relationship> rels = node.getRelationships( ... any various args ... );
for (Relationship rel : rels) {
    // Some computation
}

... cause this stack trace ?

Caused by: java.lang.IndexOutOfBoundsException
    at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.setOffset(MuninnPageCursor.java:410)
    at org.neo4j.kernel.impl.store.RelationshipGroupStore.getRecord(RelationshipGroupStore.java:117)
    at org.neo4j.kernel.impl.store.RelationshipGroupStore.getRecord(RelationshipGroupStore.java:77)
    at org.neo4j.kernel.impl.api.StoreRelationshipIterable$DenseIterator.<init>(StoreRelationshipIterable.java:214)
    at org.neo4j.kernel.impl.api.StoreRelationshipIterable.iterator(StoreRelationshipIterable.java:96)
    at org.neo4j.kernel.impl.api.StoreRelationshipIterable.iterator(StoreRelationshipIterable.java:76)
    at org.neo4j.kernel.impl.api.store.DiskLayer.nodeListRelationships(DiskLayer.java:241)
    at org.neo4j.kernel.impl.api.store.CacheLayer.nodeListRelationships(CacheLayer.java:424)
    at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeGetRelationships(StateHandlingStatementOperations.java:925)
    at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeGetRelationships(StateHandlingStatementOperations.java:933)
    at org.neo4j.kernel.impl.api.ConstraintEnforcingEntityOperations.nodeGetRelationships(ConstraintEnforcingEntityOperations.java:426)
    at org.neo4j.kernel.impl.api.OperationsFacade.nodeGetRelationships(OperationsFacade.java:361)
    at org.neo4j.kernel.impl.core.NodeProxy$2.iterator(NodeProxy.java:194)
    at org.neo4j.kernel.impl.core.NodeProxy$2.iterator(NodeProxy.java:186)

Update:

  • Issue #5691 on Github
  • Same bug again in version 2.3.0

回答1:


You should upgrade to Neo4j 2.3.0-M03.

Milestone releases tend to be unstable and you are using old one. It is known that M02 has bugs, and lot of them are fixed in M03.

So, upgrade and check if this works for you.



来源:https://stackoverflow.com/questions/32846687/cause-of-neo4j-indexoutofboundsexception-on-getrelationships

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!