OWL Inference problems using max cardinality in restriction class - sparql

I have created an ontology in protege. I am using the Pellet reasoner (it is enabled) and the snap sparql plugin.
I am trying to declare a small enterprise as an enterprise that has at most 20 employees.
Here are my triples. I am not able to see the inference that cs:SmithBrothers is a cs:SmallEnterprise (by the way of SPARQL query). Can someone please help me? I have been at this literally all day.
# employs
cs:employs a owl:ObjectProperty ;
rdfs:range cs:employee ;
rdfs:domain cs:enterprise .
# is-employed-by (the inverse of employs)
cs:isEmployedBy a owl:ObjectProperty ;
owl:inverseOf cs:employs .
# j. A small enterprise is an enterprise which employs at most 20 employees.
cs:smallEnterprise a owl:class ;
owl:equivalentClass [
owl:intersectionOf (
[ a owl:Restriction ;
owl:onProperty cs:employs ;
owl:maxCardinality 20 ]
cs:enterprise
)] .
# x. SmithBrothers is a family-based enterprise.
cs:SmithBrothers a cs:enterprise .
# y. Frank, Lea, Dave, Kate, Dino are employed by SmithBrothers.
cs:Frank cs:isEmployedBy cs:SmithBrothers .
cs:Lea cs:isEmployedBy cs:SmithBrothers .
cs:Dave cs:isEmployedBy cs:SmithBrothers .
cs:Kate cs:isEmployedBy cs:SmithBrothers .
cs:Dino cs:isEmployedBy cs:SmithBrothers .
#########################################
Thanks in advance.

Related

Why does the OSPG.dat file grows so much more than all other files?

Dear Jena Community,
I'm running Jena Fuseki Version 4.4.0 as a container on an OpenShift Cluster.
OS Version Info (cat /etc/os-release):
NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Ootpa)"
ID="rhel"
ID_LIKE="fedora" ="8.5"
...
Hardware Info (from Jena Fuseki initialization log):
[2023-01-27 20:08:59] Server INFO Memory: 32.0 GiB
[2023-01-27 20:08:59] Server INFO Java: 11.0.14.1
[2023-01-27 20:08:59] Server INFO OS: Linux 3.10.0-1160.76.1.el7.x86_64 amd64
[2023-01-27 20:08:59] Server INFO PID: 1
Disk Info (df -h):
Filesystem Size Used Avail Use% Mounted on
overlay 99G 76G 18G 82% /
tmpfs 64M 0 64M 0% /dev
tmpfs 63G 0 63G 0% /sys/fs/cgroup
shm 64M 0 64M 0% /dev/shm
/dev/mapper/docker_data 99G 76G 18G 82% /config
/data 1.0T 677G 348G 67% /usr/app/run
tmpfs 40G 24K 40G 1%
My dataset is built using TDB2, and currently has the following RDF Stats:
Triples: 65KK (Approximately 65 million)
Subjects: ~20KK (Aproximately 20 million)
Objects: ~8KK (Aproximately 8 million)
Graphs: ~213K (Aproximately 213 thousand)
Predicates: 153
The files corresponding to this dataset alone on disk sum up to approximately 671GB (measured with du -h).
From these, the largest files are:
/usr/app/run/databases/my-dataset/Data-0001/OSPG.dat: 243GB
/usr/app/run/databases/my-dataset/Data-0001/nodes.dat: 76GB
/usr/app/run/databases/my-dataset/Data-0001/POSG.dat: 35GB
/usr/app/run/databases/my-dataset/Data-0001/nodes.idn: 33GB
/usr/app/run/databases/my-dataset/Data-0001/POSG.idn: 29GB
/usr/app/run/databases/my-dataset/Data-0001/OSPG.idn: 27GB
I've looked into several documentation pages, source code, forums, ... nowhere I was able to find some explanation to why OSPG.dat is so much larger than all other files.
I've been using Jena for quite some time now and I'm well aware that its indexes grow significantly during usage, specially when triples are being added across multiple requests (transactional workloads).
Even though, the size of this particular file (OSPG.dat) surprised me, as in my prior experience the indexes would never get larger than the nodes.dat file.
Is there a reasonable explanation for this based on the content of the dataset or the way it was generated? Could this be an indexing bug within TDB2?
Thank you for your support!
For completeness, here is the assembler configuration for my dataset:
#prefix : <http://base/#> .
#prefix fuseki: <http://jena.apache.org/fuseki#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#prefix root: <http://dev-test-jena-fuseki/$/datasets#> .
#prefix tdb2: <http://jena.apache.org/2016/tdb#> .
tdb2:GraphTDB rdfs:subClassOf ja:Model .
ja:ModelRDFS rdfs:subClassOf ja:Model .
ja:RDFDatasetSink rdfs:subClassOf ja:RDFDataset .
<http://jena.hpl.hp.com/2008/tdb#DatasetTDB>
rdfs:subClassOf ja:RDFDataset .
tdb2:GraphTDB2 rdfs:subClassOf ja:Model .
<http://jena.apache.org/text#TextDataset>
rdfs:subClassOf ja:RDFDataset .
ja:RDFDatasetZero rdfs:subClassOf ja:RDFDataset .
:service_tdb_my-dataset
rdf:type fuseki:Service ;
rdfs:label "TDB my-dataset" ;
fuseki:dataset :ds_my-dataset ;
fuseki:name "my-dataset" ;
fuseki:serviceQuery "sparql" , "query" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore
"data" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" .
ja:ViewGraph rdfs:subClassOf ja:Model .
ja:GraphRDFS rdfs:subClassOf ja:Model .
tdb2:DatasetTDB rdfs:subClassOf ja:RDFDataset .
<http://jena.hpl.hp.com/2008/tdb#GraphTDB>
rdfs:subClassOf ja:Model .
ja:DatasetTxnMem rdfs:subClassOf ja:RDFDataset .
tdb2:DatasetTDB2 rdfs:subClassOf ja:RDFDataset .
ja:RDFDatasetOne rdfs:subClassOf ja:RDFDataset .
ja:MemoryDataset rdfs:subClassOf ja:RDFDataset .
ja:DatasetRDFS rdfs:subClassOf ja:RDFDataset .
:ds_my-dataset rdf:type tdb2:DatasetTDB2 ;
tdb2:location "run/databases/my-dataset" ;
tdb2:unionDefaultGraph true ;
ja:context \[ ja:cxtName "arq:optFilterPlacement" ;
ja:cxtValue "false"
\] .
Updates:
Currently, I'm trying to recreate the dataset from an NQuads Backup (~15GB after decompression) in the hope the index sizes will decrease. Nonetheless, as this dataset will continue to grow during the system usage it would be helpful to understand what caused this astounding growth in this particular index.

