Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
3.0-incubating
Description
From a user request from the users' mailing list http://markmail.org/message/lnaxpe2ifijwmifk
I have detected an important bug in the SPARQL Select endpoint, which returns an error when html is requested:
13:29:54.792 ERROR - null
java.lang.NullPointerException: null
at org.apache.marmotta.platform.sparql.services.sparqlio.sparqlhtml.SPARQLResultsHTMLWriter.startQueryResult(SPARQLResultsHTMLWriter.java:80) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.openrdf.query.QueryResults.report(QueryResults.java:153) ~[sesame-query-2.7.5.jar:na]
at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:76) ~[sesame-repository-sail-2.7.5.jar:na]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.query(SparqlServiceImpl.java:254) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.access$200(SparqlServiceImpl.java:71) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:133) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:122) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
13:29:54.794 ERROR - error while evaluating query: {}
org.openrdf.query.QueryEvaluationException: error while writing query tuple result:
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.query(SparqlServiceImpl.java:256) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.access$200(SparqlServiceImpl.java:71) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:133) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:122) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Caused by: org.openrdf.query.TupleQueryResultHandlerException: java.lang.NullPointerException
at org.apache.marmotta.platform.sparql.services.sparqlio.sparqlhtml.SPARQLResultsHTMLWriter.startQueryResult(SPARQLResultsHTMLWriter.java:83) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.openrdf.query.QueryResults.report(QueryResults.java:153) ~[sesame-query-2.7.5.jar:na]
at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:76) ~[sesame-repository-sail-2.7.5.jar:na]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.query(SparqlServiceImpl.java:254) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
... 8 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.marmotta.platform.sparql.services.sparqlio.sparqlhtml.SPARQLResultsHTMLWriter.startQueryResult(SPARQLResultsHTMLWriter.java:80) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
... 11 common frames omitted
13:35:09.904 ERROR - null
java.lang.NullPointerException: null
at org.apache.marmotta.platform.sparql.services.sparqlio.sparqlhtml.SPARQLResultsHTMLWriter.startQueryResult(SPARQLResultsHTMLWriter.java:80) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.openrdf.query.QueryResults.report(QueryResults.java:153) ~[sesame-query-2.7.5.jar:na]
at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:76) ~[sesame-repository-sail-2.7.5.jar:na]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.query(SparqlServiceImpl.java:254) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.access$200(SparqlServiceImpl.java:71) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:133) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:122) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
13:35:09.907 ERROR - error while evaluating query: {}
org.openrdf.query.QueryEvaluationException: error while writing query tuple result:
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.query(SparqlServiceImpl.java:256) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.access$200(SparqlServiceImpl.java:71) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:133) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl$2.call(SparqlServiceImpl.java:122) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Caused by: org.openrdf.query.TupleQueryResultHandlerException: java.lang.NullPointerException
at org.apache.marmotta.platform.sparql.services.sparqlio.sparqlhtml.SPARQLResultsHTMLWriter.startQueryResult(SPARQLResultsHTMLWriter.java:83) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
at org.openrdf.query.QueryResults.report(QueryResults.java:153) ~[sesame-query-2.7.5.jar:na]
at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:76) ~[sesame-repository-sail-2.7.5.jar:na]
at org.apache.marmotta.platform.sparql.services.sparql.SparqlServiceImpl.query(SparqlServiceImpl.java:254) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
... 8 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.marmotta.platform.sparql.services.sparqlio.sparqlhtml.SPARQLResultsHTMLWriter.startQueryResult(SPARQLResultsHTMLWriter.java:80) ~[marmotta-sparql-3.1.0-incubating-SNAPSHOT.jar:3.1.0-incubating-SNAPSHOT]
... 11 common frames omitted
That's because all tests over that endpoint never request html. And for our testing, we always use snorql, so the bug got away our control until now.