On 22/05/18 18:24, Bart van Leeuwen wrote:
Yes, simply imported through POM

The suggested modification doesn't have any effect.


Initialization can be tracked with DEBUG_INIT:

 public static void main(String[] args) throws Exception {
        JenaSystem.DEBUG_INIT = true;
        JenaSystem.init();
        ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
        ...

I can't run your setup so does this throw an exception?

If it does, something interfered with Jena startup, which uses service loader files as resources in the jar files (repacking needs to take account of this).

If it does not, and it NPEs later, something interfered with the ARQ global context because that is the same line from ParserBase.java:292

You should get output to stderr like:

JenaSystem.init - start
Found:
  InitTDB              [40]
  InitRIOT             [20]
  InitARQ              [30]
  InitTDB2             [42]
  InitJenaCore         [10]
... etc

(the order may be different)

    Andy


Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


twitter: @semanticfire
tel. +31(0)6-53182997
Netage B.V.
http://netage.nl <http://netage.nl/>
Esdoornstraat 3
3461ER Linschoten
The Netherlands




From: Andy Seaborne <a...@apache.org>
To: users@jena.apache.org
Date: 22-05-2018 18:55
Subject: Re: Update Query Parsing error
------------------------------------------------------------------------



Is this untouched Jena jars downloaded from maven central?

Try putting this in:

    public static void main(String[] args) throws Exception {
    ***   JenaSystem.init();*
         ...


    Andy



On 22/05/18 16:27, Bart van Leeuwen wrote:
 > Sample Code:
 >
 > #############################
 > package com.example.netage;
 >
 > import com.complexible.stardog.api.Connection;
 > import com.complexible.stardog.api.ConnectionConfiguration;
 > import com.complexible.stardog.jena.SDJenaFactory;
 >
 > import org.apache.jena.update.UpdateExecutionFactory;
 > import org.apache.jena.update.UpdateFactory;
 >
 >
 > public class App {
 >
 >         public static void main(String[] args) throws Exception {
 >
 >       try (Connection aConnection =
 > ConnectionConfiguration.to("insight").server("server")
 >       .credentials("user", "pass").connect()) {
 >
 >               String query = "DELETE { Graph ?g {"
 >               + "?resultset
 > <http://vocab.resc.info/insight#organization>
 >  <http://data.resc.info/data/stations/BrandweerAmsterdamAmstelland>}}
 > WHERE { Graph ?g {  "
 >               + "?resultset a
 > <http://data.resc.info/insight#Resultset> . "
 >               + "?resultset  <http://purl.org/dc/terms/identifier>
 > \"00b36dabd8f846f6b53375abf5fe8ad9\" . "
 >               + "}}";
 >
 > UpdateExecutionFactory.create(UpdateFactory.create(query),
 > SDJenaFactory.createDataset(aConnection))
 >               .execute();
 >       }
 >         }
 > }
 > #############################
 >
 >
 > Met Vriendelijke Groet / With Kind Regards
 > Bart van Leeuwen
 >
 >
 > twitter: @semanticfire
 > tel. +31(0)6-53182997
 > Netage B.V.
 > http://netage.nl <http://netage.nl/><http://netage.nl/>
 > Esdoornstraat 3
 > 3461ER Linschoten
 > The Netherlands
 >
 >
 >
 >
 > From: Andy Seaborne <a...@apache.org>
 > To: users@jena.apache.org
 > Date: 22-05-2018 17:20
 > Subject: Re: Update Query Parsing error
 > ------------------------------------------------------------------------
 >
 >
 >
 > Bart - it does not like an issue with the update but somehow system
 > initialization has not happened.
 >
 > Was there a log message as well?
 >
 > How are you running the update? What's the application code look like?
 >
 >     Andy
 >
 >
 > On 22/05/18 14:24, Bart van Leeuwen wrote:
 > > Hi,
 > >
 > > On Jena 3.7.0
 > >
 > > The following the query ( which is accepted by Stardog on the console )
 > >
 > > DELETE { Graph ?g { ?resultset
 > > <http://vocab.resc.info/insight#organization>
 > >  <http://data.resc.info/data/stations/BrandweerAmsterdamAmstelland>}}
 > > WHERE { Graph ?x {
 > >         ?resultset a <http://data.resc.info/insight#Resultset> .
 > >         ?resultset  <http://purl.org/dc/terms/identifier>
 > > "00b36dabd8f846f6b53375abf5fe8ad9"
 > > }}
 > >
 > > causes the following error:
 > >
 > > Exception in thread "main" org.apache.jena.query.QueryException
 > >         at
 > >
> org.apache.jena.sparql.lang.ParserSPARQL11Update._parse(ParserSPARQL11Update.java:84)
 > >
 > >         at
 > >
> org.apache.jena.sparql.lang.ParserSPARQL11Update.parse$(ParserSPARQL11Update.java:40)
 > >
 > >         at
 > > org.apache.jena.sparql.lang.UpdateParser.parse(UpdateParser.java:39)
 > >         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 com.complexible.stardog.examples.jena.App.main(App.java:90)
 > > Caused by: java.lang.NullPointerException
 > >         at org.apache.jena.query.ARQ.isTrue(ARQ.java:650)
 > >         at
 > > org.apache.jena.sparql.lang.ParserBase.<init>(ParserBase.java:292)
 > >         at
 > >
> org.apache.jena.sparql.lang.SPARQLParserBase.<init>(SPARQLParserBase.java:43)
 > >
 > >         at
 > >
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11Base.<init>(SPARQLParser11Base.java:22)
 > >
 > >         at
 > >
> org.apache.jena.sparql.lang.sparql_11.SPARQLParser11.<init>(SPARQLParser11.java:4974)
 > >
 > >         at
 > >
> org.apache.jena.sparql.lang.ParserSPARQL11Update._parse(ParserSPARQL11Update.java:57)
 > >
 > >         ... 7 more
 > >
 > > Met Vriendelijke Groet / With Kind Regards
 > > Bart van Leeuwen
 > >
 > >
 > > twitter: @semanticfire
 > > tel. +31(0)6-53182997
 > > Netage B.V.
> > http://netage.nl <http://netage.nl/><http://netage.nl/><http://netage.nl/>
 > > Esdoornstraat 3
 > > 3461ER Linschoten
 > > The Netherlands
 >
 >
 >



Reply via email to