1

我在我的机器上运行了 Tomcat,并部署了 RDF4J 服务器和 RDF4J 工作台。我正在尝试运行联合查询以加入两个本机 Java 存储(NativeStore1 和 NativeStore2)并链接来自它们的数据。

现在,我正试图通过对 NatvieStore1 的查询从 NativeStore2 中取回任何东西,但它失败了。我直接从工作台运行联合查询。常规查询工作正常。

有没有更好的方法来做到这一点,还是我做错了?很感谢任何形式的帮助。

我来自 NativeStore1 的 SPARQL 查询:

select ?a ?b ?name 
    where
    {
      ?a ?b ?name.
      SERVICE <http://localhost:8080/rdf4j-server/repositories/NativeStore2> {
          ?a ?b ?name1. 
      }
    }

给定 RDF4j 中的错误(这是直接在查询框下抛出的 html 字符串):

Apache Tomcat/7.0.77 - 错误报告

HTTP 状态 500 - 查询评估错误:org.eclipse.rdf4j.query.QueryEvaluationException:java.lang.NullPointerException

类型状态报告

消息查询评估错误:org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerException

描述服务器遇到一个内部错误,阻止它完成这个请求。

Apache Tomcat/7.0.77

RDF4J 服务器日志:

Query evaluation errororg.eclipse.rdf4j.query.QueryEvaluationException: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerExceptionCaused by: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerExceptionCaused by: java.lang.NullPointerException: null

at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:47) 
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:19) 
at org.eclipse.rdf4j.common.iteration.QueueIteration.checkException(QueueIteration.java:185) 
at org.eclipse.rdf4j.common.iteration.QueueIteration.getNextElement(QueueIteration.java:133) 
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90) 
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52) 
at org.eclipse.rdf4j.query.algebra.evaluation.federation.JoinExecutorBase.getNextElement(JoinExecutorBase.java:122) 
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90) 
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52) 
at org.eclipse.rdf4j.common.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:68) 
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:63) 
at org.eclipse.rdf4j.sail.base.SailClosingIteration.hasNext(SailClosingIteration.java:89) 
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:63) 
at org.eclipse.rdf4j.sail.helpers.SailBaseIteration.hasNext(SailBaseIteration.java:48) 
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:63) 
at org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:256) 
at org.eclipse.rdf4j.http.server.repository.TupleQueryResultView.renderInternal(TupleQueryResultView.java:100) 
at org.eclipse.rdf4j.http.server.repository.QueryResultView.render(QueryResultView.java:64) 
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244) 
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027) 
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971) 
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) 
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) 
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) 
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) 
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) 
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) 
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2549) 
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2538) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
at java.lang.Thread.run(Unknown Source) 
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:47) 
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:19) 
at org.eclipse.rdf4j.common.iteration.QueueIteration.checkException(QueueIteration.java:185) 
at org.eclipse.rdf4j.common.iteration.QueueIteration.handleClose(QueueIteration.java:172) 
at org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration.close(AbstractCloseableIteration.java:51) 
at org.eclipse.rdf4j.common.iteration.QueueIteration.checkException(QueueIteration.java:181) 
... 48 common frames omitted 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.getService(StrictEvaluationStrategy.java:225) 
at org.eclipse.rdf4j.query.algebra.evaluation.federation.ServiceJoinIterator.handleBindings(ServiceJoinIterator.java:68) 
at org.eclipse.rdf4j.query.algebra.evaluation.federation.JoinExecutorBase.run(JoinExecutorBase.java:67) 
at org.eclipse.rdf4j.query.algebra.evaluation.federation.ServiceJoinIterator.<init>(ServiceJoinIterator.java:45) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:911) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:881) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:240) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:783) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:673) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:237) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:706) 
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:237) 
at org.eclipse.rdf4j.sail.base.SailSourceConnection.evaluateInternal(SailSourceConnection.java:246) 
at org.eclipse.rdf4j.sail.helpers.AbstractSailConnection.evaluate(AbstractSailConnection.java:267) 
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:54) 
at org.eclipse.rdf4j.http.server.repository.RepositoryController.handleRequestInternal(RepositoryController.java:208) 
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147) 
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50) 
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) 
... 30 common frames omitted
4

1 回答 1

1

问题应由 rdf4j 2.2.2 解决,请参阅 github https://github.com/eclipse/rdf4j/issues/812和sethdipold 报告的问题https://github.com/eclipse/rdf4j/issues/824

于 2017-06-09T06:41:31.403 回答