Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2293

SPARQL Update: DatasetGraphOne: NPE when COPY or MOVE to named graph

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 4.4.0
    • Jena 4.5.0
    • None
    • None

    Description

      When executing SPARQL Update requests against a dataset that does not automatically create new graphs, COPY or MOVE operations with a non-existing graph as the target will result in a NullPointerException. The same happens when adding SILENT.

      I would expect these requests to result in UpdateExceptions, with a message pointing out the non-existing graph. Or nothing in the case of SILENT.

      The attached JUnit 4 test demonstrates this by running queries against a DatasetGraphOne:

      COPY DEFAULT TO <http://example.org/no-such-graph>
      COPY SILENT DEFAULT TO <http://example.org/no-such-graph>
      MOVE DEFAULT TO <http://example.org/no-such-graph>
      MOVE SILENT DEFAULT TO <http://example.org/no-such-graph>

      Each request produces an NPE.

      Attachments

        1. SPARQLUpdateTest.java
          2 kB
          Richard Cyganiak

        Activity

          People

            andy Andy Seaborne
            cygri Richard Cyganiak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: