Re: Update Query Parsing error

2018-05-23 Thread Lorenz Buehmann
In case of Maven Shade plugin was used for (re-)packaging resp. creating
an uber-Jar, add this transformer

 
  
 


On 23.05.2018 17:36, Andy Seaborne wrote:
>
>
> On 23/05/18 16:19, Bart van Leeuwen wrote:
>> code:
>>
>> with apache-jena-libs in pom
>
> Finding only one init is a symptom repacked jars that have not the
> right ServiceLoader files.
>
> It looks like classpath has a repacked set of jena jars on it or a jar
> with jena inside it, as well as those from apache-jena-libs.  The
> repacking did not merge the ServiceLoader files.
>
> If it not a case of unjar, copy into one place and rejar.
>
> http://jena.apache.org/documentation/notes/jena-repack.html
>
> What to look for:
>
> in any jars
>
> META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle
>
> it should have multiple lines in it if it has multiple Jena jars
> combined in it (example from the Fuseki server jar):
>
> org.apache.jena.tdb.sys.InitTDB
> org.apache.jena.riot.system.InitRIOT
> org.apache.jena.sparql.system.InitARQ
> org.apache.jena.sys.InitJenaCore
> org.apache.jena.tdb2.sys.InitTDB2
> org.apache.jena.query.text.InitJenaText
> org.apache.jena.query.spatial.InitJenaSpatial
>
>     Andy
>
>>
>> ##
>> public static void main(String... args) {
>>          JenaSystem.DEBUG_INIT = true;
>>          String update = "INSERT DATA {}";
>>          UpdateFactory.create(update);
>>          System.out.println("DONE");
>>      }
>> ###
>>
>> This is what I get
>>
>> ##
>> JenaSystem.init - start
>> Found:
>>    InitTDB        [40]
>> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
>> SLF4J: Defaulting to no-operation (NOP) logger implementation
>> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinderfor
>> further details.
>> Initialization sequence:
>>    JenaInitLevel0   [0]
>>    InitTDB        [40]
>> Init: JenaInitLevel0
>> Init: InitTDB
>> TDB.init - start
>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>          at
>> org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:135)
>>          at
>> org.apache.jena.rdf.model.impl.ResourceImpl.(ResourceImpl.java:85)
>>          at
>> org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:297)
>>
>>          at
>> org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:92)
>>
>>          at org.apache.jena.vocabulary.RDFS.resource(RDFS.java:35)
>>          at org.apache.jena.vocabulary.RDFS$Init.Class(RDFS.java:68)
>>          at org.apache.jena.vocabulary.RDFS.(RDFS.java:40)
>>          at
>> org.apache.jena.shared.PrefixMapping.(PrefixMapping.java:219)
>>          at
>> org.apache.jena.sparql.core.Prologue.(Prologue.java:38)
>>          at
>> org.apache.jena.update.UpdateRequest.(UpdateRequest.java:46)
>>          at
>> org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:77)
>>          at
>> org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:56)
>>          at
>> org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:46)
>>          at com.example.netage.App.main(App.java:19)
>> Caused by: java.lang.NullPointerException
>>          at
>> org.apache.jena.tdb.sys.EnvTDB.processGlobalSystemProperties(EnvTDB.java:33)
>>
>>          at org.apache.jena.tdb.TDB.init(TDB.java:252)
>>          at org.apache.jena.tdb.sys.InitTDB.start(InitTDB.java:29)
>>          at
>> org.apache.jena.system.JenaSystem.lambda$init$2(JenaSystem.java:119)
>>          at java.util.ArrayList.forEach(ArrayList.java:1257)
>>          at
>> org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:194)
>>          at
>> org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:171)
>>          at org.apache.jena.system.JenaSystem.init(JenaSystem.java:117)
>>          at
>> org.apache.jena.graph.NodeFactory.(NodeFactory.java:32)
>>          ... 14 more
>>
>> #3
>>
>> Met Vriendelijke Groet / With Kind Regards
>> Bart van Leeuwen
>>
>>
>> twitter: @semanticfire
>> tel. +31(0)6-53182997
>> Netage B.V.
>> http://netage.nl 
>> Esdoornstraat 3
>> 3461ER Linschoten
>> The Netherlands
>>
>>
>>
>>
>> From: Andy Seaborne 
>> To: users@jena.apache.org
>> Date: 23-05-2018 17:05
>> Subject: Re: Update Query Parsing error
>> 
>>
>>
>>
>>
>>
>> On 23/05/18 12:40, Bart van Leeuwen wrote:
>>  > I mean this:
>>  >
>>  > #
>>  >
>>  > public static void main(String[] args) throws Exception {
>>  >        JenaSystem.DEBUG_INIT = true;
>>  >          JenaSystem.init();
>>  >          ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
>>  >
>>  > 
>>  >
>>  > which crashes at the ARQ line.
>>
>> And no output? DEBUG_INIT causes init() to print all details of startup.
>> The first thing the code does is print "JenaSystem.init - start" even
>> before it's got to looking for components to initialize.
>>
>> See my other code 

Re: Nodes without dereferenceable URIs

2018-05-23 Thread Conal Tuohy
I agree using HTTP URIs is not good practice in any environment where
people might expect to dereference them. For a purely local system, though,
you would be the only one inconvenienced, and you could always add a web
server to provide that service later, if you felt the need for it.

Otherwise, a different URI scheme is the answer. What I usually use in such
cases is the "tag:" URI scheme: https://tools.ietf.org/html/rfc4151


On 24 May 2018 at 00:31, Laura Morales  wrote:

> I could do that, but can it be considered good practice? Other approaches
> are
>
> - make my own URI scheme, for example 
> - make my own URN NID like  but NIDs are supposed to be
> registered
> - the info: scheme has been deprecated, so I should not use
> 
>
> I don't think RDF is providing any "best practices" suggestions or
> guidelines for a scenario like this, and it's pretty frustrating because
> not all data need to be dereferenceable and not all data need to have a
> universally unique ID such as ISBN or telephone number...
>
>
>
> Sent: Wednesday, May 23, 2018 at 3:26 PM
> From: ajs6f 
> To: users@jena.apache.org
> Subject: Re: Nodes without dereferenceable URIs
> Can you use HTTP URIs that simply don't point to an actual server? (E.g.
> http://lauras.namespace/blah/blah/blah)
>
> If no one tries to dereference them, it's fine if they don't work. If
> someone might try to dereference them, that's when you might have problems.
>


-- 
Conal Tuohy
http://conaltuohy.com/
@conal_tuohy
+61-466-324297


Re: Nodes without dereferenceable URIs

2018-05-23 Thread Laura Morales
> Maybe you can tell us more about your use case(s) and the workflow(s) with 
> which you expect to use this data?

A graph of my own documents, books, papers, that I have on my computer.

 
 

Sent: Wednesday, May 23, 2018 at 4:34 PM
From: ajs6f 
To: users@jena.apache.org
Subject: Re: Nodes without dereferenceable URIs
Maybe you can tell us more about your use case(s) and the workflow(s) with 
which you expect to use this data?

There is no general best practice here, but there are techniques that are 
better and worse for some given situation.

ajs6f

> On May 23, 2018, at 10:31 AM, Laura Morales  wrote:
>
> I could do that, but can it be considered good practice? Other approaches are
>
> - make my own URI scheme, for example 
> - make my own URN NID like  but NIDs are supposed to be 
> registered
> - the info: scheme has been deprecated, so I should not use 
>
> I don't think RDF is providing any "best practices" suggestions or guidelines 
> for a scenario like this, and it's pretty frustrating because not all data 
> need to be dereferenceable and not all data need to have a universally unique 
> ID such as ISBN or telephone number...
>
>
>
>
>
>
>
> Sent: Wednesday, May 23, 2018 at 3:26 PM
> From: ajs6f 
> To: users@jena.apache.org
> Subject: Re: Nodes without dereferenceable URIs
> Can you use HTTP URIs that simply don't point to an actual server? (E.g. 
> http://lauras.namespace/blah/blah/blah)
>
> If no one tries to dereference them, it's fine if they don't work. If someone 
> might try to dereference them, that's when you might have problems.
>
> ajs6f
>
>> On May 22, 2018, at 2:01 PM, Olivier Rossel  wrote:
>>
>> Don't use blank nodes. You will regret it in the long run.
>>
>> On Tue, May 22, 2018 at 4:43 PM, Laura Morales  wrote:
>>
>>> How can I deal with a RDF graph where I don't have dereferenceable URIs,
>>> but still need the URIs to link with other graphs? For example if I have a
>>> personal graph of documents that I only need to use for myself, what URIs
>>> should I use?
>>>
>>> Blank nodes?
>>>
>>> _:document1
>>> _:document2
>>> _:document3
>>>
>>> or do I make my own URNs?
>>>
>>> 
>>> 
>>> 
>>>
>>> what other solutions are available?
>>>
>
 


Re: Update Query Parsing error

2018-05-23 Thread Andy Seaborne



On 23/05/18 16:19, Bart van Leeuwen wrote:

code:

with apache-jena-libs in pom


Finding only one init is a symptom repacked jars that have not the right 
ServiceLoader files.


It looks like classpath has a repacked set of jena jars on it or a jar 
with jena inside it, as well as those from apache-jena-libs.  The 
repacking did not merge the ServiceLoader files.


If it not a case of unjar, copy into one place and rejar.

http://jena.apache.org/documentation/notes/jena-repack.html

What to look for:

in any jars

META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle

it should have multiple lines in it if it has multiple Jena jars 
combined in it (example from the Fuseki server jar):


org.apache.jena.tdb.sys.InitTDB
org.apache.jena.riot.system.InitRIOT
org.apache.jena.sparql.system.InitARQ
org.apache.jena.sys.InitJenaCore
org.apache.jena.tdb2.sys.InitTDB2
org.apache.jena.query.text.InitJenaText
org.apache.jena.query.spatial.InitJenaSpatial

Andy



##
public static void main(String... args) {
         JenaSystem.DEBUG_INIT = true;
         String update = "INSERT DATA {}";
         UpdateFactory.create(update);
         System.out.println("DONE");
     }
###

This is what I get

##
JenaSystem.init - start
Found:
   InitTDB        [40]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinderfor further 
details.

Initialization sequence:
   JenaInitLevel0   [0]
   InitTDB        [40]
Init: JenaInitLevel0
Init: InitTDB
TDB.init - start
Exception in thread "main" java.lang.ExceptionInInitializerError
         at 
org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:135)
         at 
