RDF4J верстак сбой федеративного запроса SPARQL
На моей машине запущен Tomcat с развернутым сервером RDF4J и рабочей средой RDF4J. Я пытаюсь выполнить федеративный запрос, чтобы присоединиться к двум хранилищам Native Java Store (NativeStore1 и NativeStore2) и связать данные из них.
Прямо сейчас я пытаюсь получить что-нибудь от NativeStore2 из запроса на NatvieStore1, но это не удается. Я запускаю федеративный запрос прямо из рабочей среды. Обычные запросы работают нормально.
Есть ли лучший способ сделать это, или я просто делаю это неправильно? Любая помощь очень ценится.
Мой SPARQL-запрос от NativeStore1:
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 Status 500 - Ошибка оценки запроса: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerException
Тип Статус отчета
Сообщение об ошибке оценки запроса: 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 ответ
Проблема должна быть исправлена с помощью rdf4j 2.2.2, см. Github https://github.com/eclipse/rdf4j/issues/812 а проблему сообщили о sethdippold https://github.com/eclipse/rdf4j/issues/824