1

我们在 90% 的 rdf 查询中使用http://www.openrdf.org/contrib/lucenesail#搜索。我想看看是否有人知道如何修复文件/sesame-data/openrdf-sesame/logs/main.log 中的错误“org.openrdf.query.QueryEvaluationException: java.util.ConcurrentModificationException”。当错误发生时,紧随其后的是 rdf 服务器 CPU 使用率迅速升高,rdf 服务器无响应并且需要重新启动服务器。它似乎是随机发生的,与特定查询无关。我想知道该错误是否可能与使用 lucenesail 与 rdf 数据交互有关,因为直到将查询转换为 lucenesail 查询之后我们才看到这些错误。将感谢您的意见。感谢您的时间。这是一个完整的错误跟踪:

    [ERROR] 2016-09-08 10:07:38,826 [repositories/NwsRDFRepo] LuceneTripleSource: Error getting statements for http://acfews.com/content/41806958 http://acfews.com/content/type "Image"^^<htt
    p://www.w3.org/2001/XMLSchema#token>java.util.ConcurrentModificationException: null
            at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:886)
            at java.util.ArrayList$Itr.next(ArrayList.java:836)
            at org.openrdf.model.impl.TreeModel.choose(TreeModel.java:474)
            at org.openrdf.model.impl.TreeModel.matchPattern(TreeModel.java:406)
            at org.openrdf.model.impl.TreeModel.contains(TreeModel.java:250)
            at org.openrdf.sail.nativerdf.MemoryOverflowModel.contains(MemoryOverflowModel.java:127)
            at org.openrdf.model.impl.FilteredModel.contains(FilteredModel.java:157)
            at org.openrdf.model.impl.AbstractModel.isEmpty(AbstractModel.java:58)
            at org.openrdf.sail.base.SailDatasetImpl.difference(SailDatasetImpl.java:286)
            at org.openrdf.sail.base.SailDatasetImpl.getStatements(SailDatasetImpl.java:265)
            at org.openrdf.sail.base.DelegatingSailDataset.getStatements(DelegatingSailDataset.java:79)
            at org.openrdf.sail.base.DelegatingSailDataset.getStatements(DelegatingSailDataset.java:79)
            at org.openrdf.sail.base.UnionSailDataset.getStatements(UnionSailDataset.java:111)
            at org.openrdf.sail.base.SailSourceConnection.getStatementsInternal(SailSourceConnection.java:258)
            at org.openrdf.sail.helpers.SailConnectionBase.getStatements(SailConnectionBase.java:328)
            at org.openrdf.sail.lucene.LuceneTripleSource.getStatements(LuceneTripleSource.java:284)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:517)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:226)
            at org.openrdf.query.algebra.evaluation.iterator.JoinIterator.<init>(JoinIterator.java:54)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:861)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:824)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:232)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.<init>(LeftJoinIterator.java:65)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:883)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:827)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:232)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.<init>(LeftJoinIterator.java:65)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:883)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:827)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:232)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:88)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:80)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:80)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:80)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
            at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at info.aduna.iteration.FilterIteration.findNextElement(FilterIteration.java:79)
            at info.aduna.iteration.FilterIteration.hasNext(FilterIteration.java:54)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at info.aduna.iteration.LimitIteration.hasNext(LimitIteration.java:73)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at org.openrdf.query.QueryResults.report(QueryResults.java:155)
            at org.openrdf.http.server.repository.TupleQueryResultView.renderInternal(TupleQueryResultView.java:110)
            at org.openrdf.http.server.repository.QueryResultView.render(QueryResultView.java:84)
            at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
            at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
            at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
            at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)

    [ERROR] 2016-09-08 10:07:38,827 [repositories/NwsRDFRepo] Query evaluation error
    org.openrdf.query.QueryEvaluationException: java.util.ConcurrentModificationException
            at org.openrdf.sail.lucene.LuceneTripleSource.getStatements(LuceneTripleSource.java:294)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:517)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:226)
            at org.openrdf.query.algebra.evaluation.iterator.JoinIterator.<init>(JoinIterator.java:54)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:861)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:824)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:232)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.<init>(LeftJoinIterator.java:65)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:883)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:827)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:232)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.<init>(LeftJoinIterator.java:65)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:883)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:827)
            at org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:232)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:88)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:80)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:80)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:80)
            at org.openrdf.query.algebra.evaluation.iterator.LeftJoinIterator.getNextElement(LeftJoinIterator.java:33)
            at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
            at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
            at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
            at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at info.aduna.iteration.FilterIteration.findNextElement(FilterIteration.java:79)
            at info.aduna.iteration.FilterIteration.hasNext(FilterIteration.java:54)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at info.aduna.iteration.LimitIteration.hasNext(LimitIteration.java:73)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
            at org.openrdf.query.QueryResults.report(QueryResults.java:155)
            at org.openrdf.http.server.repository.TupleQueryResultView.renderInternal(TupleQueryResultView.java:110)
            at org.openrdf.http.server.repository.QueryResultView.render(QueryResultView.java:84)
            at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
            at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
            at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
            at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)
    Caused by: java.util.ConcurrentModificationException: null
            at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:886)
            at java.util.ArrayList$Itr.next(ArrayList.java:836)
            at org.openrdf.model.impl.TreeModel.choose(TreeModel.java:474)
            at org.openrdf.model.impl.TreeModel.matchPattern(TreeModel.java:406)
            at org.openrdf.model.impl.TreeModel.contains(TreeModel.java:250)
            at org.openrdf.sail.nativerdf.MemoryOverflowModel.contains(MemoryOverflowModel.java:127)
            at org.openrdf.model.impl.FilteredModel.contains(FilteredModel.java:157)
            at org.openrdf.model.impl.AbstractModel.isEmpty(AbstractModel.java:58)
            at org.openrdf.sail.base.SailDatasetImpl.difference(SailDatasetImpl.java:286)
            at org.openrdf.sail.base.SailDatasetImpl.getStatements(SailDatasetImpl.java:265)
            at org.openrdf.sail.base.DelegatingSailDataset.getStatements(DelegatingSailDataset.java:79)
            at org.openrdf.sail.base.DelegatingSailDataset.getStatements(DelegatingSailDataset.java:79)
            at org.openrdf.sail.base.UnionSailDataset.getStatements(UnionSailDataset.java:111)
            at org.openrdf.sail.base.SailSourceConnection.getStatementsInternal(SailSourceConnection.java:258)
            at org.openrdf.sail.helpers.SailConnectionBase.getStatements(SailConnectionBase.java:328)
            at org.openrdf.sail.lucene.LuceneTripleSource.getStatements(LuceneTripleSource.java:284)
            ... 70 common frames omitted
4

1 回答 1

1

我还没有看到这个特定的错误,但是您使用的 Lucene Sail 版本看起来很旧 - 当它仍然是一个单独的项目时。

Lucene Sail 已与 RDF4J 集成,并进行了广泛的改进和更新。我的建议是升级到最新版本的 RDF4J并切换到内置的 Lucene Sail。有关如何将现有 Sesame 安装升级到 RDF4J 的更多信息,请参阅迁移指南

于 2016-10-02T00:57:42.883 回答