org.apache.jena.rdf.model.impl.ResourceImpl.(ResourceImpl.java:85)
         at 
org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:297) 

         at 
org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:92) 


         at org.apache.jena.vocabulary.RDFS.resource(RDFS.java:35)
         at org.apache.jena.vocabulary.RDFS$Init.Class(RDFS.java:68)
         at org.apache.jena.vocabulary.RDFS.(RDFS.java:40)
         at 
org.apache.jena.shared.PrefixMapping.(PrefixMapping.java:219)

         at org.apache.jena.sparql.core.Prologue.(Prologue.java:38)
         at 
org.apache.jena.update.UpdateRequest.(UpdateRequest.java:46)
         at 
org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:77)
         at 
org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:56)
         at 
org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:46)

         at com.example.netage.App.main(App.java:19)
Caused by: java.lang.NullPointerException
         at 
org.apache.jena.tdb.sys.EnvTDB.processGlobalSystemProperties(EnvTDB.java:33) 


         at org.apache.jena.tdb.TDB.init(TDB.java:252)
         at org.apache.jena.tdb.sys.InitTDB.start(InitTDB.java:29)
         at 
org.apache.jena.system.JenaSystem.lambda$init$2(JenaSystem.java:119)

         at java.util.ArrayList.forEach(ArrayList.java:1257)
         at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:194)
         at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:171)
         at org.apache.jena.system.JenaSystem.init(JenaSystem.java:117)
         at org.apache.jena.graph.NodeFactory.(NodeFactory.java:32)
         ... 14 more

#3

Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From: Andy Seaborne 
To: users@jena.apache.org
Date: 23-05-2018 17:05
Subject: Re: Update Query Parsing error






On 23/05/18 12:40, Bart van Leeuwen wrote:
 > I mean this:
 >
 > #
 >
 > public static void main(String[] args) throws Exception {
 >        JenaSystem.DEBUG_INIT = true;
 >          JenaSystem.init();
 >          ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
 >
 > 
 >
 > which crashes at the ARQ line.

And no output? DEBUG_INIT causes init() to print all details of startup.
The first thing the code does is print "JenaSystem.init - start" even
before it's got to looking for components to initialize.

See my other code experiment which is Jena-only code - no 3rd party code.

Can you share the POM?

     Andy

 >
 >
 > Met Vriendelijke Groet / With Kind Regards
 > Bart van Leeuwen
 >
 >
 > twitter: @semanticfire
 > tel. +31(0)6-53182997
 > Netage B.V.
 > http://netage.nl 
 > Esdoornstraat 3
 > 3461ER Linschoten
 > The Netherlands
 >
 >
 >
 >
 > From: Andy Seaborne 
 > To: users@jena.apache.org
 > Date: 23-05-2018 13:39
 > Subject: Re: Update Query Parsing error
 > 

Re: Update Query Parsing error

2018-05-23 Thread Bart van Leeuwen
code:

with apache-jena-libs in pom

##
public static void main(String... args) {
JenaSystem.DEBUG_INIT = true;
String update = "INSERT DATA {}";
UpdateFactory.create(update);
System.out.println("DONE");
}
###

This is what I get

##
JenaSystem.init - start
Found:
  InitTDB  [40]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further 
details.
Initialization sequence:
  JenaInitLevel0   [0]
  InitTDB  [40]
Init: JenaInitLevel0
Init: InitTDB
TDB.init - start
Exception in thread "main" java.lang.ExceptionInInitializerError
at 
org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:135)
at 
org.apache.jena.rdf.model.impl.ResourceImpl.(ResourceImpl.java:85)
at 
org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:297)
at 
org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:92)
at org.apache.jena.vocabulary.RDFS.resource(RDFS.java:35)
at org.apache.jena.vocabulary.RDFS$Init.Class(RDFS.java:68)
at org.apache.jena.vocabulary.RDFS.(RDFS.java:40)
at 
org.apache.jena.shared.PrefixMapping.(PrefixMapping.java:219)
at org.apache.jena.sparql.core.Prologue.(Prologue.java:38)
at 
org.apache.jena.update.UpdateRequest.(UpdateRequest.java:46)
at 
org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:77)
at 
org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:56)
at 
org.apache.jena.update.UpdateFactory.create(UpdateFactory.java:46)
at com.example.netage.App.main(App.java:19)
Caused by: java.lang.NullPointerException
at 
org.apache.jena.tdb.sys.EnvTDB.processGlobalSystemProperties(EnvTDB.java:33)
at org.apache.jena.tdb.TDB.init(TDB.java:252)
at org.apache.jena.tdb.sys.InitTDB.start(InitTDB.java:29)
at 
org.apache.jena.system.JenaSystem.lambda$init$2(JenaSystem.java:119)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:194)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:171)
at org.apache.jena.system.JenaSystem.init(JenaSystem.java:117)
at org.apache.jena.graph.NodeFactory.(NodeFactory.java:32)
... 14 more

#3

Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From:   Andy Seaborne 
To: users@jena.apache.org
Date:   23-05-2018 17:05
Subject:Re: Update Query Parsing error