Fuseki Named Graph persistence with inference

I am trying to persist multiple named graphs with inference in Fuseki.
I am referring to this excellent article, but facing some issues in Scenario 2: named graphs and no online updates.
My assembler configuration looks like this:
#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#> .
## ---------------------------------------------------------------
## Updatable TDB dataset with all services enabled.
:service_tdb_all rdf:type fuseki:Service ;
rdfs:label "TDB onekg-metadata-dev" ;
fuseki:name "onekg-metadata-dev" ;
fuseki:serviceQuery "" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceQuery "query" ;
fuseki:serviceUpdate "" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset :dataset ;
.
# Location of the TDB dataset
:tdb_dataset_readwrite
a tdb:DatasetTDB ;
tdb:location "reasoning-dir" ;
.
# Inference dataset
:dataset a ja:RDFDataset ;
ja:defaultGraph :model_inf .
# Inference Model
:model_inf a ja:InfModel ;
ja:baseModel :graph ;
ja:reasoner [
ja:reasonerURL
<http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
] .
# Intermediate graph referencing to the union graph
:graph rdf:type tdb:GraphTDB ;
tdb:dataset :tdb_dataset_readwrite ;
.
I am uploading some triples in a named graph and can query the triples(without inference) as is expected.
However, if I try to restart and try to query again, the named graph is missing and I can not query anything from there.
I would like to get some help here. Thank you in advance.

OWL/owlapi: Get Individuals with "unsatisfied" Object Properties

