Re: Configuring fuseki with TDB2 and OWL reasoning

2018-02-23 Thread Eric Boisvert
Well, I don't know.  What I'm looking is a way to manage millions
(potentially hundreds of millions) of triples.  I assumed that TDB2 would
be more efficient.
What do you guys suggest ?

2018-02-23 5:33 GMT-05:00 Nouwt, B. (Barry) :

> Hi Eric, glad that configuration works. Since you disabled the
> ja:baseModel you can probably also disable the <#graph> and :datasetTDB2
> configuration. Are you then sure this still creates a TDB2 database? Since
> you are no longer explicitly stating it should. It will probably just
> create a MemoryModel instead, in which case it is not really a solution to
> your problem.
>
> I do not know what the Exception means, sorry.
>
> Regards, Barry
>
> -Original Message-
> From: Eric Boisvert [mailto:denevers1...@gmail.com]
> Sent: donderdag 22 februari 2018 15:51
> To: users@jena.apache.org
> Subject: Re: Configuring fuseki with TDB2 and OWL reasoning
>
> this works (inferrence works). Note, I commented out ja:baseModel
>
> ---
>
> <#model_inf> a ja:InfModel ;
>  #ja:baseModel <#graph> ;
> ja:content <#test-inf> ;
>  ja:reasoner [
>  ja:reasonerURL 
>  ] .
>
> <#graph> rdf:type tdb2:GraphTDB ;
>   tdb2:dataset :datasetTDB2 .
>
>  ## Storage
> :datasetTDB2 rdf:type tdb2:DatasetTDB2 ;
> tdb2:location "c:/fuseki/run/databases/gsip".
>
> <#test-inf> ja:externalContent "c:\\fuseki/test.ttl" .
>
> ---
>
>
>
> if I don't comment , I get this exception (which is expected I think)
>
> [2018-02-22 09:09:47] Server ERROR Exception in initialization: the
> loading of content into
> file:///C:/fuseki/run/configuration/gsip.ttl#model_inf was abort ed
> because of NodeTableThrift/Write
> [2018-02-22 09:09:47] WebAppContext WARN  Failed startup of context
> o.e.j.w.WebAppContext@8a62297{/,file:///C:/fuseki/webapp/,UNAVAILABLE}
> org.apache.jena.assembler.exceptions.TransactionAbortedException: the
> loading of content into file:///C:/fuseki/run/
> configuration/gsip.ttl#model_inf was aborted  because of
> NodeTableThrift/Write
>   doing:
> root: file:///C:/fuseki/run/configuration/gsip.ttl#model_inf with
> type:
> http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler class: class
> org.apache.
> jena.assembler.assemblers.InfModelAssembler
> root: http://base/#dataset with type:
> http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler class:
> class org.apache.jena.sparql.core.assembler.Datas
> etAssembler
>
> at
> org.apache.jena.assembler.assemblers.ModelAssembler.
> addContent(ModelAssembler.java:55)
> at
> org.apache.jena.assembler.assemblers.ModelAssembler.
> open(ModelAssembler.java:44)
> at
> org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.
> openBySpecificType(AssemblerGroup.java:157)
> at
> org.apache.jena.assembler.assemblers.AssemblerGroup$
> PlainAssemblerGroup.open(AssemblerGroup.java:144)
> at
> org.apache.jena.assembler.assemblers.AssemblerGroup$
> ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
> at
> org.apache.jena.assembler.assemblers.AssemblerBase.open(
> AssemblerBase.java:39)
>
>
>
>
>
>
> 2018-02-20 5:59 GMT-05:00 Nouwt, B. (Barry) :
>
> > Hi Eric,
> >
> > Another thing I noticed is that you said you were manually loading the
> > data via the GUI after Apache Jena Fuseki has started. Maybe that data
> > is not stored in the correct location (i.e. the baseModel of the
> > InfModel) and there the reasoning fails?
> >
> > You could try to load the data on Apache Jena Fuseki startup
> > automatically using a configuration like below (or is that no longer
> > possible when using
> > TDB2?):
> >
> > <#model_inf> a ja:InfModel ;
> > ...
> > ja:content <#test-inf> ;
> > ...
> >
> > <#test-inf> ja:externalContent  .
> >
> > Regards, Barry
> >
> >
> > -Original Message-
> > From: Eric Boisvert [mailto:denevers1...@gmail.com]
> > Sent: maandag 19 februari 2018 23:25
> > To: users@jena.apache.org
> > Subject: Re: Configuring fuseki with TDB2 and OWL reasoning
> >
> > made the change.
> >
> > Now I get
> >
> > Result: failed with message "Not in a transaction"
> >
> > when I try to load from the interface
> >
> >
> > log:
> >
> > (...)
> >
> > [2018-02-19 17:21:31] Fuseki INFO  [5] Filename: test.ttl,
> > Content-Type=appl
> > ication/octet-stream, Charset=null => Turtle : Count=4 Triples=4 Quads=0
> > [2018-02-19 17:21:31] Fuseki INFO  [5] 500 Not in a transaction (29
> ms)
> >
> > Thank you very much helping me with this
> >
> > 2018-02-19 9:00 GMT-05:00 Andy Seaborne :
> >
> > >
> > >
> > > On 19/02/18 12:46, Eric Boisvert wrote:
> > >
> > >> :dataset a ja:RDFDataset ;
> > >>  tdb2:defaultGraph   <#model_inf> .
> > >> ## tdb2:location  "c:\\fuseki/run/databases/gsip".
> > >>
> > >>
> > > ja:defaultGraph  not  tdb2:defaultGraph
> > >
> > > :dataset is a plain, in-memory dataset to hold the InfModel
> 

Re: Fuseki: Configuration for an inferencing endpoint throws AmbiguousSpecificTypeException (HDT).

2018-02-23 Thread Andy Seaborne



On 23/02/18 17:08, Svensson, Lars wrote:

On Friday, February 23, 2018 3:22 PM, Andy Seaborne [mailto:a...@apache.org] 
wrote:


The necessary

# HDT Classes
hdt:HDTGraph rdfs:subClassOf ja:Graph .

is missing in the initial email.


They are on the classpath, too.


In their HDT fuseki example, there are two triples, ja:loadClass and 
rdfs:subClassOf, for setup and they do not appear in the config file you 
gave in the first email.


If the server run/config.ttl file has the ja:loadClass you should be OK 
(maybe be not - adding


[] ja:loadClass "org.rdfhdt.hdtjena.HDTGraphAssembler" .

to configuration/inferencing.ttl is safe)
but I think the rdfs:subClassOf is necessary in 
configuration/inferencing.ttl and can not be relied in to be picked up 
from run/config.ttl.


I would expect to see:

@prefix fuseki:  .
@prefix rdf: .
@prefix rdfs:    .
@prefix tdb: .
@prefix ja:  .
@prefix hdt: .
@prefix tdb: .
@prefix :   <#> .

# HDT Classes
hdt:HDTGraph rdfs:subClassOf ja:Graph .

<#standard> rdf:type fuseki:Service ;
fuseki:name "inferencing" ;
fuseki:serviceQuery "query" , "sparql" ;
fuseki:serviceReadGraphStore "data" ;
fuseki:dataset <#all> .



Andy




The point is that the server runs nicely with a non-inferencing configuration 
using several named graphs coming from different HDT file. It's only when I try 
to do inferencing that I get the exception.

Best,

Lars


On 23/02/18 13:46, Svensson, Lars wrote:

Thanks Andy,

On Friday, February 16, 2018 8:33 PM, Andy Seaborne [mailto:a...@apache.org]

wrote:



This is an HDT question.  Just to be clear -- HDT is not part of the
Apache Jena project.

You need to have the HDT jars on the classpath when running the server.


The classes are on the classpath, so that can't be the problem.

I'll post this as an issue in the HDT Github repository.

Best,

Lars



RE: Fuseki: Configuration for an inferencing endpoint throws AmbiguousSpecificTypeException (HDT).

2018-02-23 Thread Svensson, Lars
On Friday, February 23, 2018 3:22 PM, Andy Seaborne [mailto:a...@apache.org] 
wrote:

> The necessary
> 
> # HDT Classes
> hdt:HDTGraph rdfs:subClassOf ja:Graph .
> 
> is missing in the initial email.

They are on the classpath, too.

The point is that the server runs nicely with a non-inferencing configuration 
using several named graphs coming from different HDT file. It's only when I try 
to do inferencing that I get the exception.

Best,

Lars
> 
> On 23/02/18 13:46, Svensson, Lars wrote:
> > Thanks Andy,
> >
> > On Friday, February 16, 2018 8:33 PM, Andy Seaborne [mailto:a...@apache.org]
> wrote:
> >
> >> This is an HDT question.  Just to be clear -- HDT is not part of the
> >> Apache Jena project.
> >>
> >> You need to have the HDT jars on the classpath when running the server.
> >
> > The classes are on the classpath, so that can't be the problem.
> >
> > I'll post this as an issue in the HDT Github repository.
> >
> > Best,
> >
> > Lars
> >


Re: Fuseki: Configuration for an inferencing endpoint throws AmbiguousSpecificTypeException (HDT).

2018-02-23 Thread Andy Seaborne

The necessary

# HDT Classes
hdt:HDTGraph rdfs:subClassOf ja:Graph .

is missing in the initial email.

Andy

On 23/02/18 13:46, Svensson, Lars wrote:

Thanks Andy,

On Friday, February 16, 2018 8:33 PM, Andy Seaborne [mailto:a...@apache.org] 
wrote:


This is an HDT question.  Just to be clear -- HDT is not part of the
Apache Jena project.

You need to have the HDT jars on the classpath when running the server.
  
The classes are on the classpath, so that can't be the problem.


I'll post this as an issue in the HDT Github repository.

Best,

Lars



RE: Fuseki: Configuration for an inferencing endpoint throws AmbiguousSpecificTypeException (HDT).

2018-02-23 Thread Svensson, Lars
Thanks Andy,

On Friday, February 16, 2018 8:33 PM, Andy Seaborne [mailto:a...@apache.org] 
wrote:

> This is an HDT question.  Just to be clear -- HDT is not part of the
> Apache Jena project.
>
> You need to have the HDT jars on the classpath when running the server.
 
The classes are on the classpath, so that can't be the problem.

I'll post this as an issue in the HDT Github repository.

Best,

Lars


Re: Fuseki as Tomcat app: Setting FUSEKI_BASE

2018-02-23 Thread Andy Seaborne

A different approach is to put a symbolic link in for /etc/fuseki.

As Lorenz says, 2.3 is quite old.

I don't see anything in JIRA about WAR files, only the standalone server 
script.


Have you tried the standalone server?
caveat:
https://issues.apache.org/jira/browse/JENA-1099

Andy

On 23/02/18 04:28, Lorenz Buehmann wrote:

What's the reason for using Fuseki 2.3 which is from 2015-07-29 ? The
latest version is 3.6.0


On 22.02.2018 17:57, Christian Schwaderer wrote:

Dear all,

my question might be stupid and rather basic, but I cannot find an answer 
anywhere.


So, I set up Fuseki 2.3 as a Tomcat 7 Web app. However, I cannot start it, since

"org.apache.jena.fuseki.FusekiConfigException: FUSEKI_BASE is not writable: 
/etc/fuseki"


I now want to change FUSEKI_BASE to a different directoy - where I can safely 
change permissions (what I would consider a bad idea for /etc...).


But I have no idea where and how to do that.


Thanks in advance and best,

Christian






Re: Configuring fuseki with TDB2 and OWL reasoning

2018-02-23 Thread Andy Seaborne



On 23/02/18 10:33, Nouwt, B. (Barry) wrote:

Hi Eric, glad that configuration works. Since you disabled the ja:baseModel you can 
probably also disable the <#graph> and :datasetTDB2 configuration. Are you then 
sure this still creates a TDB2 database? Since you are no longer explicitly stating 
it should. It will probably just create a MemoryModel instead, in which case it is 
not really a solution to your problem.

I do not know what the Exception means, sorry.

Mixing these two

 ja:baseModel <#graph> ;
 ja:content <#test-inf> ;

looks like it it triggering the same transaction issue, but in a 
different way.


When ja:baseModel is commented out, it is going to an in-memory graph 
for the InfGraph.


Andy



Regards, Barry

-Original Message-
From: Eric Boisvert [mailto:denevers1...@gmail.com]
Sent: donderdag 22 februari 2018 15:51
To: users@jena.apache.org
Subject: Re: Configuring fuseki with TDB2 and OWL reasoning

this works (inferrence works). Note, I commented out ja:baseModel

---

<#model_inf> a ja:InfModel ;
  #ja:baseModel <#graph> ;
ja:content <#test-inf> ;
  ja:reasoner [
  ja:reasonerURL 
  ] .

<#graph> rdf:type tdb2:GraphTDB ;
   tdb2:dataset :datasetTDB2 .

  ## Storage
:datasetTDB2 rdf:type tdb2:DatasetTDB2 ;
 tdb2:location "c:/fuseki/run/databases/gsip".

<#test-inf> ja:externalContent "c:\\fuseki/test.ttl" .

---



if I don't comment , I get this exception (which is expected I think)

[2018-02-22 09:09:47] Server ERROR Exception in initialization: the
loading of content into
file:///C:/fuseki/run/configuration/gsip.ttl#model_inf was abort ed because of 
NodeTableThrift/Write
[2018-02-22 09:09:47] WebAppContext WARN  Failed startup of context 
o.e.j.w.WebAppContext@8a62297{/,file:///C:/fuseki/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.TransactionAbortedException: the loading 
of content into file:///C:/fuseki/run/configuration/gsip.ttl#model_inf was 
aborted  because of NodeTableThrift/Write
   doing:
 root: file:///C:/fuseki/run/configuration/gsip.ttl#model_inf with type:
http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler class: class 
org.apache.
jena.assembler.assemblers.InfModelAssembler
 root: http://base/#dataset with type:
http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler class: class 
org.apache.jena.sparql.core.assembler.Datas
etAssembler

 at
org.apache.jena.assembler.assemblers.ModelAssembler.addContent(ModelAssembler.java:55)
 at
org.apache.jena.assembler.assemblers.ModelAssembler.open(ModelAssembler.java:44)
 at
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
 at
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
 at
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)






2018-02-20 5:59 GMT-05:00 Nouwt, B. (Barry) :


Hi Eric,

Another thing I noticed is that you said you were manually loading the
data via the GUI after Apache Jena Fuseki has started. Maybe that data
is not stored in the correct location (i.e. the baseModel of the
InfModel) and there the reasoning fails?

You could try to load the data on Apache Jena Fuseki startup
automatically using a configuration like below (or is that no longer
possible when using
TDB2?):

<#model_inf> a ja:InfModel ;
 ...
 ja:content <#test-inf> ;
 ...

<#test-inf> ja:externalContent  .

Regards, Barry


-Original Message-
From: Eric Boisvert [mailto:denevers1...@gmail.com]
Sent: maandag 19 februari 2018 23:25
To: users@jena.apache.org
Subject: Re: Configuring fuseki with TDB2 and OWL reasoning

made the change.

Now I get

Result: failed with message "Not in a transaction"

when I try to load from the interface


log:

(...)

[2018-02-19 17:21:31] Fuseki INFO  [5] Filename: test.ttl,
Content-Type=appl
ication/octet-stream, Charset=null => Turtle : Count=4 Triples=4 Quads=0
[2018-02-19 17:21:31] Fuseki INFO  [5] 500 Not in a transaction (29 ms)

Thank you very much helping me with this

2018-02-19 9:00 GMT-05:00 Andy Seaborne :




On 19/02/18 12:46, Eric Boisvert wrote:


:dataset a ja:RDFDataset ;
  tdb2:defaultGraph   <#model_inf> .
## tdb2:location  "c:\\fuseki/run/databases/gsip".



ja:defaultGraph  not  tdb2:defaultGraph

:dataset is a plain, in-memory dataset to hold the InfModel

 Andy


This message may contain information that is not intended for you. If
you are not the addressee or if this message was sent to you by
mistake, you are requested to inform the sender and delete the
message. TNO accepts no liability for the content of this e-mail, for
the manner in which you use it and for damage of any kind 

RE: Configuring fuseki with TDB2 and OWL reasoning

2018-02-23 Thread Nouwt, B. (Barry)
Hi Eric, glad that configuration works. Since you disabled the ja:baseModel you 
can probably also disable the <#graph> and :datasetTDB2 configuration. Are you 
then sure this still creates a TDB2 database? Since you are no longer 
explicitly stating it should. It will probably just create a MemoryModel 
instead, in which case it is not really a solution to your problem.

I do not know what the Exception means, sorry.

Regards, Barry

-Original Message-
From: Eric Boisvert [mailto:denevers1...@gmail.com] 
Sent: donderdag 22 februari 2018 15:51
To: users@jena.apache.org
Subject: Re: Configuring fuseki with TDB2 and OWL reasoning

this works (inferrence works). Note, I commented out ja:baseModel

---

<#model_inf> a ja:InfModel ;
 #ja:baseModel <#graph> ;
ja:content <#test-inf> ;
 ja:reasoner [
 ja:reasonerURL 
 ] .

<#graph> rdf:type tdb2:GraphTDB ;
  tdb2:dataset :datasetTDB2 .

 ## Storage
:datasetTDB2 rdf:type tdb2:DatasetTDB2 ;
tdb2:location "c:/fuseki/run/databases/gsip".

<#test-inf> ja:externalContent "c:\\fuseki/test.ttl" .

---



if I don't comment , I get this exception (which is expected I think)

[2018-02-22 09:09:47] Server ERROR Exception in initialization: the
loading of content into
file:///C:/fuseki/run/configuration/gsip.ttl#model_inf was abort ed because of 
NodeTableThrift/Write
[2018-02-22 09:09:47] WebAppContext WARN  Failed startup of context 
o.e.j.w.WebAppContext@8a62297{/,file:///C:/fuseki/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.TransactionAbortedException: the loading 
of content into file:///C:/fuseki/run/configuration/gsip.ttl#model_inf was 
aborted  because of NodeTableThrift/Write
  doing:
root: file:///C:/fuseki/run/configuration/gsip.ttl#model_inf with type:
http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler class: class 
org.apache.
jena.assembler.assemblers.InfModelAssembler
root: http://base/#dataset with type:
http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler class: class 
org.apache.jena.sparql.core.assembler.Datas
etAssembler

at
org.apache.jena.assembler.assemblers.ModelAssembler.addContent(ModelAssembler.java:55)
at
org.apache.jena.assembler.assemblers.ModelAssembler.open(ModelAssembler.java:44)
at
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
at
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
at
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
at
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)






2018-02-20 5:59 GMT-05:00 Nouwt, B. (Barry) :

> Hi Eric,
>
> Another thing I noticed is that you said you were manually loading the 
> data via the GUI after Apache Jena Fuseki has started. Maybe that data 
> is not stored in the correct location (i.e. the baseModel of the 
> InfModel) and there the reasoning fails?
>
> You could try to load the data on Apache Jena Fuseki startup 
> automatically using a configuration like below (or is that no longer 
> possible when using
> TDB2?):
>
> <#model_inf> a ja:InfModel ;
> ...
> ja:content <#test-inf> ;
> ...
>
> <#test-inf> ja:externalContent  .
>
> Regards, Barry
>
>
> -Original Message-
> From: Eric Boisvert [mailto:denevers1...@gmail.com]
> Sent: maandag 19 februari 2018 23:25
> To: users@jena.apache.org
> Subject: Re: Configuring fuseki with TDB2 and OWL reasoning
>
> made the change.
>
> Now I get
>
> Result: failed with message "Not in a transaction"
>
> when I try to load from the interface
>
>
> log:
>
> (...)
>
> [2018-02-19 17:21:31] Fuseki INFO  [5] Filename: test.ttl,
> Content-Type=appl
> ication/octet-stream, Charset=null => Turtle : Count=4 Triples=4 Quads=0
> [2018-02-19 17:21:31] Fuseki INFO  [5] 500 Not in a transaction (29 ms)
>
> Thank you very much helping me with this
>
> 2018-02-19 9:00 GMT-05:00 Andy Seaborne :
>
> >
> >
> > On 19/02/18 12:46, Eric Boisvert wrote:
> >
> >> :dataset a ja:RDFDataset ;
> >>  tdb2:defaultGraph   <#model_inf> .
> >> ## tdb2:location  "c:\\fuseki/run/databases/gsip".
> >>
> >>
> > ja:defaultGraph  not  tdb2:defaultGraph
> >
> > :dataset is a plain, in-memory dataset to hold the InfModel
> >
> > Andy
> >
> This message may contain information that is not intended for you. If 
> you are not the addressee or if this message was sent to you by 
> mistake, you are requested to inform the sender and delete the 
> message. TNO accepts no liability for the content of this e-mail, for 
> the manner in which you use it and for damage of any kind resulting 
> from the risks inherent to the electronic transmission of messages.
>