On 23/05/18 12:40, Bart van Leeuwen wrote:
> I mean this:
> 
> #
> 
> public static void main(String[] args) throws Exception {
>JenaSystem.DEBUG_INIT = true;
>  JenaSystem.init();
>  ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
> 
> 
> 
> which crashes at the ARQ line.

And no output? DEBUG_INIT causes init() to print all details of startup.
The first thing the code does is print "JenaSystem.init - start" even 
before it's got to looking for components to initialize.

See my other code experiment which is Jena-only code - no 3rd party code.

Can you share the POM?

 Andy

> 
> 
> Met Vriendelijke Groet / With Kind Regards
> Bart van Leeuwen
> 
> 
> twitter: @semanticfire
> tel. +31(0)6-53182997
> Netage B.V.
> http://netage.nl 
> Esdoornstraat 3
> 3461ER Linschoten
> The Netherlands
> 
> 
> 
> 
> From: Andy Seaborne 
> To: users@jena.apache.org
> Date: 23-05-2018 13:39
> Subject: Re: Update Query Parsing error
> 
> 
> 
> 
> 
> 
> On 23/05/18 12:15, Bart van Leeuwen wrote:
>  > I just tried your little addition and indeed it crashes before the 
> update.
>  > So what's next ?
> 
> To be clear here - you mean this:
> 
>   public static void main(String[] args) throws Exception {
>  JenaSystem.DEBUG_INIT = true;
>  JenaSystem.init();
>  ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
> 
> not the complete "main" below.
> 
> What got printed by DEBUG_INIT?
> 
>  Andy
> 
>  >
>  > Met Vriendelijke Groet / With Kind Regards
>  > Bart van Leeuwen
>  >
>  >
>  > twitter: @semanticfire
>  > tel. +31(0)6-53182997
>  > Netage B.V.
>  > http://netage.nl 
>  > Esdoornstraat 3
>  > 3461ER Linschoten
>  > The Netherlands
>  >
>  >
>  >
>  >
>  > From: Andy Seaborne 
>  > To: users@jena.apache.org
>  > Date: 23-05-2018 13:11
>  > Subject: Re: Update Query Parsing error
>  > 

>  >
>  >
>  

Re: Update Query Parsing error

2018-05-23 Thread Andy Seaborne

I ran with 3.7.0 (and 3.6.0 and 3.5.0)

 public static void main(String... args) {
 JenaSystem.DEBUG_INIT = true;
 String update = "INSERT DATA {}";
 UpdateFactory.create(update);
 System.out.println("DONE");
 }

and

   public static void main(String... args) {
JenaSystem.DEBUG_INIT = true;
JenaSystem.init();
ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
String update = "INSERT DATA {}";
UpdateFactory.create(update);
System.out.println("DONE");
 }

and get

JenaSystem.init - start
Found:
  InitTDB  [40]
  InitRIOT [20]
  InitARQ  [30]
  InitJenaCore [10]
  InitTDB2 [42]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for 
further details.

Initialization sequence:
  JenaInitLevel0   [0]
  InitJenaCore [10]
  InitRIOT [20]
  InitARQ  [30]
  InitTDB  [40]
  InitTDB2 [42]
Init: JenaInitLevel0
Init: InitJenaCore
JenaCore.init - start
JenaCore.init - finish
Init: InitRIOT
RIOT.init - start
RIOT.init - finish
Init: InitARQ
ARQ.init - start
ARQ.init - finish
Init: InitTDB
TDB.init - start
TDB.init - finish
Init: InitTDB2
TDB2.init - start
TDB.init - finish
JenaSystem.init - finish
DONE

the POM has:


  org.apache.jena
  apache-jena-libs
  ${ver.jena}
  pom


Andy

On 23/05/18 16:00, Bart van Leeuwen wrote:

and with 3.7 ?

Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From: ajs6f 
To: users@jena.apache.org
Date: 23-05-2018 16:24
Subject: Re: Update Query Parsing error




Runs fine for me against current master.

ajs6f

 > On May 23, 2018, at 7:40 AM, Bart van Leeuwen 
 wrote:

 >
 > I mean this:
 >
 > #
 >
 > public static void main(String[] args) throws Exception {
 >                 JenaSystem.DEBUG_INIT = true;
 >         JenaSystem.init();
 >         ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
 >
 > 
 >
 > which crashes at the ARQ line.
 >
 >
 > Met Vriendelijke Groet / With Kind Regards
 > Bart van Leeuwen
 >
 >
 > twitter: @semanticfire
 > tel. +31(0)6-53182997
 > Netage B.V.
 > http://netage.nl 
 > Esdoornstraat 3
 > 3461ER Linschoten
 > The Netherlands
 >
 >
 >
 >
 > From:        Andy Seaborne 
 > To:        users@jena.apache.org
 > Date:        23-05-2018 13:39
 > Subject:        Re: Update Query Parsing error
 >
 >
 >
 >
 >
 > On 23/05/18 12:15, Bart van Leeuwen wrote:
 > > I just tried your little addition and indeed it crashes before the 
update.

 > > So what's next ?
 >
 > To be clear here - you mean this:
 >
 >  public static void main(String[] args) throws Exception {
 >         JenaSystem.DEBUG_INIT = true;
 >         JenaSystem.init();
 >         ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
 >
 > not the complete "main" below.
 >
 > What got printed by DEBUG_INIT?
 >
 >     Andy
 >
 > >
 > > Met Vriendelijke Groet / With Kind Regards
 > > Bart van Leeuwen
 > >
 > >
 > > twitter: @semanticfire
 > > tel. +31(0)6-53182997
 > > Netage B.V.
 > > http://netage.nl 
 > > Esdoornstraat 3
 > > 3461ER Linschoten
 > > The Netherlands
 > >
 > >
 > >
 > >
 > > From: Andy Seaborne 
 > > To: users@jena.apache.org
 > > Date: 23-05-2018 13:11
 > > Subject: Re: Update Query Parsing error
 > > 


 > >
 > >
 > >
 > > This code has the same Jena sequence without the StarDog code:
 > >
 > > The stacktrace indicates an exception before parsing even starts so the
 > > update itself is not a factro.
 > >
 > >      public static void main(String... args) {
 > >          JenaSystem.DEBUG_INIT = true;
 > >          String update = "INSERT DATA {}";
 > >          UpdateFactory.create(update);
 > >          System.out.println("DONE");
 > >      }
 > >
 > > This works for me with a maven dependency on
 > > org.apache.jena:apache-jena-libs:pom:3.7.0
 > >
 > >      Andy
 > >
 > >
 >
 >





Re: Update Query Parsing error

2018-05-23 Thread Andy Seaborne



On 23/05/18 12:40, Bart van Leeuwen wrote:

I mean this:

#

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



which crashes at the ARQ line.


And no output? DEBUG_INIT causes init() to print all details of startup.
The first thing the code does is print "JenaSystem.init - start" even 
before it's got to looking for components to initialize.


See my other code experiment which is Jena-only code - no 3rd party code.

Can you share the POM?

Andy




Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From: Andy Seaborne 
To: users@jena.apache.org
Date: 23-05-2018 13:39
Subject: Re: Update Query Parsing error






On 23/05/18 12:15, Bart van Leeuwen wrote:
 > I just tried your little addition and indeed it crashes before the 
update.

 > So what's next ?

To be clear here - you mean this:

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

not the complete "main" below.

What got printed by DEBUG_INIT?

     Andy

 >
 > Met Vriendelijke Groet / With Kind Regards
 > Bart van Leeuwen
 >
 >
 > twitter: @semanticfire
 > tel. +31(0)6-53182997
 > Netage B.V.
 > http://netage.nl 
 > Esdoornstraat 3
 > 3461ER Linschoten
 > The Netherlands
 >
 >
 >
 >
 > From: Andy Seaborne 
 > To: users@jena.apache.org
 > Date: 23-05-2018 13:11
 > Subject: Re: Update Query Parsing error
 > 
 >
 >
 >
 > This code has the same Jena sequence without the StarDog code:
 >
 > The stacktrace indicates an exception before parsing even starts so the
 > update itself is not a factro.
 >
 >      public static void main(String... args) {
 >          JenaSystem.DEBUG_INIT = true;
 >          String update = "INSERT DATA {}";
 >          UpdateFactory.create(update);
 >          System.out.println("DONE");
 >      }
 >
 > This works for me with a maven dependency on
 > org.apache.jena:apache-jena-libs:pom:3.7.0
 >
 >      Andy
 >
 >




Re: Update Query Parsing error

2018-05-23 Thread Bart van Leeuwen
and with 3.7 ?

Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From:   ajs6f 
To: users@jena.apache.org
Date:   23-05-2018 16:24
Subject:Re: Update Query Parsing error



Runs fine for me against current master.

ajs6f

> On May 23, 2018, at 7:40 AM, Bart van Leeuwen 
 wrote:
> 
> I mean this: 
> 
> # 
> 
> public static void main(String[] args) throws Exception { 
> JenaSystem.DEBUG_INIT = true; 
> JenaSystem.init(); 
> ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ; 
> 
>  
> 
> which crashes at the ARQ line. 
> 
> 
> Met Vriendelijke Groet / With Kind Regards
> Bart van Leeuwen 
> 
> 
> twitter: @semanticfire 
> tel. +31(0)6-53182997 
> Netage B.V.
> http://netage.nl 
> Esdoornstraat 3 
> 3461ER Linschoten 
> The Netherlands 
> 
> 
> 
> 
> From:Andy Seaborne  
> To:users@jena.apache.org 
> Date:23-05-2018 13:39 
> Subject:Re: Update Query Parsing error 
> 
> 
> 
> 
> 
> On 23/05/18 12:15, Bart van Leeuwen wrote:
> > I just tried your little addition and indeed it crashes before the 
update.
> > So what's next ?
> 
> To be clear here - you mean this:
> 
>  public static void main(String[] args) throws Exception {
> JenaSystem.DEBUG_INIT = true;
> JenaSystem.init();
> ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
> 
> not the complete "main" below.
> 
> What got printed by DEBUG_INIT?
> 
> Andy
> 
> > 
> > Met Vriendelijke Groet / With Kind Regards
> > Bart van Leeuwen
> > 
> > 
> > twitter: @semanticfire
> > tel. +31(0)6-53182997
> > Netage B.V.
> > http://netage.nl 
> > Esdoornstraat 3
> > 3461ER Linschoten
> > The Netherlands
> > 
> > 
> > 
> > 
> > From: Andy Seaborne 
> > To: users@jena.apache.org
> > Date: 23-05-2018 13:11
> > Subject: Re: Update Query Parsing error
> > 

> > 
> > 
> > 
> > This code has the same Jena sequence without the StarDog code:
> > 
> > The stacktrace indicates an exception before parsing even starts so 
the
> > update itself is not a factro.
> > 
> >  public static void main(String... args) {
> >  JenaSystem.DEBUG_INIT = true;
> >  String update = "INSERT DATA {}";
> >  UpdateFactory.create(update);
> >  System.out.println("DONE");
> >  }
> > 
> > This works for me with a maven dependency on
> > org.apache.jena:apache-jena-libs:pom:3.7.0
> > 
> >  Andy
> > 
> > 
> 
> 





Re: Nodes without dereferenceable URIs

2018-05-23 Thread ajs6f
Maybe you can tell us more about your use case(s) and the workflow(s) with 
which you expect to use this data?

There is no general best practice here, but there are techniques that are 
better and worse for some given situation.

ajs6f

> On May 23, 2018, at 10:31 AM, Laura Morales  wrote:
> 
> I could do that, but can it be considered good practice? Other approaches are
> 
> - make my own URI scheme, for example 
> - make my own URN NID like  but NIDs are supposed to be 
> registered
> - the info: scheme has been deprecated, so I should not use 
> 
> I don't think RDF is providing any "best practices" suggestions or guidelines 
> for a scenario like this, and it's pretty frustrating because not all data 
> need to be dereferenceable and not all data need to have a universally unique 
> ID such as ISBN or telephone number...
> 
> 
> 
> 
>  
>  
> 
> Sent: Wednesday, May 23, 2018 at 3:26 PM
> From: ajs6f 
> To: users@jena.apache.org
> Subject: Re: Nodes without dereferenceable URIs
> Can you use HTTP URIs that simply don't point to an actual server? (E.g. 
> http://lauras.namespace/blah/blah/blah)
> 
> If no one tries to dereference them, it's fine if they don't work. If someone 
> might try to dereference them, that's when you might have problems.
> 
> ajs6f
> 
>> On May 22, 2018, at 2:01 PM, Olivier Rossel  wrote:
>> 
>> Don't use blank nodes. You will regret it in the long run.
>> 
>> On Tue, May 22, 2018 at 4:43 PM, Laura Morales  wrote:
>> 
>>> How can I deal with a RDF graph where I don't have dereferenceable URIs,
>>> but still need the URIs to link with other graphs? For example if I have a
>>> personal graph of documents that I only need to use for myself, what URIs
>>> should I use?
>>> 
>>> Blank nodes?
>>> 
>>> _:document1
>>> _:document2
>>> _:document3
>>> 
>>> or do I make my own URNs?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> what other solutions are available?
>>> 
>  



Re: Nodes without dereferenceable URIs

2018-05-23 Thread Laura Morales
I could do that, but can it be considered good practice? Other approaches are

- make my own URI scheme, for example 
- make my own URN NID like  but NIDs are supposed to be 
registered
- the info: scheme has been deprecated, so I should not use 

I don't think RDF is providing any "best practices" suggestions or guidelines 
for a scenario like this, and it's pretty frustrating because not all data need 
to be dereferenceable and not all data need to have a universally unique ID 
such as ISBN or telephone number...




 
 

Sent: Wednesday, May 23, 2018 at 3:26 PM
From: ajs6f 
To: users@jena.apache.org
Subject: Re: Nodes without dereferenceable URIs
Can you use HTTP URIs that simply don't point to an actual server? (E.g. 
http://lauras.namespace/blah/blah/blah)

If no one tries to dereference them, it's fine if they don't work. If someone 
might try to dereference them, that's when you might have problems.

ajs6f

> On May 22, 2018, at 2:01 PM, Olivier Rossel  wrote:
>
> Don't use blank nodes. You will regret it in the long run.
>
> On Tue, May 22, 2018 at 4:43 PM, Laura Morales  wrote:
>
>> How can I deal with a RDF graph where I don't have dereferenceable URIs,
>> but still need the URIs to link with other graphs? For example if I have a
>> personal graph of documents that I only need to use for myself, what URIs
>> should I use?
>>
>> Blank nodes?
>>
>> _:document1
>> _:document2
>> _:document3
>>
>> or do I make my own URNs?
>>
>> 
>> 
>> 
>>
>> what other solutions are available?
>>
 


Re: Update Query Parsing error

2018-05-23 Thread ajs6f
Runs fine for me against current master.

ajs6f

> On May 23, 2018, at 7:40 AM, Bart van Leeuwen  
> wrote:
> 
> I mean this: 
> 
> # 
> 
> public static void main(String[] args) throws Exception { 
> JenaSystem.DEBUG_INIT = true; 
> JenaSystem.init(); 
> ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ; 
> 
>  
> 
> which crashes at the ARQ line. 
> 
> 
> Met Vriendelijke Groet / With Kind Regards
> Bart van Leeuwen 
> 
> 
> twitter: @semanticfire 
> tel. +31(0)6-53182997 
> Netage B.V.
> http://netage.nl 
> Esdoornstraat 3 
> 3461ER Linschoten 
> The Netherlands 
>  
> 
> 
> 
> From:Andy Seaborne  
> To:users@jena.apache.org 
> Date:23-05-2018 13:39 
> Subject:Re: Update Query Parsing error 
> 
> 
> 
> 
> 
> On 23/05/18 12:15, Bart van Leeuwen wrote:
> > I just tried your little addition and indeed it crashes before the update.
> > So what's next ?
> 
> To be clear here - you mean this:
> 
>  public static void main(String[] args) throws Exception {
> JenaSystem.DEBUG_INIT = true;
> JenaSystem.init();
> ARQ.getContext().isTrue(ARQ.constantBNodeLabels) ;
> 
> not the complete "main" below.
> 
> What got printed by DEBUG_INIT?
> 
> Andy
> 
> > 
> > Met Vriendelijke Groet / With Kind Regards
> > Bart van Leeuwen
> > 
> > 
> > twitter: @semanticfire
> > tel. +31(0)6-53182997
> > Netage B.V.
> > http://netage.nl 
> > Esdoornstraat 3
> > 3461ER Linschoten
> > The Netherlands
> > 
> > 
> > 
> > 
> > From: Andy Seaborne 
> > To: users@jena.apache.org
> > Date: 23-05-2018 13:11
> > Subject: Re: Update Query Parsing error
> > 
> > 
> > 
> > 
> > This code has the same Jena sequence without the StarDog code:
> > 
> > The stacktrace indicates an exception before parsing even starts so the
> > update itself is not a factro.
> > 
> >  public static void main(String... args) {
> >  JenaSystem.DEBUG_INIT = true;
> >  String update = "INSERT DATA {}";
> >  UpdateFactory.create(update);
> >  System.out.println("DONE");
> >  }
> > 
> > This works for me with a maven dependency on
> > org.apache.jena:apache-jena-libs:pom:3.7.0
> > 
> >  Andy
> > 
> > 
> 
> 



Re: Nodes without dereferenceable URIs

2018-05-23 Thread ajs6f
Can you use HTTP URIs that simply don't point to an actual server? (E.g. 
http://lauras.namespace/blah/blah/blah)

If no one tries to dereference them, it's fine if they don't work. If someone 
might try to dereference them, that's when you might have problems.

ajs6f

> On May 22, 2018, at 2:01 PM, Olivier Rossel  wrote:
> 
> Don't use blank nodes. You will regret it in the long run.
> 
> On Tue, May 22, 2018 at 4:43 PM, Laura Morales  wrote:
> 
>> How can I deal with a RDF graph where I don't have dereferenceable URIs,
>> but still need the URIs to link with other graphs? For example if I have a
>> personal graph of documents that I only need to use for myself, what URIs
>> should I use?
>> 
>> Blank nodes?
>> 
>> _:document1
>> _:document2
>> _:document3
>> 
>> or do I make my own URNs?
>> 
>> 
>> 
>> 
>> 
>> what other solutions are available?
>> 



Re: Update Query Parsing error

2018-05-23 Thread Bart van Leeuwen
I mean this:

#

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



which crashes at the ARQ line.


Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From:   Andy Seaborne 
To: users@jena.apache.org
Date:   23-05-2018 13:39
Subject:Re: Update Query Parsing error





On 23/05/18 12:15, Bart van Leeuwen wrote:
> I just tried your little addition and indeed it crashes before the 
update.
> So what's next ?

To be clear here - you mean this:

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

not the complete "main" below.

What got printed by DEBUG_INIT?

 Andy

> 
> Met Vriendelijke Groet / With Kind Regards
> Bart van Leeuwen
> 
> 
> twitter: @semanticfire
> tel. +31(0)6-53182997
> Netage B.V.
> http://netage.nl 
> Esdoornstraat 3
> 3461ER Linschoten
> The Netherlands
> 
> 
> 
> 
> From: Andy Seaborne 
> To: users@jena.apache.org
> Date: 23-05-2018 13:11
> Subject: Re: Update Query Parsing error
> 
> 
> 
> 
> This code has the same Jena sequence without the StarDog code:
> 
> The stacktrace indicates an exception before parsing even starts so the
> update itself is not a factro.
> 
>  public static void main(String... args) {
>  JenaSystem.DEBUG_INIT = true;
>  String update = "INSERT DATA {}";
>  UpdateFactory.create(update);
>  System.out.println("DONE");
>  }
> 
> This works for me with a maven dependency on
> org.apache.jena:apache-jena-libs:pom:3.7.0
> 
>  Andy
> 
> 




Re: Update Query Parsing error

2018-05-23 Thread Andy Seaborne



On 23/05/18 12:15, Bart van Leeuwen wrote:

I just tried your little addition and indeed it crashes before the update.
So what's next ?


To be clear here - you mean this:

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

not the complete "main" below.

What got printed by DEBUG_INIT?

Andy



Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From: Andy Seaborne 
To: users@jena.apache.org
Date: 23-05-2018 13:11
Subject: Re: Update Query Parsing error




This code has the same Jena sequence without the StarDog code:

The stacktrace indicates an exception before parsing even starts so the
update itself is not a factro.

     public static void main(String... args) {
         JenaSystem.DEBUG_INIT = true;
         String update = "INSERT DATA {}";
         UpdateFactory.create(update);
         System.out.println("DONE");
     }

This works for me with a maven dependency on
org.apache.jena:apache-jena-libs:pom:3.7.0

     Andy




Re: Comparison method violates its general contract!

2018-05-23 Thread Mikael Pesonen


Here is the log, I'll try to come up with short example and data

[2018-05-23 14:16:38] Fuseki WARN  [1771] RC = 500 : Comparison 
method violates its general contract!
java.lang.IllegalArgumentException: Comparison method violates its 
general contract!

    at java.util.TimSort.mergeHi(TimSort.java:899)
    at java.util.TimSort.mergeAt(TimSort.java:516)
    at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
    at java.util.TimSort.sort(TimSort.java:254)
    at java.util.Arrays.sort(Arrays.java:1438)
    at 
org.apache.jena.atlas.data.AbortableComparator.abortableSort(AbortableComparator.java:57)
    at 
org.apache.jena.atlas.data.SortedDataBag.iterator(SortedDataBag.java:219)
    at 
org.apache.jena.atlas.data.SortedDataBag.iterator(SortedDataBag.java:206)
    at 
org.apache.jena.sparql.engine.iterator.QueryIterSort$SortedBindingIterator.initializeIterator(QueryIterSort.java:88)
    at 
org.apache.jena.atlas.iterator.IteratorDelayedInitialization.init(IteratorDelayedInitialization.java:40)
    at 
org.apache.jena.atlas.iterator.IteratorDelayedInitialization.hasNext(IteratorDelayedInitialization.java:50)
    at 
org.apache.jena.sparql.engine.iterator.QueryIterPlainWrapper.hasNextBinding(QueryIterPlainWrapper.java:53)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:39)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:39)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java:39)
    at 
org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
    at 
org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:74)
    at 
org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(ResultSetCheckCondition.java:55)
    at 
org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Query.java:320)
    at 
org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:270)
    at 
org.apache.jena.fuseki.servlets.SPARQL_Query.executeBody(SPARQL_Query.java:239)
    at 
org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:219)
    at 
org.apache.jena.fuseki.servlets.ActionSPARQL.executeLifecycle(ActionSPARQL.java:132)
    at 
org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeRequest(SPARQL_UberServlet.java:356)
    at 
org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeAction(SPARQL_UberServlet.java:220)
    at 
org.apache.jena.fuseki.servlets.ActionSPARQL.execCommonWorker(ActionSPARQL.java:83)
    at 
org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:82)
    at 