I'm working with an OWL Ontology in Protégé 5.1.0 (plus HermiT 1.3.8.413 Reasoner) that I later want to use with OWLAPI 4.1.0 and maybe DL-Query or SPARQL. My task at hand is to get all Individuals of a class that have a certain Object Property unfulfilled. Because of the open-world assumption, an unfulfilled Object Property doesn't usually show up as a problem, but I need the information and would like to avoid writing my own code to check the whole ontology.
I prepared I small example, as readable text and Turtle-code:
Classes: Pizza, Topping
Object Property: has
Assertion: Pizza has some Topping
Individuals: Pizza1, Pizza2, Topping1, Topping2 (of respective Classes)
Assertion: Pizza1 has Topping1
Code:
#prefix : <http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#> .
#prefix owl: <http://www.w3.org/2002/07/owl#> .
#prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#prefix xml: <http://www.w3.org/XML/1998/namespace> .
#prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
#base <http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23> .
<http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23> rdf:type owl:Ontology .
#################################################################
# Object Properties
#################################################################
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#has
:has rdf:type owl:ObjectProperty ;
owl:inverseOf :isOn .
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#isOn
:isOn rdf:type owl:ObjectProperty ,
owl:FunctionalProperty .
#################################################################
# Classes
#################################################################
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#Pizza
:Pizza rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :has ;
owl:someValuesFrom :Topping
] .
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#Topping
:Topping rdf:type owl:Class .
#################################################################
# Individuals
#################################################################
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#Pizza1
:Pizza1 rdf:type owl:NamedIndividual ,
:Pizza ;
:has :Topping1 .
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#Pizza2
:Pizza2 rdf:type owl:NamedIndividual ,
:Pizza .
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#Topping1
:Topping1 rdf:type owl:NamedIndividual ,
:Topping ;
:isOn :Pizza1 .
### http://www.semanticweb.org/user/ontologies/2017/0/untitled-ontology-23#Topping2
:Topping2 rdf:type owl:NamedIndividual ,
:Topping .
#################################################################
# General axioms
#################################################################
[ rdf:type owl:AllDifferent ;
owl:distinctMembers ( :Pizza1
:Pizza2
)
] .
[ rdf:type owl:AllDifferent ;
owl:distinctMembers ( :Topping1
:Topping2
)
] .
### Generated by the OWL API (version 4.2.6.20160910-2108) https://github.com/owlcs/owlapi
In this case, I would like to query the ontology and get the information that Pizza2 currently doesn't have any Topping, i.e. its Object Property is not asserted or inferred. Also, if Topping1 is changed to be of a different class, I now want to see Pizza1 show up in the query as well because "Pizza has some Topping" is unsatisfied.
Is there an elegant way to do this either directly in OWLAPI or using DL-Query/SPARQL?

Is it possible to query inferred Einstein Riddle knowledge from OWLIM?

