RDF4J工作台失败SPARQL联合查询

时间:2017-05-10 14:56:14

标签: sparql sesame rdf4j federated-queries

我在我的机器上运行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

< b>类型状态报告

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

description 服务器遇到内部错误,无法完成此请求。

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

1 个答案:

答案 0 :(得分:1)

问题应该由rdf4j 2.2.2修复,请参阅github https://github.com/eclipse/rdf4j/issues/812和sethdippold报告的问题https://github.com/eclipse/rdf4j/issues/824