org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
    at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
    at 
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
    at 
org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at 
org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at 
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
    at 
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    at 
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    at 
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at 
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at 
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
    at 
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
    at 
org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:285)
    at 
org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:248)
    at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
    at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at 

Re: Update Query Parsing error

2018-05-23 Thread Bart van Leeuwen
I just tried your little addition and indeed it crashes before the update.
So what's next ?

Met Vriendelijke Groet / With Kind Regards
Bart van Leeuwen


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




From:   Andy Seaborne 
To: users@jena.apache.org
Date:   23-05-2018 13:11
Subject:Re: Update Query Parsing error



This code has the same Jena sequence without the StarDog code:

The stacktrace indicates an exception before parsing even starts so the 
update itself is not a factro.

 public static void main(String... args) {
 JenaSystem.DEBUG_INIT = true;
 String update = "INSERT DATA {}";
 UpdateFactory.create(update);
 System.out.println("DONE");
 }

This works for me with a maven dependency on 
org.apache.jena:apache-jena-libs:pom:3.7.0

 Andy




Re: Comparison method violates its general contract!

2018-05-23 Thread Andy Seaborne

The issue is data and query dependent.

A shorter query and some data please!

Andy

On 23/05/18 12:05, Mikael Pesonen wrote:


How do I get it? 


