Apache Jena
  1. Apache Jena
  2. JENA-199

BindingBase can hit a null pointer exception on certain queries against a TDB dataset

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TDB

      Description

      This is a strange bug which I have been unable to reduce to a more minimal example than the files I will attach so I apologize for that.

      Essentially the problem manifests as follows, when using a TDB dataset with Fuseki some queries will return blank output if the user requests Text, CSV or TSV. When using XML/JSON the output is fine.

      The test data used is SP2B 10k, two of the SP2B queries that exhibit this issue are as follows:

      PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      PREFIX foaf: <http://xmlns.com/foaf/0.1/>
      PREFIX bench: <http://localhost/vocabulary/bench/>
      PREFIX dc: <http://purl.org/dc/elements/1.1/>

      SELECT DISTINCT ?person ?name
      WHERE

      { ?article rdf:type bench:Article . ?article dc:creator ?person . ?inproc rdf:type bench:Inproceedings . ?inproc dc:creator ?person . ?person foaf:name ?name }

      And:

      PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
      PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      PREFIX foaf: <http://xmlns.com/foaf/0.1/>
      PREFIX dc: <http://purl.org/dc/elements/1.1/>

      SELECT DISTINCT ?name
      WHERE {
      ?erdoes rdf:type foaf:Person .
      ?erdoes foaf:name "Paul Erdoes"^^xsd:string .

      { ?document dc:creator ?erdoes . ?document dc:creator ?author . ?document2 dc:creator ?author . ?document2 dc:creator ?author2 . ?author2 foaf:name ?name FILTER (?author!=?erdoes && ?document2!=?document && ?author2!=?erdoes && ?author2!=?author) }

      UNION

      { ?document dc:creator ?erdoes. ?document dc:creator ?author. ?author foaf:name ?name FILTER (?author!=?erdoes) }

      }

      I will attach these as files as well for convenience.

      If you run Fuseki with a memory dataset using the --mem option, load this data and run the same queries the Text, CSV and TSV output works fine. This implies that there is something in the TDB code related to its return of results or iterators which somehow causes the Text, CSV and TSV formatters to either error or to believe that they have no results to format.

      I'm completely unfamiliar with the TDB codebase so I haven't attempted to discover what the cause of the issue is though I may poke around anyway

      1. TDBEmptyOutput.java
        3 kB
        Rob Vesse
      2. 8.txt
        0.8 kB
        Rob Vesse
      3. 5b.txt
        0.4 kB
        Rob Vesse
      4. sp2b10k.nt
        1.55 MB
        Rob Vesse

        Activity

        Rob Vesse created issue -
        Rob Vesse made changes -
        Field Original Value New Value
        Attachment sp2b10k.nt [ 12511174 ]
        Attachment 5b.txt [ 12511175 ]
        Attachment 8.txt [ 12511176 ]
        Rob Vesse made changes -
        Summary Result Sets returned from TDB give empty output for Text, CSV and TSV formats for certain queries BindingBase can hit a null pointer exception on certain queries against a TDB dataset
        Rob Vesse made changes -
        Attachment TDBEmptyOutput.java [ 12511307 ]
        Rob Vesse made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Not A Problem [ 8 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Rob Vesse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development