I have OWLIM repository populated with Einstein Riddle owl.
Link1 - Link2. Is it possible to query inferred knowledge from OWLIM using sparql ? To get same results as on individual tab in Protege ?
SPARQL:
PREFIX riddle: <http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#>
SELECT DISTINCT ?kto ?co
WHERE {
?kto riddle:drinks ?co .
?kto a owl:Thing .
?co a owl:Thing .
Protege and OWLIM have same result, only explicit knowledge.
co kto
---------------------------------------------
http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#tea http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#Ukrainian
But (according to my information) in Protege, SPARQL query works only on existing knowledge and OWLIM build up repository with existing and inferred triples. So I expected inferred triples too.
P.S.:
Query to get count of inferred triples (OWLIM):
SELECT (COUNT(*) as ?count)
FROM <http://www.ontotext.com/implicit>
WHERE {
?s ?p ?o .
}
returns 0.
** ** ** EDIT: ** ** **
My configuration:
#
# Sesame configuration template for a owlim repository
#
#prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
#prefix rep: <http://www.openrdf.org/config/repository#>.
#prefix sr: <http://www.openrdf.org/config/repository/sail#>.
#prefix sail: <http://www.openrdf.org/config/sail#>.
#prefix owlim: <http://www.ontotext.com/trree/owlim#>.
[] a rep:Repository ;
rep:repositoryID "Riddle" ;
rdfs:label "Einstein Riddle Getting Started" ;
rep:repositoryImpl [
rep:repositoryType "openrdf:SailRepository" ;
sr:sailImpl [
sail:sailType "owlim:Sail" ;
owlim:base-URL "http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#" ;
# There must be exactly the same number of semicolon separated entries in
# the defaulNS and imports fields
owlim:defaultNS "http://www.iis.nsk.su/persons/ponom/ontologies/einsteins_riddle_en.owl#" ;
owlim:imports "./ontology/zebra.owl" ;
owlim:entity-index-size "5000000" ;
owlim:repository-type "file-repository" ;
owlim:ruleset "owl-max" ;
owlim:storage-folder "storage" ;
# OWLIM-SE parameters
owlim:cache-memory "180m" ;
# OWLIM-Lite parameters
owlim:noPersist "false" ;
# Other OWLIM-SE parameters
# owlim:enable-context-index "false" ;
owlim:check-for-inconsistencies "true" ;
# owlim:disable-sameAs "false" ;
owlim:enable-optimization "true" ;
owlim:enablePredicateList "true" ;
# owlim:entity-id-size "32" ; # 32/40
# owlim:fts-memory "20m" ;
# owlim:ftsIndexPolicy "never" ; # never/onStartup/onShutdown/onCommit
# owlim:ftsLiteralsOnly "false" ;
# owlim:in-memory-literal-properties "false" ;
# owlim:enable-literal-index "true" ;
# owlim:index-compression-ratio "-1" ; # -1/10-50
# owlim:owlim-license "" ;
# owlim:predicate-memory "80m" ;
# owlim:query-timeout "-1" ;
# owlim:tokenization-regex "[\p{L}\d_]+" ;
# owlim:tuple-index-memory "80m" ;
# owlim:useShutdownHooks "true" ;
# owlim:transaction-mode "safe" ;
# owlim:read-only "false" ;
# Other OWLIM-Lite parameters
# owlim:jobsize "1000}" ;
# owlim:new-triples-file ""
]
].
And it doesn't matter if I use owl2-rl or owl2-ql or w/e else. Always same result. Only number of inferred triples changes to positive.
08:51:40 Executing query 'Who drinks What'
co kto
---------------------------------------------
einsteins_riddle_en:tea einsteins_riddle_en:Ukrainian
08:51:40 1 result(s) in 63ms.
08:51:40 Executing query 'Number of inferred triples'
count
---------------------------------------------
"770"^^<http://www.w3.org/2001/XMLSchema#integer>
Inferred triples are useless for me, sample of them:
p s o
---------------------------------------------
rdf:type rdf:type rdf:Property
rdf:type rdfs:subPropertyOf rdf:Property
rdf:type rdfs:subClassOf rdf:Property
rdf:type rdfs:domain rdf:Property
rdf:type rdfs:range rdf:Property
rdf:type owl:equivalentClass rdf:Property
rdf:type psys:transitiveOver rdf:Property
...
Yes, this is possible, but it depends on how your OWLIM repository is configured.
The inference ruleset that OWLIM uses is set as a configuration parameter when you first create your repository - see the configuration documentation for details. Obviously, if you have set it to use an empty ruleset, it will do no inference at all. Depending on which ruleset you pick (there are several levels of expressivity), it will be able to infer more or less entailed triples (the more expressive the ruleset, the more entailed information).
If your OWLIM repository is configured correctly, queries will automatically retrieved inferred information along with the explicit statements.
Of course, it also depends on whether there actually is anything that can be inferred. The fact that your query gives the same result in Protege and OWLIM might simply mean that OWLIM does do inferencing, but didn't find any inferred information that matches your query.

Currently in a locked region: Fuseki + full text search + inference

I've recently started playing with the full text search in the Fuseki 0.2.8 snapshot.
I have an InfModel backed by a TDB dataset, which I've added a Lucene text index to. I have tested it out with some search queries like this:
prefix text: <http://jena.apache.org/text#>
select distinct ?s where { ?s text:query ('stu' 16) }
This works great, until I have two or more simultaneous queries to Fuseki, then occasionally I get:
Error 500: Currently in a locked region Fuseki - version 0.2.8-SNAPSHOT (Build date: 20130820-0755).
I've tried testing out the endpoint with 10 concurrent users sending queries at random intervals, over a two minute period around 30% of the queries return the 500 error above.
I have also tried disabling inference by replacing this section (full assembler file below):
<#dataset_fulltext> rdf:type text:TextDataset ;
text:dataset <#dataset_inf> ;
##text:dataset <#tdbDataset> ;
text:index <#indexLucene> .
with this:
<#dataset_fulltext> rdf:type text:TextDataset ;
##text:dataset <#dataset_inf> ;
text:dataset <#tdbDataset> ;
text:index <#indexLucene> .
and there are no exceptions generated when the TextDataset is using #tdbDataset rather than #dataset_inf.
Are there any problems with my set up, or is this a bug in Fuseki?
Here is my current assembler 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 tdb: <http://jena.hpl.hp.com/2008/tdb#> .
#prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
#prefix text: <http://jena.apache.org/text#> .
#prefix dc: <http://purl.org/dc/terms/> .
[] rdf:type fuseki:Server ;
# Timeout - server-wide default: milliseconds.
# Format 1: "1000" -- 1 second timeout
# Format 2: "10000,60000" -- 10s timeout to first result, then 60s timeout to for rest of query.
# See java doc for ARQ.queryTimeout
ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "12000,50000" ] ;
fuseki:services (
<#service1>
) .
# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
# TDB
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
## Initialize text query
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
# A TextDataset is a regular dataset with a text index.
text:TextDataset rdfs:subClassOf ja:RDFDataset .
# Lucene index
text:TextIndexLucene rdfs:subClassOf text:TextIndex .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model bbase data in TDB.
<#service1> rdf:type fuseki:Service ;
rdfs:label "TDB/text service" ;
fuseki:name "dataset" ; # http://host/dataset
fuseki:serviceQuery "query" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset <#dataset_fulltext> ;
.
<#dataset_inf> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model_inf> .
<#model_inf> rdf:type ja:Model ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [ ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLMicroFBRuleReasoner> ] .
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "Data" .
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> .
# Dataset with full text index.
<#dataset_fulltext> rdf:type text:TextDataset ;
text:dataset <#dataset_inf> ;
##text:dataset <#tdbDataset> ;
text:index <#indexLucene> .
# Text index description
<#indexLucene> a text:TextIndexLucene ;
text:directory <file:Lucene> ;
##text:directory "mem" ;
text:entityMap <#entMap> ;
.
# Mapping in the index
# URI stored in field "uri"
# rdfs:label is mapped to field "text"
<#entMap> a text:EntityMap ;
text:entityField "uri" ;
text:defaultField "text" ;
text:map (
[ text:field "text" ; text:predicate dc:title ]
[ text:field "text" ; text:predicate dc:description ]
) .
And here is the full stack trace for one of the exceptions in Fuseki's log:
16:27:01 WARN Fuseki :: [2484] RC = 500 : Currently in a locked region
com.hp.hpl.jena.sparql.core.DatasetGraphWithLock$JenaLockException: Currently in a locked region
at com.hp.hpl.jena.sparql.core.DatasetGraphWithLock.checkNotActive(DatasetGraphWithLock.java:72)
at com.hp.hpl.jena.sparql.core.DatasetGraphTrackActive.begin(DatasetGraphTrackActive.java:44)
at org.apache.jena.query.text.DatasetGraphText.begin(DatasetGraphText.java:102)
at org.apache.jena.fuseki.servlets.HttpAction.beginRead(HttpAction.java:117)
at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:236)
at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:195)
at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:80)
at org.apache.jena.fuseki.servlets.SPARQL_ServletBase.executeLifecycle(SPARQL_ServletBase.java:185)
at org.apache.jena.fuseki.servlets.SPARQL_ServletBase.executeAction(SPARQL_ServletBase.java:166)
at org.apache.jena.fuseki.servlets.SPARQL_ServletBase.execCommonWorker(SPARQL_ServletBase.java:154)
at org.apache.jena.fuseki.servlets.SPARQL_ServletBase.doCommon(SPARQL_ServletBase.java:73)
at org.apache.jena.fuseki.servlets.SPARQL_Query.doGet(SPARQL_Query.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:294)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.nio.BlockingChannelConnector$BlockingChannelEndPoint.run(BlockingChannelConnector.java:298)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:722)
Any advice appreciated.
Thanks,
Stuart.
This looks like it is probably a bug which I have filed as JENA-522, if you have further details on the bug to add please add a comment there.
The issue is that the dataset with inference implicitly uses ARQ's standard in-memory Dataset implementation and this does not support transactions.
However text datasets which correspond to DatasetGraphText internally (and in your stack trace) requires the wrapped dataset to support transactions and where they do not wraps them with DatasetGraphWithLock. It is this that appears to be encountering the problem with the lock, the documentation states that this should support multiple readers but having followed the logic of the code I'm not sure that it actually allows this.