The log file.


Fuseki is not crashing, just returns then error.

Br

On 23.5.2018 13:40, Rob Vesse wrote:

A stack trace would be helpful...

Rob

On 23/05/2018, 11:15, "Mikael Pesonen"  
wrote:


 Hi, I'm geting this Java error with following query (prefixes 
omitted)

 with Jena Fuseki 3.6.0 .
 Query works if every ?property_type is collected instead of 
sampling. It

 also works if ?label is not collected (?property_type is sampled).
 SELECT DISTINCT ?p ?label ?range
 (SAMPLE(?property_type_g) as ?property_type)
 (GROUP_CONCAT(DISTINCT ?comment_g; separator=" ") as ?comment)
   WHERE
 {
 GRAPH 
 {
 VALUES ?domain_property { rdfs:domain 
schema:domainIncludes }
  VALUES ?general_domain { rdfs:Resource owl:Thing 
schema:Thing }
 VALUES ?property_type_g { rdf:Property 
owl:DatatypeProperty owl:ObjectProperty owl:AnnotationProperty}


  rdfs:subClassOf* 
?top_class .


 # properties having the class as domain - directly or 
through super property
 { ?p ?domain_property ?top_class } UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?top_class }


 # properties with general domain - directly or through 
super property
 UNION { ?p ?domain_property ?general_domain }# UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?general_domain } }


 # properties without domain - directly or through super 
property
 UNION { ?p a ?property_type_g FILTER ( NOT EXISTS { ?p 
rdfs:domain ?d } && NOT EXISTS { ?p schema:domainIncludes ?d } && NOT 
EXISTS { ?p rdfs:subPropertyOf ?p2 . ?p2 rdfs:domain ?d FILTER (?d != 
rdfs:Resource && ?d != owl:Thing) } ) }


 OPTIONAL { ?p rdfs:subPropertyOf* ?p2 . { ?p2 
schema:rangeIncludes ?range } UNION { ?p2 rdfs:range ?range } }


 OPTIONAL { ?p rdfs:label ?label 
FILTER(LANGMATCHES(LANG(?label), "fi")) }

 OPTIONAL { ?p rdfs:label ?label FILTER(LANG(?label) = "") }
 OPTIONAL { ?p rdfs:label ?label }

 OPTIONAL { ?p rdfs:comment ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
 OPTIONAL { ?p rdfs:comment ?comment_g 
FILTER(LANG(?comment_g) = "") }

 OPTIONAL { ?p rdfs:comment ?comment_g }

 OPTIONAL { ?p skos:definition ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
 OPTIONAL { ?p skos:definition ?comment_g 
FILTER(LANG(?comment_g) = "") }

 OPTIONAL { ?p skos:definition ?comment_g }

 # filter out deprecated definitions
 FILTER ( NOT EXISTS { ?p schema:supersededBy ?sp } && NOT 
EXISTS { ?p  
"archaic" } && NOT EXISTS { ?p owl:deprecated "true"^^xsd:boolean } )

 }
 }
 GROUP BY ?p ?label ?range
 ORDER BY ASC(?label)
 --
 Lingsoft - 30 years of Leading Language Management
 www.lingsoft.fi
 Speech Applications - Language Management - Translation - 
Reader's and Writer's Tools - Text Tools - E-books and M-books

 Mikael Pesonen
 System Engineer
 e-mail: mikael.peso...@lingsoft.fi
 Tel. +358 2 279 3300
 Time zone: GMT+2
 Helsinki Office
 Eteläranta 10
 FI-00130 Helsinki
 FINLAND
 Turku Office
 Kauppiaskatu 5 A
 FI-20100 Turku
 FINLAND








Re: Update Query Parsing error

2018-05-23 Thread Andy Seaborne

This code has the same Jena sequence without the StarDog code:

The stacktrace indicates an exception before parsing even starts so the 
update itself is not a factro.


public static void main(String... args) {
JenaSystem.DEBUG_INIT = true;
String update = "INSERT DATA {}";
UpdateFactory.create(update);
System.out.println("DONE");
}

This works for me with a maven dependency on 
org.apache.jena:apache-jena-libs:pom:3.7.0


Andy


Re: Comparison method violates its general contract!

2018-05-23 Thread Mikael Pesonen


How do I get it? Fuseki is not crashing, just returns then error.

Br

On 23.5.2018 13:40, Rob Vesse wrote:

A stack trace would be helpful...

Rob

On 23/05/2018, 11:15, "Mikael Pesonen"  wrote:

 
 Hi, I'm geting this Java error with following query (prefixes omitted)

 with Jena Fuseki 3.6.0 .
 
 Query works if every ?property_type is collected instead of sampling. It

 also works if ?label is not collected (?property_type is sampled).
 
 
 SELECT DISTINCT ?p ?label ?range

 (SAMPLE(?property_type_g) as ?property_type)
 (GROUP_CONCAT(DISTINCT ?comment_g; separator=" ") as ?comment)
   WHERE
 {
GRAPH 
{
VALUES ?domain_property { rdfs:domain schema:domainIncludes }
VALUES ?general_domain { rdfs:Resource owl:Thing schema:Thing }
VALUES ?property_type_g { rdf:Property owl:DatatypeProperty 
owl:ObjectProperty owl:AnnotationProperty}

 rdfs:subClassOf* 
?top_class .

# properties having the class as domain - directly or through 
super property
{ ?p ?domain_property ?top_class } UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?top_class }

# properties with general domain - directly or through super 
property
UNION { ?p ?domain_property ?general_domain }# UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?general_domain } }

# properties without domain - directly or through super property
UNION { ?p a ?property_type_g FILTER ( NOT EXISTS { ?p rdfs:domain ?d } && NOT 
EXISTS { ?p schema:domainIncludes ?d } && NOT EXISTS { ?p rdfs:subPropertyOf ?p2 . ?p2 
rdfs:domain ?d FILTER (?d != rdfs:Resource && ?d != owl:Thing) } ) }

OPTIONAL { ?p rdfs:subPropertyOf* ?p2 . { ?p2 
schema:rangeIncludes ?range } UNION { ?p2 rdfs:range ?range } }

OPTIONAL { ?p rdfs:label ?label FILTER(LANGMATCHES(LANG(?label), 
"fi")) }
OPTIONAL { ?p rdfs:label ?label FILTER(LANG(?label) = "") }
OPTIONAL { ?p rdfs:label ?label }

OPTIONAL { ?p rdfs:comment ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
OPTIONAL { ?p rdfs:comment ?comment_g FILTER(LANG(?comment_g) = 
"") }
OPTIONAL { ?p rdfs:comment ?comment_g }

OPTIONAL { ?p skos:definition ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
OPTIONAL { ?p skos:definition ?comment_g FILTER(LANG(?comment_g) = 
"") }
OPTIONAL { ?p skos:definition ?comment_g }

# filter out deprecated definitions
FILTER ( NOT EXISTS { ?p schema:supersededBy ?sp } && NOT EXISTS { ?p 
 "archaic" } && NOT EXISTS { ?p 
owl:deprecated "true"^^xsd:boolean } )
}
 }
 GROUP BY ?p ?label ?range
 ORDER BY ASC(?label)
 
 --

 Lingsoft - 30 years of Leading Language Management
 
 www.lingsoft.fi
 
 Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books
 
 Mikael Pesonen

 System Engineer
 
 e-mail: mikael.peso...@lingsoft.fi

 Tel. +358 2 279 3300
 
 Time zone: GMT+2
 
 Helsinki Office

 Eteläranta 10
 FI-00130 Helsinki
 FINLAND
 
 Turku Office

 Kauppiaskatu 5 A
 FI-20100 Turku
 FINLAND
 
 







--
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's 
Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND



Re: Comparison method violates its general contract!

2018-05-23 Thread Rob Vesse
A stack trace would be helpful...

Rob

On 23/05/2018, 11:15, "Mikael Pesonen"  wrote:


Hi, I'm geting this Java error with following query (prefixes omitted) 
with Jena Fuseki 3.6.0 .

Query works if every ?property_type is collected instead of sampling. It 
also works if ?label is not collected (?property_type is sampled).


SELECT DISTINCT ?p ?label ?range
(SAMPLE(?property_type_g) as ?property_type)
(GROUP_CONCAT(DISTINCT ?comment_g; separator=" ") as ?comment)
  WHERE
{
GRAPH 
{
VALUES ?domain_property { rdfs:domain schema:domainIncludes }
VALUES ?general_domain { rdfs:Resource owl:Thing schema:Thing }
VALUES ?property_type_g { rdf:Property owl:DatatypeProperty 
owl:ObjectProperty owl:AnnotationProperty}

 rdfs:subClassOf* 
?top_class .

# properties having the class as domain - directly or through 
super property
{ ?p ?domain_property ?top_class } UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?top_class }

# properties with general domain - directly or through super 
property
UNION { ?p ?domain_property ?general_domain }# UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?general_domain } }

# properties without domain - directly or through super property
UNION { ?p a ?property_type_g FILTER ( NOT EXISTS { ?p 
rdfs:domain ?d } && NOT EXISTS { ?p schema:domainIncludes ?d } && NOT EXISTS { 
?p rdfs:subPropertyOf ?p2 . ?p2 rdfs:domain ?d FILTER (?d != rdfs:Resource && 
?d != owl:Thing) } ) }

OPTIONAL { ?p rdfs:subPropertyOf* ?p2 . { ?p2 
schema:rangeIncludes ?range } UNION { ?p2 rdfs:range ?range } }

OPTIONAL { ?p rdfs:label ?label 
FILTER(LANGMATCHES(LANG(?label), "fi")) }
OPTIONAL { ?p rdfs:label ?label FILTER(LANG(?label) = "") }
OPTIONAL { ?p rdfs:label ?label }

OPTIONAL { ?p rdfs:comment ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
OPTIONAL { ?p rdfs:comment ?comment_g FILTER(LANG(?comment_g) = 
"") }
OPTIONAL { ?p rdfs:comment ?comment_g }

OPTIONAL { ?p skos:definition ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
OPTIONAL { ?p skos:definition ?comment_g 
FILTER(LANG(?comment_g) = "") }
OPTIONAL { ?p skos:definition ?comment_g }

# filter out deprecated definitions
FILTER ( NOT EXISTS { ?p schema:supersededBy ?sp } && NOT 
EXISTS { ?p  
"archaic" } && NOT EXISTS { ?p owl:deprecated "true"^^xsd:boolean } )
}
}
GROUP BY ?p ?label ?range
ORDER BY ASC(?label)

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and 
Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND








Comparison method violates its general contract!

2018-05-23 Thread Mikael Pesonen


Hi, I'm geting this Java error with following query (prefixes omitted) 
with Jena Fuseki 3.6.0 .


Query works if every ?property_type is collected instead of sampling. It 
also works if ?label is not collected (?property_type is sampled).



SELECT DISTINCT ?p ?label ?range
(SAMPLE(?property_type_g) as ?property_type)
(GROUP_CONCAT(DISTINCT ?comment_g; separator=" ") as ?comment)
 WHERE
{
GRAPH 
{
VALUES ?domain_property { rdfs:domain schema:domainIncludes }
VALUES ?general_domain { rdfs:Resource owl:Thing schema:Thing }
VALUES ?property_type_g { rdf:Property owl:DatatypeProperty 
owl:ObjectProperty owl:AnnotationProperty}

 rdfs:subClassOf* 
?top_class .

# properties having the class as domain - directly or through 
super property
{ ?p ?domain_property ?top_class } UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?top_class }

# properties with general domain - directly or through super 
property
UNION { ?p ?domain_property ?general_domain }# UNION { ?p 
rdfs:subPropertyOf* ?p2 . ?p2 ?domain_property ?general_domain } }

# properties without domain - directly or through super property
UNION { ?p a ?property_type_g FILTER ( NOT EXISTS { ?p rdfs:domain ?d } && NOT 
EXISTS { ?p schema:domainIncludes ?d } && NOT EXISTS { ?p rdfs:subPropertyOf ?p2 . ?p2 
rdfs:domain ?d FILTER (?d != rdfs:Resource && ?d != owl:Thing) } ) }

OPTIONAL { ?p rdfs:subPropertyOf* ?p2 . { ?p2 
schema:rangeIncludes ?range } UNION { ?p2 rdfs:range ?range } }

OPTIONAL { ?p rdfs:label ?label FILTER(LANGMATCHES(LANG(?label), 
"fi")) }
OPTIONAL { ?p rdfs:label ?label FILTER(LANG(?label) = "") }
OPTIONAL { ?p rdfs:label ?label }

OPTIONAL { ?p rdfs:comment ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
OPTIONAL { ?p rdfs:comment ?comment_g FILTER(LANG(?comment_g) = 
"") }
OPTIONAL { ?p rdfs:comment ?comment_g }

OPTIONAL { ?p skos:definition ?comment_g 
FILTER(LANGMATCHES(LANG(?comment_g), "fi")) }
OPTIONAL { ?p skos:definition ?comment_g FILTER(LANG(?comment_g) = 
"") }
OPTIONAL { ?p skos:definition ?comment_g }

# filter out deprecated definitions
FILTER ( NOT EXISTS { ?p schema:supersededBy ?sp } && NOT EXISTS { ?p 
 "archaic" } && NOT EXISTS { ?p 
owl:deprecated "true"^^xsd:boolean } )
}
}
GROUP BY ?p ?label ?range
ORDER BY ASC(?label)

--
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's 
Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND