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

SPARQL Update parsing fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Jena 4.0.0
    • ARQ
    • None

    Description

      My project depends on 3.18.0-SNAPSHOT.

      In a test, the following code snippet recently stopped working:

      String sparqlQuery =
      "PREFIX msg: <https://w3id.org/won/message#> \n" 
      + "DELETE { \n" + " GRAPH ?g {?s ?p ?o} \n" "} \n" 
      + "WHERE { \n" + " GRAPH ?g { ?s ?p ?o } \n" 
      + " { SELECT (GROUP_CONCAT(?content; separator=\" \") as ?contentGraphs) \n" 
      + " WHERE { GRAPH <urn:x-arq:UnionGraph> { ?msg msg:content ?content } \n" 
      + " }\n" 
      + "} \n" 
      + "FILTER (!contains(?contentGraphs,str(?g))) \n" 
      + "} \n";
      
      UpdateRequest update = UpdateFactory.create(sparqlQuery);
      

      The following exception is thrown:

      org.apache.jena.sparql.ARQInternalErrorException: Parser query object is null
      
      at org.apache.jena.sparql.lang.SPARQLParserBase.pushQuery(SPARQLParserBase.java:216)
        at org.apache.jena.sparql.lang.SPARQLParserBase.startSubSelect(SPARQLParserBase.java:222)  
        at org.apache.jena.sparql.lang.arq.ARQParser.GroupGraphPattern(ARQParser.java:2316)  
        at org.apache.jena.sparql.lang.arq.ARQParser.GroupOrUnionGraphPattern(ARQParser.java:2876)  
        at org.apache.jena.sparql.lang.arq.ARQParser.GraphPatternNotTriples(ARQParser.java:2501)  
        at org.apache.jena.sparql.lang.arq.ARQParser.GroupGraphPatternSub(ARQParser.java:2393)  
        at org.apache.jena.sparql.lang.arq.ARQParser.GroupGraphPattern(ARQParser.java:2324)  
        at org.apache.jena.sparql.lang.arq.ARQParser.Modify(ARQParser.java:1876)  
        at org.apache.jena.sparql.lang.arq.ARQParser.Update1(ARQParser.java:1641)  
        at org.apache.jena.sparql.lang.arq.ARQParser.Update(ARQParser.java:1573)  
        at org.apache.jena.sparql.lang.arq.ARQParser.UpdateUnit(ARQParser.java:61)  
        at org.apache.jena.sparql.lang.ParserARQUpdate.executeParse(ParserARQUpdate.java:42)  
        at org.apache.jena.sparql.lang.UpdateParser.parse(UpdateParser.java:46)  
        at org.apache.jena.update.UpdateFactory.make(UpdateFactory.java:87)  
        at org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:78)  
        at org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:56)  
        at org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:46)  
        at won.utils.goals.GoalInstantiationProducer.<init>(GoalInstantiationProducer.java:67)  
      
       

      I did not find any related discussions or changes, so I suspect this is an unintended side effect of some change, hence the classification as a bug. Please excuse if there is something I overlooked.

      Attachments

        Activity

          People

            andy Andy Seaborne
            fkleedorfer Florian Kleedorfer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: