How to configure Apache Jena Fuseki with TDB and reasoner ? Error on DELETE dataset - jena

Context
Despite the number of questions/answers on the subject, I'm stil having trouble to configure Apache Jena Fuseki...
I'm trying to configure an Apache Jena Fuseki instance with TDB and OWL reasoner activated, for testing my application. I need to create a dataset, execute my tests, and delete the dataset programatically.
Setup
I use stain/jena-fuseki docker image to run Apache Jena Fuseki.
I run Jena Fuseki in version 3.10.0.
bash-4.3# ./fuseki-server -version
Jena: VERSION: 3.10.0
Jena: BUILD_DATE: 2018-12-30T15:45:57+0000
TDB: VERSION: 3.10.0
TDB: BUILD_DATE: 2018-12-30T15:45:57+0000
Fuseki: VERSION: 3.10.0
Fuseki: BUILD_DATE: 2018-12-30T15:45:57+0000
Base Configuration
I use folowing shiro.ini file.
I allow full access for everyone this is only a test instance.
bash-4.3# cat /fuseki/shiro.ini
[main]
# Development
ssl.enabled = false
plainMatcher=org.apache.shiro.authc.credential.SimpleCredentialsMatcher
iniRealm.credentialsMatcher = $plainMatcher
[users]
admin=mysupersecurepassword
[roles]
[urls]
## Control functions open to anyone
/$/status = anon
/$/ping = anon
# Everything else
/**=anon
I use the default config.ttl file:
bash-4.3# cat /fuseki/config.ttl
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
## Fuseki Server configuration file.
#prefix : <#> .
#prefix fuseki: <http://jena.apache.org/fuseki#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
.
What I'm tring to do ?
For testing my application I'm trying to create a dataset, execute tests, and delete the dataset programatically. For this purpose I use Fuseki HTTP Administration Protocol.
I follow these steps:
POST /$/datasets to create dataset.
POST /dataset_name/data to upload data files.
(Execute my application tests)
POST /dataset_name?update=DROP+ALL to remove data.
DELETE /$/datasets/dataset_name to delete dataset.
Step 1:
Using curl :
curl -F 'files[]=#dataset.ttl' http://localhost:3030/$/datasets
I use following dataset.ttl file:
#prefix fuseki: <http://jena.apache.org/fuseki#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
#prefix : <#> .
# Custom code
tdb:GraphTDB rdfs:subClassOf ja:Model .
# Setup service
:service rdf:type fuseki:Service ;
rdfs:label "TDB dataset_name" ;
fuseki:name "dataset_name" ;
fuseki:dataset :dataset ;
fuseki:serviceQuery "query", "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
.
# Setup Assembler model with reasoner
:dataset rdf:type ja:RDFDataset;
ja:defaultGraph :modelInf ;
.
:modelInf rdf:type ja:InfModel;
ja:baseModel :tdbGraph ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
] ;
.
# TDB dataset used for RDF storage
:tdbGraph rdf:type tdb:GraphTDB;
tdb:location "/fuseki/databases/dataset_name" ;
.
Jena Fuseki logs
[2019-10-23 14:41:00] Admin INFO [6] POST http://localhost:3030/$/datasets
[2019-10-23 14:41:00] Admin INFO [6] Filename: dataset.ttl, Content-Type=application/octet-stream, Charset=null => Turtle : Count=19 Triples=19 Quads=0
[2019-10-23 14:41:00] Admin INFO [6] Create database : name = /dataset_name
[2019-10-23 14:41:02] Admin INFO [6] 200 OK (1.894 s)
Everything is OK :P
Step 2:
Using curl :
curl -F 'files[]=#data.rdf' http://localhost:3030/dataset_name/data
{
"count" : 1524 ,
"tripleCount" : 1524 ,
"quadCount" : 0
}
Jena Fuseki logs
[2019-10-23 14:44:52] Fuseki INFO [7] POST http://localhost:3030/dataset_name/data
[2019-10-23 14:44:53] Fuseki INFO [7] Filename: data.rdf, Content-Type=application/octet-stream, Charset=null => RDF/XML : Count=1524 Triples=1524 Quads=0
[2019-10-23 14:44:54] Fuseki INFO [7] 200 OK (1.858 s)
Everything is OK :P
Step 3 :
Testing my application (useless here)
Step 4:
Using curl :
curl -d "update=DROP+ALL" -X POST http://localhost:3030/dataset_name/update
...
Update succeeded
...
Jena Fuseki logs
[2019-10-23 15:04:13] Fuseki INFO [67] POST http://localhost:3030/dataset_name/update
[2019-10-23 15:04:14] Fuseki INFO [67] 200 OK (268 ms)
Everything is OK :P
Step 5:
Using curl :
curl -X DELETE http://localhost:3030/$/datasets/dataset_name
Jena Fuseki logs
[2019-10-23 15:10:17] Admin INFO [92] DELETE http://localhost:3030/$/datasets/dataset_name
[2019-10-23 15:10:17] Admin INFO [92] DELETE ds=/dataset_name
[2019-10-23 15:10:17] Server INFO Shutting down data service for [, data, upload, query, get, update, sparql]
[2019-10-23 15:10:17] Admin WARN [92] RC = 500 : Not in a transaction
org.apache.jena.tdb.transaction.TDBTransactionException: Not in a transaction
at org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetGraphTransaction.java:140)
at org.apache.jena.tdb.transaction.DatasetGraphTransaction.getDatasetGraphToQuery(DatasetGraphTransaction.java:86)
at org.apache.jena.tdb.store.GraphTxnTDB.getDatasetGraphTDB(GraphTxnTDB.java:51)
at org.apache.jena.tdb.store.GraphTDB.sync(GraphTDB.java:128)
at org.apache.jena.tdb.store.GraphTDB.close(GraphTDB.java:133)
at org.apache.jena.reasoner.BaseInfGraph.close(BaseInfGraph.java:445)
at org.apache.jena.reasoner.rulesys.BasicForwardRuleInfGraph.close(BasicForwardRuleInfGraph.java:360)
at org.apache.jena.reasoner.rulesys.FBRuleInfGraph.close(FBRuleInfGraph.java:710)
at org.apache.jena.sparql.core.DatasetGraphMapLink.close(DatasetGraphMapLink.java:199)
at org.apache.jena.fuseki.server.DataService.expel(DataService.java:223)
at org.apache.jena.fuseki.server.DataService.shutdown(DataService.java:199)
at org.apache.jena.fuseki.mgt.ActionDatasets.execDeleteItem(ActionDatasets.java:360)
at org.apache.jena.fuseki.ctl.ActionContainerItem.execDelete(ActionContainerItem.java:105)
at org.apache.jena.fuseki.ctl.ActionContainerItem.perform(ActionContainerItem.java:64)
at org.apache.jena.fuseki.ctl.ActionCtl.executeLifecycle(ActionCtl.java:68)
at org.apache.jena.fuseki.ctl.ActionCtl.executeAction(ActionCtl.java:62)
at org.apache.jena.fuseki.ctl.ActionCtl.execCommonWorker(ActionCtl.java:53)
at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
at org.apache.jena.fuseki.ctl.ActionContainerItem.doDelete(ActionContainerItem.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:101)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
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:1642)
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:1634)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:690)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:503)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:745)
[2019-10-23 15:10:17] Admin INFO [92] 500 Not in a transaction (65 ms)
Here is the problem. Anyone can help solving this ?
Thoughts / Tries
I try same procedure with the default dataset configuration file and get no error. So I asume this come from the dataset configuration file.
Here what I called default dataset configuration file:
#prefix : <http://base/#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix tdb2: <http://jena.apache.org/2016/tdb#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix fuseki: <http://jena.apache.org/fuseki#> .
:service_tdb_all a fuseki:Service ;
rdfs:label "TDB2 dataset_name" ;
fuseki:dataset :tdb_dataset_readwrite ;
fuseki:name "dataset_name" ;
fuseki:serviceQuery "query" , "sparql" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" .
:tdb_dataset_readwrite a tdb2:DatasetTDB2 ;
tdb2:location "/fuseki/databases/dataset_name" .
I don't find any clear enought for me documentation on how to properly configure Jena Fuseki. Lots of exemples can be found but dated from some years, don't know if they are still uptodate. And no explanation on how they really works so it is hard to addapt to a specific case.
If any docs / tutorial to explain what are "ja:RDFDataset", "ja:InfModel" and other "ja:things" and how they works would be much appreciated.
I'm still starting with ontology/triplestores/linked data and thoses docs are not the easiest to read :
https://jena.apache.org/documentation/assembler/
https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/assembler/JA.html
I tried different configuration examples and always get errors either on steps 1 or 5.
Example
Config:
#prefix : <#> .
#prefix fuseki: <http://jena.apache.org/fuseki#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#service>
) .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model base data in TDB.
<#service> rdf:type fuseki:Service ;
fuseki:name "dataset_name" ;
fuseki:serviceQuery "query" , "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset <#dataset> ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model> ;
.
<#model> rdf:type ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner> ;
] ;
.
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> ;
.
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "/fuseki/databases/dataset_name" ;
.
Error on step 1.
Fuseki log:
[2019-10-23 15:20:51] Admin INFO [93] POST http://localhost:3030/$/datasets
[2019-10-23 15:20:51] Admin INFO [93] Filename: dataset.ttl, Content-Type=text/turtle, Charset=null => Turtle : Count=23 Triples=23 Quads=0
[2019-10-23 15:20:51] Admin INFO [93] Create database : name = /dataset_name
[2019-10-23 15:20:51] Admin WARN [93] RC = 500 : cannot find a most specific type for :tdbGraph, which has as possibilities: ja:Model tdb:GraphTDB.
org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot find a most specific type for :tdbGraph, which has as possibilities: ja:Model tdb:GraphTDB.

The full server provides delete for databases created through the UI or protocol using one of the templates. Arbitrary configuration files pushed the server can't be deleted this way; even if they can be unlinked from the server, there might be stuff left around (they are arbitrary assmbler files) which isn't good for testing.
For testing, there is a simpler way. Spin up a server for each test, either scripted or from Java (JUnit etc).. The "Fuseki main" version of the server starts and stops quite quickly. So start a server with the configuration required - and you can use an in-memory TDB database (location is "--mem--") for the data if the data is reasonably small.
This will complete clearup when the server exits, making the tests cleanly isolated.

Related

How to fix "ERROR Exception in init...model was aborted because of Read-only object file" with stain/jena-fuseki ? Docker, reasoner, TDB

"This question was solved by updating Jena Fuseki to latest version (>=v3.11.0). Thanks to #AndyS answer.".
Summary
I'm setting up a Jena Fuseki Dockerfile with a preconfigured dataset to ease Jena Fuseki configuration for my application.
I'm using the following Dockerfile:
FROM stain/jena-fuseki:3.10.0
COPY ./db_tdb.ttl /fuseki/configuration/
COPY ./ontology.rules /fuseki/configuration/
COPY ./ontology /fuseki/ontology/
Here is the file architecture used:
-- Dockerfile (Dockerfile for building the image)
-- db_tdb.ttl (Configuration file for the dataset)
-- ontology.rules (Define inference rules)
-- ontology (Folder contain ontology files description)
---- ontFile1.rdf
---- ontFile2.rdf
I build and run my image with following commands:
docker build -t myfuseki .
docker run -it -p 3030:3030 -e JVM_ARGS=-Xmx2048M myfuseki:latest
I'm getting the following error on running:
[2019-09-12 16:14:09] Server ERROR Exception in initialization: the loading of content into :model was aborted because of Read-only object file
What does this error means ? How to fix it?
Some of what I try
As the "model was aborted because of Read-only object file" I think it could be a file rights issue.
So I tried to change ontology files rights to 777 (not the best idea I know, but was for testing purpose) in the container.
But I still get the same issue.
File / Errors contents
Here is my db_tdb.ttl config file for Jena Fuseki:
#prefix : <#> .
#prefix fuseki: <http://jena.apache.org/fuseki#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#service1>
) .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model base data in TDB.
<#service1> rdf:type fuseki:Service ;
fuseki:name "server" ;
fuseki:serviceQuery "query" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset <#dataset> ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model> ;
.
<#model> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:content <#ontFile1> , <#ontFile2>;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ;
ja:rulesFrom <file:./ontology.rules>
] ;
.
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> ;
.
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "/fuseki/databases/bemserver" ;
.
# Ontology files
<#ontFile1> ja:externalContent <file:/fuseki/ontology/ontFile1.rdf> .
<#ontFile2> ja:externalContent <file:/fuseki/ontology/ontFile2.rdf> .
Here is the full error:
[2019-09-12 16:14:09] Server ERROR Exception in initialization: the loading of content into :model was aborted because of Read-only object file
[2019-09-12 16:14:09] WebAppContext WARN Failed startup of context o.e.j.w.WebAppContext#6e4ea0bd{Apache Jena Fuseki Server,/,file:///jena-fuseki/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.TransactionAbortedException: the loading of content into :model was aborted because of Read-only object file
doing:
root: file:///fuseki/configuration/db_tdb.ttl#model with type: http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler class: class org.apache.jena.assembler.assemblers.InfModelAssembler
root: file:///fuseki/configuration/db_tdb.ttl#dataset with type: http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler class: class org.apache.jena.sparql.core.assembler.DatasetAssembler
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)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
at org.apache.jena.assembler.assemblers.AssemblerGroup.openModel(AssemblerGroup.java:47)
at org.apache.jena.sparql.core.assembler.DatasetAssembler.createDataset(DatasetAssembler.java:56)
at org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:43)
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)
at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
at org.apache.jena.fuseki.build.FusekiConfig.getDataset(FusekiConfig.java:345)
at org.apache.jena.fuseki.build.FusekiConfig.buildDataService(FusekiConfig.java:299)
at org.apache.jena.fuseki.build.FusekiConfig.buildDataAccessPoint(FusekiConfig.java:289)
at org.apache.jena.fuseki.build.FusekiConfig.readConfiguration(FusekiConfig.java:272)
at org.apache.jena.fuseki.build.FusekiConfig.readConfigurationDirectory(FusekiConfig.java:251)
at org.apache.jena.fuseki.webapp.FusekiWebapp.initializeDataAccessPoints(FusekiWebapp.java:226)
at org.apache.jena.fuseki.webapp.FusekiServerListener.serverInitialization(FusekiServerListener.java:98)
at org.apache.jena.fuseki.webapp.FusekiServerListener.contextInitialized(FusekiServerListener.java:56)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:952)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:917)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:410)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.server.Server.start(Server.java:416)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:383)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.apache.jena.fuseki.cmd.JettyFusekiWebapp.start(JettyFusekiWebapp.java:138)
at org.apache.jena.fuseki.cmd.FusekiCmd.runFuseki(FusekiCmd.java:372)
at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:356)
at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:104)
at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67)
Caused by: org.apache.jena.tdb.TDBException: Read-only object file
at org.apache.jena.tdb.base.objectfile.ObjectFileReadonly.write(ObjectFileReadonly.java:28)
at org.apache.jena.tdb.lib.NodeLib.encodeWrite(NodeLib.java:85)
at org.apache.jena.tdb.lib.NodeLib.encodeStore(NodeLib.java:73)
at org.apache.jena.tdb.store.nodetable.NodeTableNative.writeNodeToTable(NodeTableNative.java:172)
at org.apache.jena.tdb.store.nodetable.NodeTableNative.accessIndex(NodeTableNative.java:147)
at org.apache.jena.tdb.store.nodetable.NodeTableNative._idForNode(NodeTableNative.java:120)
at org.apache.jena.tdb.store.nodetable.NodeTableNative.getAllocateNodeId(NodeTableNative.java:76)
at org.apache.jena.tdb.store.nodetable.NodeTableWrapper.getAllocateNodeId(NodeTableWrapper.java:40)
at org.apache.jena.tdb.store.nodetable.NodeTableInline.getAllocateNodeId(NodeTableInline.java:51)
at org.apache.jena.tdb.store.nodetupletable.NodeTupleTableConcrete.addRow(NodeTupleTableConcrete.java:85)
at org.apache.jena.tdb.store.DatasetPrefixesTDB.insertPrefix(DatasetPrefixesTDB.java:62)
at org.apache.jena.sparql.graph.GraphPrefixesProjection.setNsPrefix(GraphPrefixesProjection.java:41)
at org.apache.jena.sparql.graph.GraphPrefixesProjection.lambda$setNsPrefixes$0(GraphPrefixesProjection.java:66)
at java.util.HashMap$EntrySet.forEach(HashMap.java:1043)
at org.apache.jena.sparql.graph.GraphPrefixesProjection.setNsPrefixes(GraphPrefixesProjection.java:65)
at org.apache.jena.sparql.graph.GraphPrefixesProjection.setNsPrefixes(GraphPrefixesProjection.java:59)
at org.apache.jena.rdf.model.impl.ModelCom.setNsPrefixes(ModelCom.java:1055)
at org.apache.jena.assembler.assemblers.ContentAssembler$1.fill(ContentAssembler.java:146)
at org.apache.jena.assembler.Content.fill(Content.java:62)
at org.apache.jena.assembler.Content.fill(Content.java:62)
at org.apache.jena.assembler.assemblers.ModelAssembler.addContent(ModelAssembler.java:54)
... 51 more
Thanks for your help :P

Omniture Adobe Single Page React implementation not showing up in reporting

We have a react implementation for adobe analytics, the network calls are exactly the same from non react vs react. The same variables with the same values are being sent to both, but it seems like the react side doesn't show up correctly in Adobe Reporting, even though people are confirm the configuration is the same for all environments.
Did anybody run into any issues, and any possible solutions they took to get it to work properly. Thanks
This is a sample call removed some of the URLS where XXX is, the call returns an OK 200
. AQB:1
. ndh:1
. pf:1
. t:13/1/2018 19:41:45 2 300
. ts:1518568905165
. fid:222B73C92E72E4AF-1050B1DB767A269E
. ce:ISO-8859-1
. ns:XXX
. pageName:motorsport
. g:XXX
. r:XXX
. cc:USD
. ch:motorsport
. server:XXX
. state:New Jersey
. zip:07024
. events:prodView,event39
. products:Modules;Mod053;;;event39=1,Modules;Mod050;;;event39=1,Modules;Mod054;;;event39=1,Modules;Mod047;;;event39=1,Modules;Mod053;;;event39=1,Modules;Mod050;;;event39=1,Modules;Mod054;;;event39=1,Modules;Mod047;;;event39=1,Modules;Mod053;;;event39=1,Modules;Mod050;;;event39=1,Modules;Mod054;;;event39=1,Modules;Mod047;;;event39=1
. c1:D=g
. v1:D=pageName
. v2:product research: videos
. v3:Organic
. c9:motorsport: touring cars: index
. c10:motorsport
. v23:homepage: join
. v24:73b3d36a-2f59-41c7-aae6-73d13c08d9b8
. v28:Mod: Navigation: MOTORSPORT: GT
. v30:33c03cef-942b-47a9-a95a-c33bac0c21d0
. v31:Logged
. c32:D=v28
. c35:D=v30
. v35:Less than 1 day
. v36:7:30PM
. c37:D=v31
. v37:Tuesday
. v38:Weekday
. c39:28
. c40:D=v36
. c41:D=v37
. c42:D=v38
. v42:D=ch
. v43:D=g
. v44:D=s_vi
. v45:c30e9d2d-d35a-4297-8892-efcae2d76dcc
. c46:D=v35
. c49:0f124b6a-a68a-49fd-95ec-047f440be29f
. c50:2.0.0 | 11.27.2017
. c52:D=v24
. c60:D=v60
. v60:XXX
. v61:Active
. c68:D=v68
. v68:MTOD: 2c92c0f952f30dd50152f64979211f69
. c74:D=v74
. v74:2c92c0f860017d940160043310752610
. s:1440x900
. c:24
. j:1.6
. v:N
. k:Y
. bw:1314
. bh:761
. AQE:1
The behavior shows up in the adobe debugger and network calls fine, just never populates in the reports, or if it does there are a lot of unspecified instead of actual values, majority of the times it's doesn't show up at all.
The main question is if the network calls are the same is this a code issue or config issue? Thanks

fuseki webinterface does not show datasets

I have installed fuseki and start the server with
#!/bin/sh
cd /home/frank/localInstall/jena/apache-jena-fuseki-2.5.0
exec /home/frank/localInstall/jena/apache-jena-fuseki-2.5.0/fuseki-server -v --update --mem /testDB
The server is working and programs can store data in /testDB, but the webinterface does not show the datasets and I cannot add a dataset. When I try to query the interface says Please select a dataset.
I think I had this problem before and solved it by reinstalling the fuseki folder. I would like to understand what I did wrong and how to avoid this problem.
Thank you!
the config file is the one automatically generated. It is:
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
## Fuseki Server configuration file.
#prefix : <#> .
#prefix fuseki: <http://jena.apache.org/fuseki#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
# Example::
# Server-wide query timeout.
#
# Timeout - server-wide default: milliseconds.
# Format 1: "1000" -- 1 second timeout
# Format 2: "10000,60000" -- 10s timeout to first result,
# then 60s timeout for the rest of query.
#
# See javadoc for ARQ.queryTimeout for details.
# This can also be set on a per dataset basis in the dataset assembler.
#
# ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "30000" ] ;
# Add any custom classes you want to load.
# Must have a "public static void init()" method.
# ja:loadClass "your.code.Class" ;
# End triples.
.
How should I change it, if I want to datasets available to clients and to the webbrowser interface?
The problem was not with the config file, but with the default shiro.ini file in .../apache-jena-fuseki-2.5.0/run/shiro.ini. The default values do only allow local access and my access was a server. The instructions to change are clear enough. Here the relevant parts after the change:
[users]
# Implicitly adds "iniRealm = org.apache.shiro.realm.text.IniRealm"
admin=passXXX ## changed
[roles]
[urls]
## Control functions open to anyone
/$/status = anon
/$/ping = anon
## and the rest are restricted to localhost.
##/$/** = localhostFilter ## commented out
## If you want simple, basic authentication user/password
## on the operations,
## 1 - set a better password in [users] above.
## 2 - comment out the "/$/** = localhost" line and use:
"/$/** = authcBasic,user[admin]" ## enabled, removed ##
I assume that it is explained somewhere and I read it and forgot it when I moved from my localhost installation to a server. It would be helpful if the interface would indicate that permissions are not given in stead of inviting to select a dataset.

Difference in owl:hasValue and owl:oneOf support in Jena's OWLMicroReasoner?

I'm playing with deriving instance type from its value information using value restrictions:
:SpaceMission rdf:type owl:Class .
:shuttleUsed rdf:type owl:ObjectProperty ;
rdfs:domain :SpaceMission .
:Apollo11 rdf:type owl:NamedIndividual .
:Mission11 rdf:type :SpaceMission , owl:NamedIndividual ;
:shuttleUsed :Apollo11 .
:ApolloMission rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Class ;
owl:intersectionOf ( :SpaceMission
[ rdf:type owl:Restriction ;
owl:onProperty :shuttleUsed ;
owl:hasValue :Apollo11
]
)
] .
The single value restriction owl:hasValue works fine and the SPARQL for type of :Mission11 returns :SpaceMission and :ApolloMission as expected. Then I add the second value restriction for definition of the class :ApolloMission:
:Apollo13 rdf:type owl:NamedIndividual .
:ApolloMission rdf:type owl:Class ;
owl:equivalentClass [ rdf:type owl:Class ;
owl:intersectionOf ( :SpaceMission
[ rdf:type owl:Restriction ;
owl:onProperty :shuttleUsed ;
owl:someValuesFrom [ rdf:type owl:Class ;
owl:oneOf ( :Apollo11
:Apollo13
)
]
]
)
] .
(The restriction type has automatically changed from owl:hasValue to owl:someValuesFrom). In this case the expected inference of type :ApolloMission for the individual :Mission11 is not returned, but only the :SpaceMission. Do I have something wrong? Or the the type inference is only possible with value restriction of type owl:hasValue?
I'm using Jena's OWLMicroReasoner and running the SPARQL query for
{<:Mission11> a ?type}. Maybe it is not able to infer from owl:someValuesFrom restriction. As I said the owl:hasValue restriction did work with Jena's micro reasoner. Does Jena's built-in reasoner support the owl:someValuesFrom restriction?
It's generally more helpful if you can provide an entire ontology that we can work with for testing. This one isn't too big, so it wasn't too hard to recreate. At any rate, I've reproduced it, and it's included at the end of this answer.
The inference is valid in OWL
The inference you're looking for is valid in OWL, and we can see that by using a logically complete OWL reasoner, e.g., Pellet. We'll see this in Protégé (but you could have used Pellet with Jena, too.) Here's what the ontology, recreated in Protégé look like:
Then, when we enable the Pellet reasoner and ask for instances of ApolloMission, we get Mission11, as expected:
Since you said you were asking for the types of Mission11, perhaps you used a query like asking for superclass of {Mission11}. This produces the expected classes, too:
Reproduced Ontology
#prefix : <http://stackoverflow.com/q/21223545/1281433/space.owl#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix owl: <http://www.w3.org/2002/07/owl#> .
#prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix space: <http://stackoverflow.com/q/21223545/1281433/space.owl#> .
<http://stackoverflow.com/q/21223545/1281433/space.owl>
a owl:Ontology .
space:Mission11 a owl:NamedIndividual , space:SpaceMission ;
space:shuttleUsed space:Apollo11 .
space:shuttleUsed a owl:ObjectProperty ;
rdfs:domain space:SpaceMission .
space:Apollo13 a owl:Thing , owl:NamedIndividual .
space:ApolloMission a owl:Class ;
owl:equivalentClass [ a owl:Class ;
owl:intersectionOf ( space:SpaceMission [ a owl:Restriction ;
owl:onProperty space:shuttleUsed ;
owl:someValuesFrom [ a owl:Class ;
owl:oneOf ( space:Apollo13 space:Apollo11 )
]
] )
] .
space:SpaceMission a owl:Class .
space:Apollo11 a owl:Thing , owl:NamedIndividual .
Why you don't get some results with Jena's reasoners
Jena's reasoners are not complete. That doesn't mean that they're not finished; complete is a technical term in formal reasoning describing a reasoner (or algorithm, etc.) that means that there are correct inferences according to the semantics of the language that the reasoner won't produce. The reason that Jena's reasoners are incomplete has to do with the implementation strategy (using a rule-based reasoner), and with efficiency considerations (we can accept a trade-off between speed and the inferences that we can get).
For more about Jena's reasoners, you should look at Reasoners and rule engines: Jena inference support from the documentation. It's not entirely up to date though, as it says, for instance:
The critical constructs which go beyond OWL/lite and are not supported
in the Jena OWL reasoner are complementOf and oneOf. As noted above
the support for unionOf is partial (due to limitations of the rule
based approach) but is useful for traversing class hierarchies.
but as the following code shows, there is, in fact, support for owl:oneOf in some of the reasoners, and so some of the reasoners can make the ApolloMission inference that you want.
Jena provides a number of reasoners, and the easiest way to get an OntModel that is connected to them is by using the static OntModelSpecs that are declared in OntModelSpec. The following Java code shows that with the final ontology that you provided, the different reasoners provide different results. (The reflective code for getting the different OntModelSpecs is a bit hackish, but for a quick example, it's fine.) The code constructs an OntModel for each of the declared specs starting with "OWL_", and runs the query against them.
import java.lang.reflect.Field;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.ontology.OntModelSpec;
import com.hp.hpl.jena.query.QueryExecutionFactory;
import com.hp.hpl.jena.query.ResultSetFormatter;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
public class JenaReasonersSpaceExample {
private final static String QUERY =
"PREFIX : <http://stackoverflow.com/q/21223545/1281433/space.owl#>\n" +
"select ?type where {\n" +
" :Mission11 a ?type .\n" +
"}\n";
private final static Model base =
ModelFactory.createDefaultModel()
.read( "file:///home/taylorj/tmp/ontologies/space/space.owl" );
public static void main(final String[] args) throws IllegalArgumentException, IllegalAccessException {
// Iterate through the fields of OntModelSpec and for each one whose name
// begins with "OWL_", assume that it's a static field (so that getField
// can accept null), and that its value is an OntModelSpec (so that we
// can cast and create an OntModel with it and the base model).
// that begin with "OWL_", and assume t
for ( final Field field : OntModelSpec.class.getFields() ) {
if ( field.getName().startsWith("OWL_") ) {
final OntModelSpec spec = (OntModelSpec) field.get(null);
final OntModel model = ModelFactory.createOntologyModel( spec, base );
// Run the query against the model (that will use the specified reasoner)
// and show the field that we used and the results that we get.
System.out.println( "\n=== "+field.getName()+" ===" );
ResultSetFormatter.out(QueryExecutionFactory.create(QUERY, model).execSelect());
}
}
}
}
The output follows. Some of the reasoners can infer that Mission11 is an ApolloMission. These are the ones used by the specs: OWL_MEM_RULE_INF, OWL_MEM_MINI_RULE_INF, OWL_DL_MEM_RULE_INF, and OWL_LITE_MEM_RULES_INF. It looks like you might want to stick to reasoners that have RULE in the name.
=== OWL_MEM ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
------------------------------------------------------------------------
=== OWL_MEM_RDFS_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
------------------------------------------------------------------------
=== OWL_MEM_TRANS_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
------------------------------------------------------------------------
=== OWL_MEM_RULE_INF ===
-------------------------------------------------------------------------
| type |
=========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2002/07/owl#Thing> |
| _:b0 |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
| _:b1 |
| <http://stackoverflow.com/q/21223545/1281433/space.owl#ApolloMission> |
-------------------------------------------------------------------------
=== OWL_MEM_MICRO_RULE_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2002/07/owl#Thing> |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
------------------------------------------------------------------------
=== OWL_MEM_MINI_RULE_INF ===
-------------------------------------------------------------------------
| type |
=========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2002/07/owl#Thing> |
| _:b0 |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
| _:b1 |
| <http://stackoverflow.com/q/21223545/1281433/space.owl#ApolloMission> |
-------------------------------------------------------------------------
=== OWL_DL_MEM ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
------------------------------------------------------------------------
=== OWL_DL_MEM_RDFS_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
------------------------------------------------------------------------
=== OWL_DL_MEM_TRANS_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
------------------------------------------------------------------------
=== OWL_DL_MEM_RULE_INF ===
-------------------------------------------------------------------------
| type |
=========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2002/07/owl#Thing> |
| _:b0 |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
| <http://stackoverflow.com/q/21223545/1281433/space.owl#ApolloMission> |
| _:b1 |
-------------------------------------------------------------------------
=== OWL_LITE_MEM ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
------------------------------------------------------------------------
=== OWL_LITE_MEM_TRANS_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
------------------------------------------------------------------------
=== OWL_LITE_MEM_RDFS_INF ===
------------------------------------------------------------------------
| type |
========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
------------------------------------------------------------------------
=== OWL_LITE_MEM_RULES_INF ===
-------------------------------------------------------------------------
| type |
=========================================================================
| <http://stackoverflow.com/q/21223545/1281433/space.owl#SpaceMission> |
| <http://www.w3.org/2002/07/owl#NamedIndividual> |
| <http://www.w3.org/2002/07/owl#Thing> |
| _:b0 |
| <http://www.w3.org/2000/01/rdf-schema#Resource> |
| <http://stackoverflow.com/q/21223545/1281433/space.owl#ApolloMission> |
| _:b1 |
-------------------------------------------------------------------------

Stardog 2.0 DataNotImpl cannot be cast to ClassExpression

I've created a (disk) database using stardog 2.0.0.
I've loaded my ontology and some data to this database.
I can see my ontology's axioms and this data when I execute the following command:
./stardog query -v --username user --passwd pass dbname "select * where { ?s ?p ?o }"
This is a selection of the returned axioms:
?s ?p ?o
| http://www.ugent.be/chest#Infection | rdf:type | owl:Class |
| http://www.ugent.be/chest#Infection | rdf:type | http://www.ugent.be/chest#RespiratoryInfection |
| http://www.ugent.be/chest#Infection | rdf:type | owl:NamedIndividual |
| http://www.ugent.be/chest#Infection | rdfs:subClassOf | http://www.ugent.be/chest#Pathology |
This is a selection of the returned data:
| <http://www.ugent.be/chest#Infection/4641> | rdf:type | <http://www.ugent.be/chest#Infection> |
| <http://www.ugent.be/chest#Infection/4642> | rdf:type | <http://www.ugent.be/chest#Infection> |
| <http://www.ugent.be/chest#Infection/4643> | rdf:type | <http://www.ugent.be/chest#Infection> |
| <http://www.ugent.be/chest#Infection/4644> | rdf:type | <http://www.ugent.be/chest#Infection> |
When I try to execute a query to retrieve all individuals with rdf:type Infection I get nothing.
./stardog query -v --username user --passwd pass "chest" "PREFIX : <http://www.ugent.be/chest#> select ?s where { ?s rdf:type :Infection }"
When I add reasoning type QL or EL I get
:Infection
When I add reasoning type DL I get:
com.clarkparsia.pellet.api.term.impl.entity.DataNotImpl cannot be cast to com.clarkparsia.pellet.api.term.entity.ClassExpression
The same goes for a consistency check.
Am i doiing something wrong?
DL reasoning is only permitted for queries over your TBox, so your given query won't be answered using reasoning; keep that in mind when using Stardog's reasoning capabilities.
With that said, you're never supposed to get a ClassCastException. Try with the latest Stardog, you're three releases behind, and if the problem still exists, send a self-contained minimal example to the mailing list and we'll be happy to fix it.

Resources