6

我在 CentOS 上运行 Neo4J 1.8 嵌入式 Java 6。

在 JVM 崩溃后,我开始遇到以下一些异常:

org.neo4j.graphdb.NotFoundException: Unable to load one or more relationships from Node[1169385]. This usually happens when relationships are deleted by someone else just as we are about to load them. Please try again.
        at org.neo4j.kernel.impl.core.NodeImpl.loadMoreRelationshipsFromNodeManager(NodeImpl.java:530)
        at org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:415)
        at org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:368)
        at org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:345)
        at org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:195)
        at org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:247)
        at org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:92)
        at com.bizya.polosvc.neo4j.model.PersonImpl.getAllSelvesNoPropsLoad(PersonImpl.java:1303)
        at com.bizya.polosvc.neo4j.model.PathsFinderImpl.findPaths(PathsFinderImpl.java:189)
        at com.bizya.polosvc.neo4j.model.PathsFinderImpl.findPaths(PathsFinderImpl.java:49)
        at com.bizya.server.services.ReachabilityService.findReachabilities(ReachabilityService.java:82)
        at com.bizya.server.widget.BrowsingPageBuilder.buildAdditionalResultsModel(BrowsingPageBuilder.java:97)
        at com.bizya.server.widget.ContextBrowsingPageBuilder.buildAdditionalResultsModel(ContextBrowsingPageBuilder.java:81)
        at com.bizya.server.widget.ContextBrowsingPageBuilder.buildAdditionalResultsModel(ContextBrowsingPageBuilder.java:71)
        at com.bizya.server.widget.servlet.NetworkServlet.doGet(NetworkServlet.java:139)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at com.bizya.server.widget.servlet.MasterWidgetServlet.handleAuthorizedUser(MasterWidgetServlet.java:167)
        at com.bizya.server.widget.servlet.MasterWidgetServlet.service(MasterWidgetServlet.java:150)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:429)
        at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:384)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: Node[1169385] is neither firstNode[969258] nor secondNode[1170375] for Relationship[3477951]
        at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:167)
        at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:105)
        at org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108)
        at org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:608)
        at org.neo4j.kernel.impl.core.NodeImpl.loadMoreRelationshipsFromNodeManager(NodeImpl.java:527)
        ... 38 more

我得到了更多具有不同ID的人。

这些异常在尝试加载特定节点时是一致的,我确定我没有删除任何关系。在命令行 shell 中检查这些节点时,我得到了同样的错误(org.neo4j.graphdb.NotFoundException:无法加载一个或多个关系......)。

这似乎是某种腐败。关于如何修复它的任何建议?

4

2 回答 2

4

鉴于您在 JVM 崩溃后所做的尝试以及您一直遇到的麻烦,您可能需要调查 Neo4J 1.8 中可能导致您遇到问题的错误的可能性。这可能是由您的关系标识符引起的,就像在这种情况下一样。不幸的是,它是 1.8 版本的一个错误。您可能需要考虑升级到 1.9 或使用我发布的链接中接受的答案中建议的解决方法。

希望这会为您指明正确的方向!祝你编码好运!

于 2013-01-23T02:22:56.027 回答
0

你试过 ConsistencyCheckTool 吗?

例如,您可以使用(在 Maven 项目中)检查数据库

<groupId>org.neo4j</groupId>
<artifactId>neo4j-consistency-check</artifactId>
<version>1.9.M02</version>

作为依赖项并运行:

org.neo4j.consistency.ConsistencyCheckTool.main(databasedir)

或者下载 Neo4j 企业版并使用合适的 jars。

于 2013-01-18T16:15:34.530 回答