Uploaded image for project: 'Marmotta (Retired)'
  1. Marmotta (Retired)
  2. MARMOTTA-298

NullPointerException submitting a SPARQL Query

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0-incubating
    • Fix Version/s: 3.1-incubating
    • Component/s: Platform
    • Labels:

      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.

        Attachments

          Activity

            People

            • Assignee:
              wikier Sergio Fernández
              Reporter:
              wikier Sergio Fernández
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified