I have Tomcat running on my machine with RDF4J server and RDF4J workbench deployed. I am trying to run a federated query to join two Native Java Stores (NativeStore1 and NativeStore2) and link data from them.
Right now, I am trying to get anything back from NativeStore2 from a query on NatvieStore1, but it is failing. I am running the federated query directly from the workbench. Regular queries work fine.
Is there a better way to do this, or am I just doing it wrong? Any help is very much appreciated.
My SPARQL query from NativeStore1:
select ?a ?b ?name
where
{
?a ?b ?name.
SERVICE <http://localhost:8080/rdf4j-server/repositories/NativeStore2> {
?a ?b ?name1.
}
}
Given error in RDF4j (this is a string of html that gets thrown out directly under the query box):
Apache Tomcat/7.0.77 - Error report
HTTP Status 500 - Query evaluation error: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerException
type Status report
message Query evaluation error: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.
Apache Tomcat/7.0.77
RDF4J Server log:
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
Issue should be fixed by rdf4j 2.2.2 see github https://github.com/eclipse/rdf4j/issues/812 and the issue reported by sethdippold https://github.com/eclipse/rdf4j/issues/824