You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID> on 2019/07/08 11:14:35 UTC
TDBTransactionException: Not in a transaction
Hi all,
I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
I've tried the following, but these things did not solve it:
* Adding a tdb:DatasetTDB
* Use the same tdb:location for both GraphTDB's
----------------------------------------------- begin of config ---------------------------------------------
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type fuseki:Server ;
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 .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model base data in TDB.
<#service1> rdf:type fuseki:Service ;
fuseki:name "knowledge" ;
fuseki:serviceQuery "query" ; # SPARQL query service
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
fuseki:dataset <#dataset> .
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#unionModel> ;
#set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
ja:namedGraph [
ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
ja:graph <#ontoGraph> ;
];
ja:namedGraph [
ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
ja:graph <#itemGraph> ;
].
<#unionModel> rdf:type ja:UnionModel ;
ja:rootModel <#itemGraph> ;
ja:subModel <#ontoGraph> .
<#ontoGraph> rdf:type tdb:GraphTDB ;
tdb:location "ontoDB" ;
tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
<#itemGraph> rdf:type tdb:GraphTDB ;
tdb:location "itemDB" ;
tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
------------------------------------------------------- end of config -------------------------------------------------
Any ideas how to fix the TDBTransactionException? (full trace below)
Regards, Barry
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.get(DatasetGraphTransaction.java:52)
at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
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:350)
at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
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.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)
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.
RE: TDBTransactionException: Not in a transaction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
Hi all,
Does anyone have an idea how to achieve the situation described in my message below?
Regards, Barry
-----Original Message-----
From: Nouwt, B. (Barry) <ba...@tno.nl.INVALID>
Sent: vrijdag 12 juli 2019 15:24
To: users@jena.apache.org
Subject: RE: TDBTransactionException: Not in a transaction
Hi Andy, thanks for the update!
Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
- a single dataset with two named graphs (that I can access and update separately, but having separate storage locations is not a requirement. It could also be in memory)
- the default graph of the dataset is a Secured Model that uses our custom permissions Evaluator
- the Secured Model contains the union of the two named graphs.
- configurable via an fuseki assembler .TTL file
Any idea how to achieve this without bumping into JENA-1667?
Regards, Barry
-----Original Message-----
From: Andy Seaborne <an...@apache.org>
Sent: donderdag 11 juli 2019 18:34
To: users@jena.apache.org
Subject: Re: TDBTransactionException: Not in a transaction
Barry,
Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
Andy
On 10/07/2019 10:26, Andy Seaborne wrote:
> Barry - excellent. I've got it reproduced on my system now.
>
> Thanks
>
> Andy
>
>
> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>> Hi Andy/rest,
>>
>> I've created an Java example in which the Exception occurs in Jena
>> version 3.12.0. It uses Maven for dependency resolution and the
>> Exception happens when you run the Java class JenaExample.
>>
>> See: https://github.com/barrynl/jena-example
>>
>> Regards, Barry
>>
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: maandag 8 juli 2019 16:53
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction
>>
>> Some things have improved since 3.9.0.
>>
>> Barry - can you turn this into a minimal, free standing example? It's
>> not manifesting in the same way as JENA-1667.
>>
>> Thanks
>> Andy
>>
>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>> Hi, thanks for the replies!
>>>
>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>> Unfortunately, this would make the process a bit more
>>> complex...because the functionality I'm trying to add to Fuseki
>>> definitely works with version 3.9.0. Although you are right that the
>>> problem could be solved in a newer version...
>>>
>>> @Rob: thanks for the pointer to that bug. At least I can keep my eye
>>> on that one, to see when it gets fixed.
>>>
>>> Regards, Barry
>>>
>>> -----Original Message-----
>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>> Sent: maandag 8 juli 2019 14:55
>>> To: users@jena.apache.org
>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>
>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>> Known Bug that is not currently resolved in any version of Jena
>>>
>>> Although not sure why this worked in past versions of Fuseki, may be
>>> a side effect of other Fuseki refactoring that has happened
>>>
>>> Rob
>>>
>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>
>>> On 08/07/2019, 13:23, "Lorenz B."
>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>
>>> Not that I could help here that much, but is there a reason
>>> for
>>> migrating from a and old version (2017-12) to a less old
>>> version
>>> (2018-09)? I mean, latest release is 3.12.0.
>>> Maybe this might already fix your problem?
>>> > Hi all,
>>> >
>>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>> version 3.9.0. However, the following configuration file gives a
>>> "TDBTransactionException: Not in a transaction" error when I send a
>>> SELECT query to its SPARQL endpoint. It worked as expected with
>>> Apache Jena Fuseki version 3.6.0.
>>> >
>>> > I've tried the following, but these things did not solve it:
>>> >
>>> > * Adding a tdb:DatasetTDB
>>> > * Use the same tdb:location for both GraphTDB's
>>> >
>>> > ----------------------------------------------- begin of
>>> config ---------------------------------------------
>>> >
>>> > # Licensed under the terms of
>>> http://www.apache.org/licenses/LICENSE-2.0
>>> >
>>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>> >
>>> > [] rdf:type fuseki:Server ;
>>> > 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 .
>>> >
>>> > ##
>>> ---------------------------------------------------------------
>>> > ## Service with only SPARQL query on an inference model.
>>> > ## Inference model base data in TDB.
>>> >
>>> > <#service1> rdf:type fuseki:Service ;
>>> > fuseki:name "knowledge" ;
>>> > fuseki:serviceQuery "query" ; # SPARQL query
>>> service
>>> > fuseki:serviceUpdate "update" ;
>>> > fuseki:serviceUpload "upload" ; # Non-SPARQL
>>> upload service
>>> > fuseki:serviceReadWriteGraphStore "data" ; #
>>> SPARQL Graph store protocol (read and write)
>>> > # A separate read-only graph store endpoint:
>>> > fuseki:serviceReadGraphStore "get" ; #
>>> SPARQL Graph store protocol (read only)
>>> > fuseki:dataset <#dataset> .
>>> >
>>> > <#dataset> rdf:type ja:RDFDataset ;
>>> > ja:defaultGraph <#unionModel> ;
>>> > #set the timeout for a SPARQL query in milliseconds. 0
>>> means no timeout and the query never times out.
>>> > ja:context [ ja:cxtName "arq:queryTimeout" ;
>>> ja:cxtValue "120000,240000" ] ;
>>> > ja:namedGraph [
>>> > ja:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>> > ja:graph <#ontoGraph> ;
>>> > ];
>>> > ja:namedGraph [
>>> > ja:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>> > ja:graph <#itemGraph> ;
>>> > ].
>>> >
>>> > <#unionModel> rdf:type ja:UnionModel ;
>>> > ja:rootModel <#itemGraph> ;
>>> > ja:subModel <#ontoGraph> .
>>> >
>>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>>> > tdb:location "ontoDB" ;
>>> > tdb:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>> >
>>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>>> > tdb:location "itemDB" ;
>>> > tdb:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>> >
>>> > ------------------------------------------------------- end
>>> of config -------------------------------------------------
>>> >
>>> > Any ideas how to fix the TDBTransactionException? (full
>>> trace
>>> below)
>>> >
>>> > Regards, Barry
>>> >
>>> >
>>> > org.apache.jena.tdb.transaction.TDBTransactionException: Not
>>> in a transaction
>>> > at
>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>> raphTransaction.java:140)
>>>
>>> > at
>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>> raphTransaction.java:52)
>>>
>>> > at
>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWra
>>> pper.java:78)
>>>
>>> > at
>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWra
>>> pper.java:167)
>>>
>>> > at
>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>> 24)
>>> > at
>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>> 16)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>> > at
>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.j
>>> ava:170)
>>>
>>> > at
>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.ja
>>> va:147)
>>>
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:25
>>> 8)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Triple
>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextSt
>>> age(QueryIterTriplePattern.java:49)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNext
>>> Stage(QueryIterRepeatApply.java:108)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextB
>>> inding(QueryIterRepeatApply.java:65)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNext
>>> Binding(QueryIterBlockTriples.java:63)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBindi
>>> ng(QueryIterConvert.java:58)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>> inding(QueryIteratorWrapper.java:39)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>> inding(QueryIteratorWrapper.java:39)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>> inding(QueryIteratorWrapper.java:39)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStrea
>>> m.java:74)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Result
>>> SetCheckCondition.java:55)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Que
>>> ry.java:350)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.ja
>>> va:288)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SP
>>> ARQL_Query.java:242)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.ja
>>> va:227)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Actio
>>> nService.java:183)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Actio
>>> nService.java:98)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>> 74)
>>> > at
>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.j
>>> ava:73)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>> tHandler.java:1642)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>> erChain.java:61)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>> java:108)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>> ter.java:137)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>> questFilter.java:125)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>> erChain.java:66)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>> java:108)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>> ter.java:137)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>> questFilter.java:125)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>> erChain.java:66)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abstra
>>> ctShiroFilter.java:449)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShir
>>> oFilter.java:365)
>>>
>>> > at
>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCalla
>>> ble.java:90)
>>>
>>> > at
>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallabl
>>> e.java:83)
>>>
>>> > at
>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delegatin
>>> gSubject.java:383)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(Ab
>>> stractShiroFilter.java:362)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>> questFilter.java:125)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>> tHandler.java:1642)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOrigin
>>> Filter.java:285)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOrig
>>> inFilter.java:248)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>> tHandler.java:1634)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.jav
>>> a:533)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>> java:146)
>>>
>>> > at
>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.ja
>>> va:548)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrappe
>>> r.java:132)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>> ler.java:257)
>>>
>>> > at
>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHand
>>> ler.java:1595)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>> ler.java:255)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHand
>>> ler.java:1340)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>> er.java:203)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java
>>> :473)
>>>
>>> > at
>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandl
>>> er.java:1564)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>> er.java:201)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandl
>>> er.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(HandlerWrappe
>>> r.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.ja
>>> va:260)
>>>
>>> > at
>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstr
>>> actConnection.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(QueuedThreadPo
>>> ol.java:765)
>>>
>>> > at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPoo
>>> l.java:683)
>>>
>>> > at java.lang.Thread.run(Thread.java:745)
>>> >
>>> >
>>> >
>>> >
>>> > 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.
>>> >
>>> --
>>> Lorenz Bühmann
>>> AKSW group, University of Leipzig
>>> Group: http://aksw.org - semantic web research center
>>>
>>>
>>>
>>>
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.
Re: TDBTransactionException: Not in a transaction
Posted by ajs6f <aj...@apache.org>.
So noted on that ticket, thank you, Barry!
ajs6f
> On Sep 16, 2019, at 10:41 AM, Nouwt, B. (Barry) <ba...@tno.nl.INVALID> wrote:
>
> Hi ajs6f, I think it is already filed under JENA-1667. My use case to reproduce it can be found on github: https://github.com/barrynl/jena-example
>
> Regards, Barry
>
> -----Original Message-----
> From: ajs6f <aj...@apache.org>
> Sent: woensdag 11 september 2019 20:21
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> Would you be able to file a ticket (or two) recording those more general issues? That would be really helpful so that we don't lose track of them.
>
> ajs6f
>
>> On Sep 11, 2019, at 8:01 AM, Nouwt, B. (Barry) <ba...@tno.nl.INVALID> wrote:
>>
>> Hi all, just a quick status update about my specific 'Not in a transaction' error. The error disappears like Andy predicted by not using to tdb:GraphTDB as storage, but just using ja:MemoryModel for now. This is good enough for my use case, but the more general issues that Andy and ajs6f discuss below are still there.
>>
>> Thanks for the help!
>>
>> Regards, Barry
>>
>> -----Original Message-----
>> From: ajs6f <aj...@apache.org>
>> Sent: donderdag 18 juli 2019 22:55
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction
>>
>> I'm thinking a design in which Union and Multiunion and UnionDatasetGraph actually try to handle read transactions fully would be possible, but it would be a bit of finicking to get it right. Perhaps we could keep a lock in the type to hold while transactions are opened on all the underlying graphs or datasetgraphs, a little bit like the way TIM keeps a lock in a DatasetGraph to hold while opening transactions against its underlying indexes.
>>
>> Is this worth a ticket? (Recording a desire to have unions that
>> respond fully to read transactions.)
>>
>> ajs6f
>>
>>> On Jul 18, 2019, at 6:53 AM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>> Having them in the same storage or one in memory would help.
>>>
>>> This is the crux difficult in JENA-1667. How to know if a transaction has already been started on a dataset when there are several levels of models over the top.
>>>
>>> At the moment, a union graph starts a transaction on its base graph, and does nothing special about the others (that makes common cases work like the Ont API and inference where other graph are either memory or same storage).
>>>
>>> Andy
>>>
>>> On 12/07/2019 14:23, Nouwt, B. (Barry) wrote:
>>>> Hi Andy, thanks for the update!
>>>> Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
>>>> - a single dataset with two named graphs (that I can access and
>>>> update separately, but having separate storage locations is not a
>>>> requirement. It could also be in memory)
>>>> - the default graph of the dataset is a Secured Model that uses our
>>>> custom permissions Evaluator
>>>> - the Secured Model contains the union of the two named graphs.
>>>> - configurable via an fuseki assembler .TTL file Any idea how to
>>>> achieve this without bumping into JENA-1667?
>>>> Regards, Barry
>>>> -----Original Message-----
>>>> From: Andy Seaborne <an...@apache.org>
>>>> Sent: donderdag 11 juli 2019 18:34
>>>> To: users@jena.apache.org
>>>> Subject: Re: TDBTransactionException: Not in a transaction Barry,
>>>> Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
>>>> Andy
>>>> On 10/07/2019 10:26, Andy Seaborne wrote:
>>>>> Barry - excellent. I've got it reproduced on my system now.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Andy
>>>>>
>>>>>
>>>>> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>>>>>> Hi Andy/rest,
>>>>>>
>>>>>> I've created an Java example in which the Exception occurs in Jena
>>>>>> version 3.12.0. It uses Maven for dependency resolution and the
>>>>>> Exception happens when you run the Java class JenaExample.
>>>>>>
>>>>>> See: https://github.com/barrynl/jena-example
>>>>>>
>>>>>> Regards, Barry
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Andy Seaborne <an...@apache.org>
>>>>>> Sent: maandag 8 juli 2019 16:53
>>>>>> To: users@jena.apache.org
>>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>>
>>>>>> Some things have improved since 3.9.0.
>>>>>>
>>>>>> Barry - can you turn this into a minimal, free standing example?
>>>>>> It's not manifesting in the same way as JENA-1667.
>>>>>>
>>>>>> Thanks
>>>>>> Andy
>>>>>>
>>>>>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>>>>>> Hi, thanks for the replies!
>>>>>>>
>>>>>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>>>>>> Unfortunately, this would make the process a bit more
>>>>>>> complex...because the functionality I'm trying to add to Fuseki
>>>>>>> definitely works with version 3.9.0. Although you are right that
>>>>>>> the problem could be solved in a newer version...
>>>>>>>
>>>>>>> @Rob: thanks for the pointer to that bug. At least I can keep my
>>>>>>> eye on that one, to see when it gets fixed.
>>>>>>>
>>>>>>> Regards, Barry
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>>>>>> Sent: maandag 8 juli 2019 14:55
>>>>>>> To: users@jena.apache.org
>>>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>>>
>>>>>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>>>>>> Known Bug that is not currently resolved in any version of Jena
>>>>>>>
>>>>>>> Although not sure why this worked in past versions of Fuseki, may
>>>>>>> be a side effect of other Fuseki refactoring that has happened
>>>>>>>
>>>>>>> Rob
>>>>>>>
>>>>>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>>>>>
>>>>>>> On 08/07/2019, 13:23, "Lorenz B."
>>>>>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>>>>>
>>>>>>> Not that I could help here that much, but is there a reason
>>>>>>> for
>>>>>>> migrating from a and old version (2017-12) to a less old
>>>>>>> version
>>>>>>> (2018-09)? I mean, latest release is 3.12.0.
>>>>>>> Maybe this might already fix your problem?
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>>>>>> version 3.9.0. However, the following configuration file gives a
>>>>>>> "TDBTransactionException: Not in a transaction" error when I send
>>>>>>> a SELECT query to its SPARQL endpoint. It worked as expected with
>>>>>>> Apache Jena Fuseki version 3.6.0.
>>>>>>>>
>>>>>>>> I've tried the following, but these things did not solve it:
>>>>>>>>
>>>>>>>> * Adding a tdb:DatasetTDB
>>>>>>>> * Use the same tdb:location for both GraphTDB's
>>>>>>>>
>>>>>>>> ----------------------------------------------- begin of
>>>>>>> config ---------------------------------------------
>>>>>>>>
>>>>>>>> # Licensed under the terms of
>>>>>>> http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>>
>>>>>>>> @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>>>>>>>
>>>>>>>> [] rdf:type fuseki:Server ;
>>>>>>>> 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 .
>>>>>>>>
>>>>>>>> ##
>>>>>>> ---------------------------------------------------------------
>>>>>>>> ## Service with only SPARQL query on an inference model.
>>>>>>>> ## Inference model base data in TDB.
>>>>>>>>
>>>>>>>> <#service1> rdf:type fuseki:Service ;
>>>>>>>> fuseki:name "knowledge" ;
>>>>>>>> fuseki:serviceQuery "query" ; # SPARQL query
>>>>>>> service
>>>>>>>> fuseki:serviceUpdate "update" ;
>>>>>>>> fuseki:serviceUpload "upload" ; # Non-SPARQL
>>>>>>> upload service
>>>>>>>> fuseki:serviceReadWriteGraphStore "data" ; #
>>>>>>> SPARQL Graph store protocol (read and write)
>>>>>>>> # A separate read-only graph store endpoint:
>>>>>>>> fuseki:serviceReadGraphStore "get" ; #
>>>>>>> SPARQL Graph store protocol (read only)
>>>>>>>> fuseki:dataset <#dataset> .
>>>>>>>>
>>>>>>>> <#dataset> rdf:type ja:RDFDataset ;
>>>>>>>> ja:defaultGraph <#unionModel> ;
>>>>>>>> #set the timeout for a SPARQL query in milliseconds. 0
>>>>>>> means no timeout and the query never times out.
>>>>>>>> ja:context [ ja:cxtName "arq:queryTimeout" ;
>>>>>>> ja:cxtValue "120000,240000" ] ;
>>>>>>>> ja:namedGraph [
>>>>>>>> ja:graphName
>>>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>>>>>>> ja:graph <#ontoGraph> ;
>>>>>>>> ];
>>>>>>>> ja:namedGraph [
>>>>>>>> ja:graphName
>>>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>>>>>>> ja:graph <#itemGraph> ;
>>>>>>>> ].
>>>>>>>>
>>>>>>>> <#unionModel> rdf:type ja:UnionModel ;
>>>>>>>> ja:rootModel <#itemGraph> ;
>>>>>>>> ja:subModel <#ontoGraph> .
>>>>>>>>
>>>>>>>> <#ontoGraph> rdf:type tdb:GraphTDB ;
>>>>>>>> tdb:location "ontoDB" ;
>>>>>>>> tdb:graphName
>>>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>>>>>>>
>>>>>>>> <#itemGraph> rdf:type tdb:GraphTDB ;
>>>>>>>> tdb:location "itemDB" ;
>>>>>>>> tdb:graphName
>>>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>>>>>>>
>>>>>>>> -------------------------------------------------------
>>>>>>> end of config -------------------------------------------------
>>>>>>>>
>>>>>>>> Any ideas how to fix the TDBTransactionException? (full
>>>>>>> trace
>>>>>>> below)
>>>>>>>>
>>>>>>>> Regards, Barry
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.jena.tdb.transaction.TDBTransactionException:
>>>>>>> Not in a transaction
>>>>>>>> at
>>>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datas
>>>>>>> e
>>>>>>> tG
>>>>>>> raphTransaction.java:140)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datas
>>>>>>> e
>>>>>>> tG
>>>>>>> raphTransaction.java:52)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraph
>>>>>>> W
>>>>>>> ra
>>>>>>> pper.java:78)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraph
>>>>>>> W
>>>>>>> ra
>>>>>>> pper.java:167)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.jav
>>>>>>> a
>>>>>>> :1
>>>>>>> 24)
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.jav
>>>>>>> a
>>>>>>> :1
>>>>>>> 16)
>>>>>>>> at
>>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>>>>> at
>>>>>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnio
>>>>>>> n
>>>>>>> .j
>>>>>>> ava:170)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.
>>>>>>> ja
>>>>>>> va:147)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>>>>> at
>>>>>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:
>>>>>>> 25
>>>>>>> 8)
>>>>>>>> at
>>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Tri
>>>>>>> p
>>>>>>> le
>>>>>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nex
>>>>>>> t
>>>>>>> St
>>>>>>> age(QueryIterTriplePattern.java:49)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeN
>>>>>>> e
>>>>>>> xt
>>>>>>> Stage(QueryIterRepeatApply.java:108)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNe
>>>>>>> x
>>>>>>> tB
>>>>>>> inding(QueryIterRepeatApply.java:65)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>>> Q
>>>>>>> ue
>>>>>>> ryIteratorBase.java:114)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasN
>>>>>>> e
>>>>>>> xt
>>>>>>> Binding(QueryIterBlockTriples.java:63)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>>> Q
>>>>>>> ue
>>>>>>> ryIteratorBase.java:114)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBi
>>>>>>> n
>>>>>>> di
>>>>>>> ng(QueryIterConvert.java:58)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>>> Q
>>>>>>> ue
>>>>>>> ryIteratorBase.java:114)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNe
>>>>>>> x
>>>>>>> tB
>>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>>> Q
>>>>>>> ue
>>>>>>> ryIteratorBase.java:114)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNe
>>>>>>> x
>>>>>>> tB
>>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>>> Q
>>>>>>> ue
>>>>>>> ryIteratorBase.java:114)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNe
>>>>>>> x
>>>>>>> tB
>>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>>> Q
>>>>>>> ue
>>>>>>> ryIteratorBase.java:114)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetSt
>>>>>>> r
>>>>>>> ea
>>>>>>> m.java:74)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Res
>>>>>>> u
>>>>>>> lt
>>>>>>> SetCheckCondition.java:55)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_
>>>>>>> Q
>>>>>>> ue
>>>>>>> ry.java:350)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.
>>>>>>> ja
>>>>>>> va:288)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter
>>>>>>> (
>>>>>>> SP
>>>>>>> ARQL_Query.java:242)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.
>>>>>>> ja
>>>>>>> va:227)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Ac
>>>>>>> t
>>>>>>> io
>>>>>>> nService.java:183)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Ac
>>>>>>> t
>>>>>>> io
>>>>>>> nService.java:98)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>>>>>> 74)
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilte
>>>>>>> r
>>>>>>> .j
>>>>>>> ava:73)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ser
>>>>>>> v
>>>>>>> le
>>>>>>> tHandler.java:1642)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedF
>>>>>>> i
>>>>>>> lt
>>>>>>> erChain.java:61)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>>>> java:108)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(Advice
>>>>>>> F
>>>>>>> il
>>>>>>> ter.java:137)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePe
>>>>>>> r
>>>>>>> Re
>>>>>>> questFilter.java:125)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedF
>>>>>>> i
>>>>>>> lt
>>>>>>> erChain.java:66)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>>>> java:108)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(Advice
>>>>>>> F
>>>>>>> il
>>>>>>> ter.java:137)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePe
>>>>>>> r
>>>>>>> Re
>>>>>>> questFilter.java:125)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedF
>>>>>>> i
>>>>>>> lt
>>>>>>> erChain.java:66)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abs
>>>>>>> t
>>>>>>> ra
>>>>>>> ctShiroFilter.java:449)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractS
>>>>>>> h
>>>>>>> ir
>>>>>>> oFilter.java:365)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCa
>>>>>>> l
>>>>>>> la
>>>>>>> ble.java:90)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCall
>>>>>>> a
>>>>>>> bl
>>>>>>> e.java:83)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delega
>>>>>>> t
>>>>>>> in
>>>>>>> gSubject.java:383)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal
>>>>>>> (
>>>>>>> Ab
>>>>>>> stractShiroFilter.java:362)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePe
>>>>>>> r
>>>>>>> Re
>>>>>>> questFilter.java:125)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ser
>>>>>>> v
>>>>>>> le
>>>>>>> tHandler.java:1642)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOri
>>>>>>> g
>>>>>>> in
>>>>>>> Filter.java:285)
>>>>>>>
>>>>>>>> at
>>>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossO
>>>>>>> r
>>>>>>> ig
>>>>>>> inFilter.java:248)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ser
>>>>>>> v
>>>>>>> le
>>>>>>> tHandler.java:1634)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.
>>>>>>> j
>>>>>>> av
>>>>>>> a:533)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>>>> java:146)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.
>>>>>>> ja
>>>>>>> va:548)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWra
>>>>>>> p
>>>>>>> pe
>>>>>>> r.java:132)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedH
>>>>>>> a
>>>>>>> nd
>>>>>>> ler.java:257)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionH
>>>>>>> a
>>>>>>> nd
>>>>>>> ler.java:1595)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedH
>>>>>>> a
>>>>>>> nd
>>>>>>> ler.java:255)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextH
>>>>>>> a
>>>>>>> nd
>>>>>>> ler.java:1340)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHa
>>>>>>> n
>>>>>>> dl
>>>>>>> er.java:203)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.j
>>>>>>> a
>>>>>>> va
>>>>>>> :473)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHa
>>>>>>> n
>>>>>>> dl
>>>>>>> er.java:1564)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHa
>>>>>>> n
>>>>>>> dl
>>>>>>> er.java:201)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHa
>>>>>>> n
>>>>>>> dl
>>>>>>> er.java:1242)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>>>> java:144)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHand
>>>>>>> l
>>>>>>> er
>>>>>>> .java:690)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWra
>>>>>>> p
>>>>>>> pe
>>>>>>> r.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.
>>>>>>> ja
>>>>>>> va:260)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Ab
>>>>>>> s
>>>>>>> tr
>>>>>>> actConnection.java:305)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
>>>>>>>> at
>>>>>>> org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:1
>>>>>>> 18)
>>>>>>>> at
>>>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThrea
>>>>>>> d
>>>>>>> Po
>>>>>>> ol.java:765)
>>>>>>>
>>>>>>>> at
>>>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThread
>>>>>>> P
>>>>>>> oo
>>>>>>> l.java:683)
>>>>>>>
>>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 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.
>>>>>>>>
>>>>>>> --
>>>>>>> Lorenz Bühmann
>>>>>>> AKSW group, University of Leipzig
>>>>>>> Group: http://aksw.org - semantic web research center
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>> 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.
>>
>
RE: TDBTransactionException: Not in a transaction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
Hi ajs6f, I think it is already filed under JENA-1667. My use case to reproduce it can be found on github: https://github.com/barrynl/jena-example
Regards, Barry
-----Original Message-----
From: ajs6f <aj...@apache.org>
Sent: woensdag 11 september 2019 20:21
To: users@jena.apache.org
Subject: Re: TDBTransactionException: Not in a transaction
Would you be able to file a ticket (or two) recording those more general issues? That would be really helpful so that we don't lose track of them.
ajs6f
> On Sep 11, 2019, at 8:01 AM, Nouwt, B. (Barry) <ba...@tno.nl.INVALID> wrote:
>
> Hi all, just a quick status update about my specific 'Not in a transaction' error. The error disappears like Andy predicted by not using to tdb:GraphTDB as storage, but just using ja:MemoryModel for now. This is good enough for my use case, but the more general issues that Andy and ajs6f discuss below are still there.
>
> Thanks for the help!
>
> Regards, Barry
>
> -----Original Message-----
> From: ajs6f <aj...@apache.org>
> Sent: donderdag 18 juli 2019 22:55
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> I'm thinking a design in which Union and Multiunion and UnionDatasetGraph actually try to handle read transactions fully would be possible, but it would be a bit of finicking to get it right. Perhaps we could keep a lock in the type to hold while transactions are opened on all the underlying graphs or datasetgraphs, a little bit like the way TIM keeps a lock in a DatasetGraph to hold while opening transactions against its underlying indexes.
>
> Is this worth a ticket? (Recording a desire to have unions that
> respond fully to read transactions.)
>
> ajs6f
>
>> On Jul 18, 2019, at 6:53 AM, Andy Seaborne <an...@apache.org> wrote:
>>
>> Having them in the same storage or one in memory would help.
>>
>> This is the crux difficult in JENA-1667. How to know if a transaction has already been started on a dataset when there are several levels of models over the top.
>>
>> At the moment, a union graph starts a transaction on its base graph, and does nothing special about the others (that makes common cases work like the Ont API and inference where other graph are either memory or same storage).
>>
>> Andy
>>
>> On 12/07/2019 14:23, Nouwt, B. (Barry) wrote:
>>> Hi Andy, thanks for the update!
>>> Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
>>> - a single dataset with two named graphs (that I can access and
>>> update separately, but having separate storage locations is not a
>>> requirement. It could also be in memory)
>>> - the default graph of the dataset is a Secured Model that uses our
>>> custom permissions Evaluator
>>> - the Secured Model contains the union of the two named graphs.
>>> - configurable via an fuseki assembler .TTL file Any idea how to
>>> achieve this without bumping into JENA-1667?
>>> Regards, Barry
>>> -----Original Message-----
>>> From: Andy Seaborne <an...@apache.org>
>>> Sent: donderdag 11 juli 2019 18:34
>>> To: users@jena.apache.org
>>> Subject: Re: TDBTransactionException: Not in a transaction Barry,
>>> Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
>>> Andy
>>> On 10/07/2019 10:26, Andy Seaborne wrote:
>>>> Barry - excellent. I've got it reproduced on my system now.
>>>>
>>>> Thanks
>>>>
>>>> Andy
>>>>
>>>>
>>>> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>>>>> Hi Andy/rest,
>>>>>
>>>>> I've created an Java example in which the Exception occurs in Jena
>>>>> version 3.12.0. It uses Maven for dependency resolution and the
>>>>> Exception happens when you run the Java class JenaExample.
>>>>>
>>>>> See: https://github.com/barrynl/jena-example
>>>>>
>>>>> Regards, Barry
>>>>>
>>>>> -----Original Message-----
>>>>> From: Andy Seaborne <an...@apache.org>
>>>>> Sent: maandag 8 juli 2019 16:53
>>>>> To: users@jena.apache.org
>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>
>>>>> Some things have improved since 3.9.0.
>>>>>
>>>>> Barry - can you turn this into a minimal, free standing example?
>>>>> It's not manifesting in the same way as JENA-1667.
>>>>>
>>>>> Thanks
>>>>> Andy
>>>>>
>>>>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>>>>> Hi, thanks for the replies!
>>>>>>
>>>>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>>>>> Unfortunately, this would make the process a bit more
>>>>>> complex...because the functionality I'm trying to add to Fuseki
>>>>>> definitely works with version 3.9.0. Although you are right that
>>>>>> the problem could be solved in a newer version...
>>>>>>
>>>>>> @Rob: thanks for the pointer to that bug. At least I can keep my
>>>>>> eye on that one, to see when it gets fixed.
>>>>>>
>>>>>> Regards, Barry
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>>>>> Sent: maandag 8 juli 2019 14:55
>>>>>> To: users@jena.apache.org
>>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>>
>>>>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>>>>> Known Bug that is not currently resolved in any version of Jena
>>>>>>
>>>>>> Although not sure why this worked in past versions of Fuseki, may
>>>>>> be a side effect of other Fuseki refactoring that has happened
>>>>>>
>>>>>> Rob
>>>>>>
>>>>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>>>>
>>>>>> On 08/07/2019, 13:23, "Lorenz B."
>>>>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>>>>
>>>>>> Not that I could help here that much, but is there a reason
>>>>>> for
>>>>>> migrating from a and old version (2017-12) to a less old
>>>>>> version
>>>>>> (2018-09)? I mean, latest release is 3.12.0.
>>>>>> Maybe this might already fix your problem?
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>>>>> version 3.9.0. However, the following configuration file gives a
>>>>>> "TDBTransactionException: Not in a transaction" error when I send
>>>>>> a SELECT query to its SPARQL endpoint. It worked as expected with
>>>>>> Apache Jena Fuseki version 3.6.0.
>>>>>>>
>>>>>>> I've tried the following, but these things did not solve it:
>>>>>>>
>>>>>>> * Adding a tdb:DatasetTDB
>>>>>>> * Use the same tdb:location for both GraphTDB's
>>>>>>>
>>>>>>> ----------------------------------------------- begin of
>>>>>> config ---------------------------------------------
>>>>>>>
>>>>>>> # Licensed under the terms of
>>>>>> http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>
>>>>>>> @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>>>>>>
>>>>>>> [] rdf:type fuseki:Server ;
>>>>>>> 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 .
>>>>>>>
>>>>>>> ##
>>>>>> ---------------------------------------------------------------
>>>>>>> ## Service with only SPARQL query on an inference model.
>>>>>>> ## Inference model base data in TDB.
>>>>>>>
>>>>>>> <#service1> rdf:type fuseki:Service ;
>>>>>>> fuseki:name "knowledge" ;
>>>>>>> fuseki:serviceQuery "query" ; # SPARQL query
>>>>>> service
>>>>>>> fuseki:serviceUpdate "update" ;
>>>>>>> fuseki:serviceUpload "upload" ; # Non-SPARQL
>>>>>> upload service
>>>>>>> fuseki:serviceReadWriteGraphStore "data" ; #
>>>>>> SPARQL Graph store protocol (read and write)
>>>>>>> # A separate read-only graph store endpoint:
>>>>>>> fuseki:serviceReadGraphStore "get" ; #
>>>>>> SPARQL Graph store protocol (read only)
>>>>>>> fuseki:dataset <#dataset> .
>>>>>>>
>>>>>>> <#dataset> rdf:type ja:RDFDataset ;
>>>>>>> ja:defaultGraph <#unionModel> ;
>>>>>>> #set the timeout for a SPARQL query in milliseconds. 0
>>>>>> means no timeout and the query never times out.
>>>>>>> ja:context [ ja:cxtName "arq:queryTimeout" ;
>>>>>> ja:cxtValue "120000,240000" ] ;
>>>>>>> ja:namedGraph [
>>>>>>> ja:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>>>>>> ja:graph <#ontoGraph> ;
>>>>>>> ];
>>>>>>> ja:namedGraph [
>>>>>>> ja:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>>>>>> ja:graph <#itemGraph> ;
>>>>>>> ].
>>>>>>>
>>>>>>> <#unionModel> rdf:type ja:UnionModel ;
>>>>>>> ja:rootModel <#itemGraph> ;
>>>>>>> ja:subModel <#ontoGraph> .
>>>>>>>
>>>>>>> <#ontoGraph> rdf:type tdb:GraphTDB ;
>>>>>>> tdb:location "ontoDB" ;
>>>>>>> tdb:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>>>>>>
>>>>>>> <#itemGraph> rdf:type tdb:GraphTDB ;
>>>>>>> tdb:location "itemDB" ;
>>>>>>> tdb:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>> end of config -------------------------------------------------
>>>>>>>
>>>>>>> Any ideas how to fix the TDBTransactionException? (full
>>>>>> trace
>>>>>> below)
>>>>>>>
>>>>>>> Regards, Barry
>>>>>>>
>>>>>>>
>>>>>>> org.apache.jena.tdb.transaction.TDBTransactionException:
>>>>>> Not in a transaction
>>>>>>> at
>>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datas
>>>>>> e
>>>>>> tG
>>>>>> raphTransaction.java:140)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datas
>>>>>> e
>>>>>> tG
>>>>>> raphTransaction.java:52)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraph
>>>>>> W
>>>>>> ra
>>>>>> pper.java:78)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraph
>>>>>> W
>>>>>> ra
>>>>>> pper.java:167)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.jav
>>>>>> a
>>>>>> :1
>>>>>> 24)
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.jav
>>>>>> a
>>>>>> :1
>>>>>> 16)
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>>>> at
>>>>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnio
>>>>>> n
>>>>>> .j
>>>>>> ava:170)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.
>>>>>> ja
>>>>>> va:147)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:
>>>>>> 25
>>>>>> 8)
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Tri
>>>>>> p
>>>>>> le
>>>>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nex
>>>>>> t
>>>>>> St
>>>>>> age(QueryIterTriplePattern.java:49)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeN
>>>>>> e
>>>>>> xt
>>>>>> Stage(QueryIterRepeatApply.java:108)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNe
>>>>>> x
>>>>>> tB
>>>>>> inding(QueryIterRepeatApply.java:65)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>> Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasN
>>>>>> e
>>>>>> xt
>>>>>> Binding(QueryIterBlockTriples.java:63)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>> Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBi
>>>>>> n
>>>>>> di
>>>>>> ng(QueryIterConvert.java:58)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>> Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNe
>>>>>> x
>>>>>> tB
>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>> Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNe
>>>>>> x
>>>>>> tB
>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>> Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNe
>>>>>> x
>>>>>> tB
>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(
>>>>>> Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetSt
>>>>>> r
>>>>>> ea
>>>>>> m.java:74)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Res
>>>>>> u
>>>>>> lt
>>>>>> SetCheckCondition.java:55)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_
>>>>>> Q
>>>>>> ue
>>>>>> ry.java:350)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.
>>>>>> ja
>>>>>> va:288)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter
>>>>>> (
>>>>>> SP
>>>>>> ARQL_Query.java:242)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.
>>>>>> ja
>>>>>> va:227)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Ac
>>>>>> t
>>>>>> io
>>>>>> nService.java:183)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Ac
>>>>>> t
>>>>>> io
>>>>>> nService.java:98)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>>>>> 74)
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilte
>>>>>> r
>>>>>> .j
>>>>>> ava:73)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ser
>>>>>> v
>>>>>> le
>>>>>> tHandler.java:1642)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedF
>>>>>> i
>>>>>> lt
>>>>>> erChain.java:61)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>>> java:108)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(Advice
>>>>>> F
>>>>>> il
>>>>>> ter.java:137)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePe
>>>>>> r
>>>>>> Re
>>>>>> questFilter.java:125)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedF
>>>>>> i
>>>>>> lt
>>>>>> erChain.java:66)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>>> java:108)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(Advice
>>>>>> F
>>>>>> il
>>>>>> ter.java:137)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePe
>>>>>> r
>>>>>> Re
>>>>>> questFilter.java:125)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedF
>>>>>> i
>>>>>> lt
>>>>>> erChain.java:66)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abs
>>>>>> t
>>>>>> ra
>>>>>> ctShiroFilter.java:449)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractS
>>>>>> h
>>>>>> ir
>>>>>> oFilter.java:365)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCa
>>>>>> l
>>>>>> la
>>>>>> ble.java:90)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCall
>>>>>> a
>>>>>> bl
>>>>>> e.java:83)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delega
>>>>>> t
>>>>>> in
>>>>>> gSubject.java:383)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal
>>>>>> (
>>>>>> Ab
>>>>>> stractShiroFilter.java:362)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePe
>>>>>> r
>>>>>> Re
>>>>>> questFilter.java:125)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ser
>>>>>> v
>>>>>> le
>>>>>> tHandler.java:1642)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOri
>>>>>> g
>>>>>> in
>>>>>> Filter.java:285)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossO
>>>>>> r
>>>>>> ig
>>>>>> inFilter.java:248)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Ser
>>>>>> v
>>>>>> le
>>>>>> tHandler.java:1634)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.
>>>>>> j
>>>>>> av
>>>>>> a:533)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>>> java:146)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.
>>>>>> ja
>>>>>> va:548)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWra
>>>>>> p
>>>>>> pe
>>>>>> r.java:132)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedH
>>>>>> a
>>>>>> nd
>>>>>> ler.java:257)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionH
>>>>>> a
>>>>>> nd
>>>>>> ler.java:1595)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedH
>>>>>> a
>>>>>> nd
>>>>>> ler.java:255)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextH
>>>>>> a
>>>>>> nd
>>>>>> ler.java:1340)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHa
>>>>>> n
>>>>>> dl
>>>>>> er.java:203)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.j
>>>>>> a
>>>>>> va
>>>>>> :473)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHa
>>>>>> n
>>>>>> dl
>>>>>> er.java:1564)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHa
>>>>>> n
>>>>>> dl
>>>>>> er.java:201)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHa
>>>>>> n
>>>>>> dl
>>>>>> er.java:1242)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>>> java:144)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHand
>>>>>> l
>>>>>> er
>>>>>> .java:690)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWra
>>>>>> p
>>>>>> pe
>>>>>> r.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.
>>>>>> ja
>>>>>> va:260)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Ab
>>>>>> s
>>>>>> tr
>>>>>> actConnection.java:305)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
>>>>>>> at
>>>>>> org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:1
>>>>>> 18)
>>>>>>> at
>>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThrea
>>>>>> d
>>>>>> Po
>>>>>> ol.java:765)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThread
>>>>>> P
>>>>>> oo
>>>>>> l.java:683)
>>>>>>
>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>> --
>>>>>> Lorenz Bühmann
>>>>>> AKSW group, University of Leipzig
>>>>>> Group: http://aksw.org - semantic web research center
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>> 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.
>
Re: TDBTransactionException: Not in a transaction
Posted by ajs6f <aj...@apache.org>.
Would you be able to file a ticket (or two) recording those more general issues? That would be really helpful so that we don't lose track of them.
ajs6f
> On Sep 11, 2019, at 8:01 AM, Nouwt, B. (Barry) <ba...@tno.nl.INVALID> wrote:
>
> Hi all, just a quick status update about my specific 'Not in a transaction' error. The error disappears like Andy predicted by not using to tdb:GraphTDB as storage, but just using ja:MemoryModel for now. This is good enough for my use case, but the more general issues that Andy and ajs6f discuss below are still there.
>
> Thanks for the help!
>
> Regards, Barry
>
> -----Original Message-----
> From: ajs6f <aj...@apache.org>
> Sent: donderdag 18 juli 2019 22:55
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> I'm thinking a design in which Union and Multiunion and UnionDatasetGraph actually try to handle read transactions fully would be possible, but it would be a bit of finicking to get it right. Perhaps we could keep a lock in the type to hold while transactions are opened on all the underlying graphs or datasetgraphs, a little bit like the way TIM keeps a lock in a DatasetGraph to hold while opening transactions against its underlying indexes.
>
> Is this worth a ticket? (Recording a desire to have unions that respond fully to read transactions.)
>
> ajs6f
>
>> On Jul 18, 2019, at 6:53 AM, Andy Seaborne <an...@apache.org> wrote:
>>
>> Having them in the same storage or one in memory would help.
>>
>> This is the crux difficult in JENA-1667. How to know if a transaction has already been started on a dataset when there are several levels of models over the top.
>>
>> At the moment, a union graph starts a transaction on its base graph, and does nothing special about the others (that makes common cases work like the Ont API and inference where other graph are either memory or same storage).
>>
>> Andy
>>
>> On 12/07/2019 14:23, Nouwt, B. (Barry) wrote:
>>> Hi Andy, thanks for the update!
>>> Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
>>> - a single dataset with two named graphs (that I can access and
>>> update separately, but having separate storage locations is not a
>>> requirement. It could also be in memory)
>>> - the default graph of the dataset is a Secured Model that uses our
>>> custom permissions Evaluator
>>> - the Secured Model contains the union of the two named graphs.
>>> - configurable via an fuseki assembler .TTL file Any idea how to
>>> achieve this without bumping into JENA-1667?
>>> Regards, Barry
>>> -----Original Message-----
>>> From: Andy Seaborne <an...@apache.org>
>>> Sent: donderdag 11 juli 2019 18:34
>>> To: users@jena.apache.org
>>> Subject: Re: TDBTransactionException: Not in a transaction Barry,
>>> Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
>>> Andy
>>> On 10/07/2019 10:26, Andy Seaborne wrote:
>>>> Barry - excellent. I've got it reproduced on my system now.
>>>>
>>>> Thanks
>>>>
>>>> Andy
>>>>
>>>>
>>>> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>>>>> Hi Andy/rest,
>>>>>
>>>>> I've created an Java example in which the Exception occurs in Jena
>>>>> version 3.12.0. It uses Maven for dependency resolution and the
>>>>> Exception happens when you run the Java class JenaExample.
>>>>>
>>>>> See: https://github.com/barrynl/jena-example
>>>>>
>>>>> Regards, Barry
>>>>>
>>>>> -----Original Message-----
>>>>> From: Andy Seaborne <an...@apache.org>
>>>>> Sent: maandag 8 juli 2019 16:53
>>>>> To: users@jena.apache.org
>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>
>>>>> Some things have improved since 3.9.0.
>>>>>
>>>>> Barry - can you turn this into a minimal, free standing example?
>>>>> It's not manifesting in the same way as JENA-1667.
>>>>>
>>>>> Thanks
>>>>> Andy
>>>>>
>>>>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>>>>> Hi, thanks for the replies!
>>>>>>
>>>>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>>>>> Unfortunately, this would make the process a bit more
>>>>>> complex...because the functionality I'm trying to add to Fuseki
>>>>>> definitely works with version 3.9.0. Although you are right that
>>>>>> the problem could be solved in a newer version...
>>>>>>
>>>>>> @Rob: thanks for the pointer to that bug. At least I can keep my
>>>>>> eye on that one, to see when it gets fixed.
>>>>>>
>>>>>> Regards, Barry
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>>>>> Sent: maandag 8 juli 2019 14:55
>>>>>> To: users@jena.apache.org
>>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>>
>>>>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>>>>> Known Bug that is not currently resolved in any version of Jena
>>>>>>
>>>>>> Although not sure why this worked in past versions of Fuseki, may
>>>>>> be a side effect of other Fuseki refactoring that has happened
>>>>>>
>>>>>> Rob
>>>>>>
>>>>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>>>>
>>>>>> On 08/07/2019, 13:23, "Lorenz B."
>>>>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>>>>
>>>>>> Not that I could help here that much, but is there a reason
>>>>>> for
>>>>>> migrating from a and old version (2017-12) to a less old
>>>>>> version
>>>>>> (2018-09)? I mean, latest release is 3.12.0.
>>>>>> Maybe this might already fix your problem?
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>>>>> version 3.9.0. However, the following configuration file gives a
>>>>>> "TDBTransactionException: Not in a transaction" error when I send
>>>>>> a SELECT query to its SPARQL endpoint. It worked as expected with
>>>>>> Apache Jena Fuseki version 3.6.0.
>>>>>>>
>>>>>>> I've tried the following, but these things did not solve it:
>>>>>>>
>>>>>>> * Adding a tdb:DatasetTDB
>>>>>>> * Use the same tdb:location for both GraphTDB's
>>>>>>>
>>>>>>> ----------------------------------------------- begin of
>>>>>> config ---------------------------------------------
>>>>>>>
>>>>>>> # Licensed under the terms of
>>>>>> http://www.apache.org/licenses/LICENSE-2.0
>>>>>>>
>>>>>>> @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>>>>>>
>>>>>>> [] rdf:type fuseki:Server ;
>>>>>>> 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 .
>>>>>>>
>>>>>>> ##
>>>>>> ---------------------------------------------------------------
>>>>>>> ## Service with only SPARQL query on an inference model.
>>>>>>> ## Inference model base data in TDB.
>>>>>>>
>>>>>>> <#service1> rdf:type fuseki:Service ;
>>>>>>> fuseki:name "knowledge" ;
>>>>>>> fuseki:serviceQuery "query" ; # SPARQL query
>>>>>> service
>>>>>>> fuseki:serviceUpdate "update" ;
>>>>>>> fuseki:serviceUpload "upload" ; # Non-SPARQL
>>>>>> upload service
>>>>>>> fuseki:serviceReadWriteGraphStore "data" ; #
>>>>>> SPARQL Graph store protocol (read and write)
>>>>>>> # A separate read-only graph store endpoint:
>>>>>>> fuseki:serviceReadGraphStore "get" ; #
>>>>>> SPARQL Graph store protocol (read only)
>>>>>>> fuseki:dataset <#dataset> .
>>>>>>>
>>>>>>> <#dataset> rdf:type ja:RDFDataset ;
>>>>>>> ja:defaultGraph <#unionModel> ;
>>>>>>> #set the timeout for a SPARQL query in milliseconds. 0
>>>>>> means no timeout and the query never times out.
>>>>>>> ja:context [ ja:cxtName "arq:queryTimeout" ;
>>>>>> ja:cxtValue "120000,240000" ] ;
>>>>>>> ja:namedGraph [
>>>>>>> ja:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>>>>>> ja:graph <#ontoGraph> ;
>>>>>>> ];
>>>>>>> ja:namedGraph [
>>>>>>> ja:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>>>>>> ja:graph <#itemGraph> ;
>>>>>>> ].
>>>>>>>
>>>>>>> <#unionModel> rdf:type ja:UnionModel ;
>>>>>>> ja:rootModel <#itemGraph> ;
>>>>>>> ja:subModel <#ontoGraph> .
>>>>>>>
>>>>>>> <#ontoGraph> rdf:type tdb:GraphTDB ;
>>>>>>> tdb:location "ontoDB" ;
>>>>>>> tdb:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>>>>>>
>>>>>>> <#itemGraph> rdf:type tdb:GraphTDB ;
>>>>>>> tdb:location "itemDB" ;
>>>>>>> tdb:graphName
>>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>> end of config -------------------------------------------------
>>>>>>>
>>>>>>> Any ideas how to fix the TDBTransactionException? (full
>>>>>> trace
>>>>>> below)
>>>>>>>
>>>>>>> Regards, Barry
>>>>>>>
>>>>>>>
>>>>>>> org.apache.jena.tdb.transaction.TDBTransactionException:
>>>>>> Not in a transaction
>>>>>>> at
>>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datase
>>>>>> tG
>>>>>> raphTransaction.java:140)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datase
>>>>>> tG
>>>>>> raphTransaction.java:52)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphW
>>>>>> ra
>>>>>> pper.java:78)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphW
>>>>>> ra
>>>>>> pper.java:167)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java
>>>>>> :1
>>>>>> 24)
>>>>>>> at
>>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java
>>>>>> :1
>>>>>> 16)
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>>>> at
>>>>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion
>>>>>> .j
>>>>>> ava:170)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.
>>>>>> ja
>>>>>> va:147)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:
>>>>>> 25
>>>>>> 8)
>>>>>>> at
>>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Trip
>>>>>> le
>>>>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.next
>>>>>> St
>>>>>> age(QueryIterTriplePattern.java:49)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNe
>>>>>> xt
>>>>>> Stage(QueryIterRepeatApply.java:108)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNex
>>>>>> tB
>>>>>> inding(QueryIterRepeatApply.java:65)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNe
>>>>>> xt
>>>>>> Binding(QueryIterBlockTriples.java:63)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBin
>>>>>> di
>>>>>> ng(QueryIterConvert.java:58)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNex
>>>>>> tB
>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNex
>>>>>> tB
>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNex
>>>>>> tB
>>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>>> ue
>>>>>> ryIteratorBase.java:114)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStr
>>>>>> ea
>>>>>> m.java:74)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Resu
>>>>>> lt
>>>>>> SetCheckCondition.java:55)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Q
>>>>>> ue
>>>>>> ry.java:350)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.
>>>>>> ja
>>>>>> va:288)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(
>>>>>> SP
>>>>>> ARQL_Query.java:242)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.
>>>>>> ja
>>>>>> va:227)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Act
>>>>>> io
>>>>>> nService.java:183)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Act
>>>>>> io
>>>>>> nService.java:98)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>>>>> 74)
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter
>>>>>> .j
>>>>>> ava:73)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>>>>>> le
>>>>>> tHandler.java:1642)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFi
>>>>>> lt
>>>>>> erChain.java:61)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>>> java:108)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceF
>>>>>> il
>>>>>> ter.java:137)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePer
>>>>>> Re
>>>>>> questFilter.java:125)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFi
>>>>>> lt
>>>>>> erChain.java:66)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>>> java:108)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceF
>>>>>> il
>>>>>> ter.java:137)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePer
>>>>>> Re
>>>>>> questFilter.java:125)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFi
>>>>>> lt
>>>>>> erChain.java:66)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abst
>>>>>> ra
>>>>>> ctShiroFilter.java:449)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractSh
>>>>>> ir
>>>>>> oFilter.java:365)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCal
>>>>>> la
>>>>>> ble.java:90)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCalla
>>>>>> bl
>>>>>> e.java:83)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delegat
>>>>>> in
>>>>>> gSubject.java:383)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
>>>>>> Ab
>>>>>> stractShiroFilter.java:362)
>>>>>>
>>>>>>> at
>>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePer
>>>>>> Re
>>>>>> questFilter.java:125)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>>>>>> le
>>>>>> tHandler.java:1642)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOrig
>>>>>> in
>>>>>> Filter.java:285)
>>>>>>
>>>>>>> at
>>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOr
>>>>>> ig
>>>>>> inFilter.java:248)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>>>>>> le
>>>>>> tHandler.java:1634)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.j
>>>>>> av
>>>>>> a:533)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>>> java:146)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.
>>>>>> ja
>>>>>> va:548)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrap
>>>>>> pe
>>>>>> r.java:132)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHa
>>>>>> nd
>>>>>> ler.java:257)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHa
>>>>>> nd
>>>>>> ler.java:1595)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHa
>>>>>> nd
>>>>>> ler.java:255)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHa
>>>>>> nd
>>>>>> ler.java:1340)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHan
>>>>>> dl
>>>>>> er.java:203)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.ja
>>>>>> va
>>>>>> :473)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHan
>>>>>> dl
>>>>>> er.java:1564)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHan
>>>>>> dl
>>>>>> er.java:201)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHan
>>>>>> dl
>>>>>> er.java:1242)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>>> java:144)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandl
>>>>>> er
>>>>>> .java:690)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrap
>>>>>> pe
>>>>>> r.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.
>>>>>> ja
>>>>>> va:260)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abs
>>>>>> tr
>>>>>> actConnection.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(QueuedThread
>>>>>> Po
>>>>>> ol.java:765)
>>>>>>
>>>>>>> at
>>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadP
>>>>>> oo
>>>>>> l.java:683)
>>>>>>
>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>> --
>>>>>> Lorenz Bühmann
>>>>>> AKSW group, University of Leipzig
>>>>>> Group: http://aksw.org - semantic web research center
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>> 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.
>
RE: TDBTransactionException: Not in a transaction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
Hi all, just a quick status update about my specific 'Not in a transaction' error. The error disappears like Andy predicted by not using to tdb:GraphTDB as storage, but just using ja:MemoryModel for now. This is good enough for my use case, but the more general issues that Andy and ajs6f discuss below are still there.
Thanks for the help!
Regards, Barry
-----Original Message-----
From: ajs6f <aj...@apache.org>
Sent: donderdag 18 juli 2019 22:55
To: users@jena.apache.org
Subject: Re: TDBTransactionException: Not in a transaction
I'm thinking a design in which Union and Multiunion and UnionDatasetGraph actually try to handle read transactions fully would be possible, but it would be a bit of finicking to get it right. Perhaps we could keep a lock in the type to hold while transactions are opened on all the underlying graphs or datasetgraphs, a little bit like the way TIM keeps a lock in a DatasetGraph to hold while opening transactions against its underlying indexes.
Is this worth a ticket? (Recording a desire to have unions that respond fully to read transactions.)
ajs6f
> On Jul 18, 2019, at 6:53 AM, Andy Seaborne <an...@apache.org> wrote:
>
> Having them in the same storage or one in memory would help.
>
> This is the crux difficult in JENA-1667. How to know if a transaction has already been started on a dataset when there are several levels of models over the top.
>
> At the moment, a union graph starts a transaction on its base graph, and does nothing special about the others (that makes common cases work like the Ont API and inference where other graph are either memory or same storage).
>
> Andy
>
> On 12/07/2019 14:23, Nouwt, B. (Barry) wrote:
>> Hi Andy, thanks for the update!
>> Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
>> - a single dataset with two named graphs (that I can access and
>> update separately, but having separate storage locations is not a
>> requirement. It could also be in memory)
>> - the default graph of the dataset is a Secured Model that uses our
>> custom permissions Evaluator
>> - the Secured Model contains the union of the two named graphs.
>> - configurable via an fuseki assembler .TTL file Any idea how to
>> achieve this without bumping into JENA-1667?
>> Regards, Barry
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: donderdag 11 juli 2019 18:34
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction Barry,
>> Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
>> Andy
>> On 10/07/2019 10:26, Andy Seaborne wrote:
>>> Barry - excellent. I've got it reproduced on my system now.
>>>
>>> Thanks
>>>
>>> Andy
>>>
>>>
>>> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>>>> Hi Andy/rest,
>>>>
>>>> I've created an Java example in which the Exception occurs in Jena
>>>> version 3.12.0. It uses Maven for dependency resolution and the
>>>> Exception happens when you run the Java class JenaExample.
>>>>
>>>> See: https://github.com/barrynl/jena-example
>>>>
>>>> Regards, Barry
>>>>
>>>> -----Original Message-----
>>>> From: Andy Seaborne <an...@apache.org>
>>>> Sent: maandag 8 juli 2019 16:53
>>>> To: users@jena.apache.org
>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>
>>>> Some things have improved since 3.9.0.
>>>>
>>>> Barry - can you turn this into a minimal, free standing example?
>>>> It's not manifesting in the same way as JENA-1667.
>>>>
>>>> Thanks
>>>> Andy
>>>>
>>>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>>>> Hi, thanks for the replies!
>>>>>
>>>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>>>> Unfortunately, this would make the process a bit more
>>>>> complex...because the functionality I'm trying to add to Fuseki
>>>>> definitely works with version 3.9.0. Although you are right that
>>>>> the problem could be solved in a newer version...
>>>>>
>>>>> @Rob: thanks for the pointer to that bug. At least I can keep my
>>>>> eye on that one, to see when it gets fixed.
>>>>>
>>>>> Regards, Barry
>>>>>
>>>>> -----Original Message-----
>>>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>>>> Sent: maandag 8 juli 2019 14:55
>>>>> To: users@jena.apache.org
>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>
>>>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>>>> Known Bug that is not currently resolved in any version of Jena
>>>>>
>>>>> Although not sure why this worked in past versions of Fuseki, may
>>>>> be a side effect of other Fuseki refactoring that has happened
>>>>>
>>>>> Rob
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>>>
>>>>> On 08/07/2019, 13:23, "Lorenz B."
>>>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>>>
>>>>> Not that I could help here that much, but is there a reason
>>>>> for
>>>>> migrating from a and old version (2017-12) to a less old
>>>>> version
>>>>> (2018-09)? I mean, latest release is 3.12.0.
>>>>> Maybe this might already fix your problem?
>>>>> > Hi all,
>>>>> >
>>>>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>>>> version 3.9.0. However, the following configuration file gives a
>>>>> "TDBTransactionException: Not in a transaction" error when I send
>>>>> a SELECT query to its SPARQL endpoint. It worked as expected with
>>>>> Apache Jena Fuseki version 3.6.0.
>>>>> >
>>>>> > I've tried the following, but these things did not solve it:
>>>>> >
>>>>> > * Adding a tdb:DatasetTDB
>>>>> > * Use the same tdb:location for both GraphTDB's
>>>>> >
>>>>> > ----------------------------------------------- begin of
>>>>> config ---------------------------------------------
>>>>> >
>>>>> > # Licensed under the terms of
>>>>> http://www.apache.org/licenses/LICENSE-2.0
>>>>> >
>>>>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>>>> >
>>>>> > [] rdf:type fuseki:Server ;
>>>>> > 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 .
>>>>> >
>>>>> > ##
>>>>> ---------------------------------------------------------------
>>>>> > ## Service with only SPARQL query on an inference model.
>>>>> > ## Inference model base data in TDB.
>>>>> >
>>>>> > <#service1> rdf:type fuseki:Service ;
>>>>> > fuseki:name "knowledge" ;
>>>>> > fuseki:serviceQuery "query" ; # SPARQL query
>>>>> service
>>>>> > fuseki:serviceUpdate "update" ;
>>>>> > fuseki:serviceUpload "upload" ; # Non-SPARQL
>>>>> upload service
>>>>> > fuseki:serviceReadWriteGraphStore "data" ; #
>>>>> SPARQL Graph store protocol (read and write)
>>>>> > # A separate read-only graph store endpoint:
>>>>> > fuseki:serviceReadGraphStore "get" ; #
>>>>> SPARQL Graph store protocol (read only)
>>>>> > fuseki:dataset <#dataset> .
>>>>> >
>>>>> > <#dataset> rdf:type ja:RDFDataset ;
>>>>> > ja:defaultGraph <#unionModel> ;
>>>>> > #set the timeout for a SPARQL query in milliseconds. 0
>>>>> means no timeout and the query never times out.
>>>>> > ja:context [ ja:cxtName "arq:queryTimeout" ;
>>>>> ja:cxtValue "120000,240000" ] ;
>>>>> > ja:namedGraph [
>>>>> > ja:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>>>> > ja:graph <#ontoGraph> ;
>>>>> > ];
>>>>> > ja:namedGraph [
>>>>> > ja:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>>>> > ja:graph <#itemGraph> ;
>>>>> > ].
>>>>> >
>>>>> > <#unionModel> rdf:type ja:UnionModel ;
>>>>> > ja:rootModel <#itemGraph> ;
>>>>> > ja:subModel <#ontoGraph> .
>>>>> >
>>>>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>>>>> > tdb:location "ontoDB" ;
>>>>> > tdb:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>>>> >
>>>>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>>>>> > tdb:location "itemDB" ;
>>>>> > tdb:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>>>> >
>>>>> > -------------------------------------------------------
>>>>> end of config -------------------------------------------------
>>>>> >
>>>>> > Any ideas how to fix the TDBTransactionException? (full
>>>>> trace
>>>>> below)
>>>>> >
>>>>> > Regards, Barry
>>>>> >
>>>>> >
>>>>> > org.apache.jena.tdb.transaction.TDBTransactionException:
>>>>> Not in a transaction
>>>>> > at
>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datase
>>>>> tG
>>>>> raphTransaction.java:140)
>>>>>
>>>>> > at
>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(Datase
>>>>> tG
>>>>> raphTransaction.java:52)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphW
>>>>> ra
>>>>> pper.java:78)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphW
>>>>> ra
>>>>> pper.java:167)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java
>>>>> :1
>>>>> 24)
>>>>> > at
>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java
>>>>> :1
>>>>> 16)
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>> > at
>>>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion
>>>>> .j
>>>>> ava:170)
>>>>>
>>>>> > at
>>>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.
>>>>> ja
>>>>> va:147)
>>>>>
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:
>>>>> 25
>>>>> 8)
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Trip
>>>>> le
>>>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.next
>>>>> St
>>>>> age(QueryIterTriplePattern.java:49)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNe
>>>>> xt
>>>>> Stage(QueryIterRepeatApply.java:108)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNex
>>>>> tB
>>>>> inding(QueryIterRepeatApply.java:65)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>> ue
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNe
>>>>> xt
>>>>> Binding(QueryIterBlockTriples.java:63)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>> ue
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBin
>>>>> di
>>>>> ng(QueryIterConvert.java:58)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>> ue
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNex
>>>>> tB
>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>> ue
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNex
>>>>> tB
>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>> ue
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNex
>>>>> tB
>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Q
>>>>> ue
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStr
>>>>> ea
>>>>> m.java:74)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Resu
>>>>> lt
>>>>> SetCheckCondition.java:55)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Q
>>>>> ue
>>>>> ry.java:350)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.
>>>>> ja
>>>>> va:288)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(
>>>>> SP
>>>>> ARQL_Query.java:242)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.
>>>>> ja
>>>>> va:227)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Act
>>>>> io
>>>>> nService.java:183)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Act
>>>>> io
>>>>> nService.java:98)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>>>> 74)
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter
>>>>> .j
>>>>> ava:73)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>>>>> le
>>>>> tHandler.java:1642)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFi
>>>>> lt
>>>>> erChain.java:61)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>> java:108)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceF
>>>>> il
>>>>> ter.java:137)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePer
>>>>> Re
>>>>> questFilter.java:125)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFi
>>>>> lt
>>>>> erChain.java:66)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>> java:108)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceF
>>>>> il
>>>>> ter.java:137)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePer
>>>>> Re
>>>>> questFilter.java:125)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFi
>>>>> lt
>>>>> erChain.java:66)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abst
>>>>> ra
>>>>> ctShiroFilter.java:449)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractSh
>>>>> ir
>>>>> oFilter.java:365)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCal
>>>>> la
>>>>> ble.java:90)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCalla
>>>>> bl
>>>>> e.java:83)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delegat
>>>>> in
>>>>> gSubject.java:383)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
>>>>> Ab
>>>>> stractShiroFilter.java:362)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePer
>>>>> Re
>>>>> questFilter.java:125)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>>>>> le
>>>>> tHandler.java:1642)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOrig
>>>>> in
>>>>> Filter.java:285)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOr
>>>>> ig
>>>>> inFilter.java:248)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Serv
>>>>> le
>>>>> tHandler.java:1634)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.j
>>>>> av
>>>>> a:533)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>> java:146)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.
>>>>> ja
>>>>> va:548)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrap
>>>>> pe
>>>>> r.java:132)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHa
>>>>> nd
>>>>> ler.java:257)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHa
>>>>> nd
>>>>> ler.java:1595)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHa
>>>>> nd
>>>>> ler.java:255)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHa
>>>>> nd
>>>>> ler.java:1340)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHan
>>>>> dl
>>>>> er.java:203)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.ja
>>>>> va
>>>>> :473)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHan
>>>>> dl
>>>>> er.java:1564)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHan
>>>>> dl
>>>>> er.java:201)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHan
>>>>> dl
>>>>> er.java:1242)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>> java:144)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandl
>>>>> er
>>>>> .java:690)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrap
>>>>> pe
>>>>> r.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.
>>>>> ja
>>>>> va:260)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abs
>>>>> tr
>>>>> actConnection.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(QueuedThread
>>>>> Po
>>>>> ol.java:765)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadP
>>>>> oo
>>>>> l.java:683)
>>>>>
>>>>> > at java.lang.Thread.run(Thread.java:745)
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > 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.
>>>>> >
>>>>> --
>>>>> Lorenz Bühmann
>>>>> AKSW group, University of Leipzig
>>>>> Group: http://aksw.org - semantic web research center
>>>>>
>>>>>
>>>>>
>>>>>
>> 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.
Re: TDBTransactionException: Not in a transaction
Posted by ajs6f <aj...@apache.org>.
I'm thinking a design in which Union and Multiunion and UnionDatasetGraph actually try to handle read transactions fully would be possible, but it would be a bit of finicking to get it right. Perhaps we could keep a lock in the type to hold while transactions are opened on all the
underlying graphs or datasetgraphs, a little bit like the way TIM keeps a lock in a DatasetGraph to hold while opening transactions against its underlying indexes.
Is this worth a ticket? (Recording a desire to have unions that respond fully to read transactions.)
ajs6f
> On Jul 18, 2019, at 6:53 AM, Andy Seaborne <an...@apache.org> wrote:
>
> Having them in the same storage or one in memory would help.
>
> This is the crux difficult in JENA-1667. How to know if a transaction has already been started on a dataset when there are several levels of models over the top.
>
> At the moment, a union graph starts a transaction on its base graph, and does nothing special about the others (that makes common cases work like the Ont API and inference where other graph are either memory or same storage).
>
> Andy
>
> On 12/07/2019 14:23, Nouwt, B. (Barry) wrote:
>> Hi Andy, thanks for the update!
>> Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
>> - a single dataset with two named graphs (that I can access and update separately, but having separate storage locations is not a requirement. It could also be in memory)
>> - the default graph of the dataset is a Secured Model that uses our custom permissions Evaluator
>> - the Secured Model contains the union of the two named graphs.
>> - configurable via an fuseki assembler .TTL file
>> Any idea how to achieve this without bumping into JENA-1667?
>> Regards, Barry
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: donderdag 11 juli 2019 18:34
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction
>> Barry,
>> Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
>> Andy
>> On 10/07/2019 10:26, Andy Seaborne wrote:
>>> Barry - excellent. I've got it reproduced on my system now.
>>>
>>> Thanks
>>>
>>> Andy
>>>
>>>
>>> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>>>> Hi Andy/rest,
>>>>
>>>> I've created an Java example in which the Exception occurs in Jena
>>>> version 3.12.0. It uses Maven for dependency resolution and the
>>>> Exception happens when you run the Java class JenaExample.
>>>>
>>>> See: https://github.com/barrynl/jena-example
>>>>
>>>> Regards, Barry
>>>>
>>>> -----Original Message-----
>>>> From: Andy Seaborne <an...@apache.org>
>>>> Sent: maandag 8 juli 2019 16:53
>>>> To: users@jena.apache.org
>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>
>>>> Some things have improved since 3.9.0.
>>>>
>>>> Barry - can you turn this into a minimal, free standing example? It's
>>>> not manifesting in the same way as JENA-1667.
>>>>
>>>> Thanks
>>>> Andy
>>>>
>>>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>>>> Hi, thanks for the replies!
>>>>>
>>>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>>>> Unfortunately, this would make the process a bit more
>>>>> complex...because the functionality I'm trying to add to Fuseki
>>>>> definitely works with version 3.9.0. Although you are right that the
>>>>> problem could be solved in a newer version...
>>>>>
>>>>> @Rob: thanks for the pointer to that bug. At least I can keep my eye
>>>>> on that one, to see when it gets fixed.
>>>>>
>>>>> Regards, Barry
>>>>>
>>>>> -----Original Message-----
>>>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>>>> Sent: maandag 8 juli 2019 14:55
>>>>> To: users@jena.apache.org
>>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>>
>>>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>>>> Known Bug that is not currently resolved in any version of Jena
>>>>>
>>>>> Although not sure why this worked in past versions of Fuseki, may be
>>>>> a side effect of other Fuseki refactoring that has happened
>>>>>
>>>>> Rob
>>>>>
>>>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>>>
>>>>> On 08/07/2019, 13:23, "Lorenz B."
>>>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>>>
>>>>> Not that I could help here that much, but is there a reason
>>>>> for
>>>>> migrating from a and old version (2017-12) to a less old
>>>>> version
>>>>> (2018-09)? I mean, latest release is 3.12.0.
>>>>> Maybe this might already fix your problem?
>>>>> > Hi all,
>>>>> >
>>>>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>>>> version 3.9.0. However, the following configuration file gives a
>>>>> "TDBTransactionException: Not in a transaction" error when I send a
>>>>> SELECT query to its SPARQL endpoint. It worked as expected with
>>>>> Apache Jena Fuseki version 3.6.0.
>>>>> >
>>>>> > I've tried the following, but these things did not solve it:
>>>>> >
>>>>> > * Adding a tdb:DatasetTDB
>>>>> > * Use the same tdb:location for both GraphTDB's
>>>>> >
>>>>> > ----------------------------------------------- begin of
>>>>> config ---------------------------------------------
>>>>> >
>>>>> > # Licensed under the terms of
>>>>> http://www.apache.org/licenses/LICENSE-2.0
>>>>> >
>>>>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>>>> >
>>>>> > [] rdf:type fuseki:Server ;
>>>>> > 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 .
>>>>> >
>>>>> > ##
>>>>> ---------------------------------------------------------------
>>>>> > ## Service with only SPARQL query on an inference model.
>>>>> > ## Inference model base data in TDB.
>>>>> >
>>>>> > <#service1> rdf:type fuseki:Service ;
>>>>> > fuseki:name "knowledge" ;
>>>>> > fuseki:serviceQuery "query" ; # SPARQL query
>>>>> service
>>>>> > fuseki:serviceUpdate "update" ;
>>>>> > fuseki:serviceUpload "upload" ; # Non-SPARQL
>>>>> upload service
>>>>> > fuseki:serviceReadWriteGraphStore "data" ; #
>>>>> SPARQL Graph store protocol (read and write)
>>>>> > # A separate read-only graph store endpoint:
>>>>> > fuseki:serviceReadGraphStore "get" ; #
>>>>> SPARQL Graph store protocol (read only)
>>>>> > fuseki:dataset <#dataset> .
>>>>> >
>>>>> > <#dataset> rdf:type ja:RDFDataset ;
>>>>> > ja:defaultGraph <#unionModel> ;
>>>>> > #set the timeout for a SPARQL query in milliseconds. 0
>>>>> means no timeout and the query never times out.
>>>>> > ja:context [ ja:cxtName "arq:queryTimeout" ;
>>>>> ja:cxtValue "120000,240000" ] ;
>>>>> > ja:namedGraph [
>>>>> > ja:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>>>> > ja:graph <#ontoGraph> ;
>>>>> > ];
>>>>> > ja:namedGraph [
>>>>> > ja:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>>>> > ja:graph <#itemGraph> ;
>>>>> > ].
>>>>> >
>>>>> > <#unionModel> rdf:type ja:UnionModel ;
>>>>> > ja:rootModel <#itemGraph> ;
>>>>> > ja:subModel <#ontoGraph> .
>>>>> >
>>>>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>>>>> > tdb:location "ontoDB" ;
>>>>> > tdb:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>>>> >
>>>>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>>>>> > tdb:location "itemDB" ;
>>>>> > tdb:graphName
>>>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>>>> >
>>>>> > ------------------------------------------------------- end
>>>>> of config -------------------------------------------------
>>>>> >
>>>>> > Any ideas how to fix the TDBTransactionException? (full
>>>>> trace
>>>>> below)
>>>>> >
>>>>> > Regards, Barry
>>>>> >
>>>>> >
>>>>> > org.apache.jena.tdb.transaction.TDBTransactionException: Not
>>>>> in a transaction
>>>>> > at
>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>>>> raphTransaction.java:140)
>>>>>
>>>>> > at
>>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>>>> raphTransaction.java:52)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWra
>>>>> pper.java:78)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWra
>>>>> pper.java:167)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>>>> 24)
>>>>> > at
>>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>>>> 16)
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>> > at
>>>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.j
>>>>> ava:170)
>>>>>
>>>>> > at
>>>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.ja
>>>>> va:147)
>>>>>
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:25
>>>>> 8)
>>>>> > at
>>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Triple
>>>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextSt
>>>>> age(QueryIterTriplePattern.java:49)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNext
>>>>> Stage(QueryIterRepeatApply.java:108)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextB
>>>>> inding(QueryIterRepeatApply.java:65)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNext
>>>>> Binding(QueryIterBlockTriples.java:63)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBindi
>>>>> ng(QueryIterConvert.java:58)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>>>> inding(QueryIteratorWrapper.java:39)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>>> ryIteratorBase.java:114)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStrea
>>>>> m.java:74)
>>>>>
>>>>> > at
>>>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Result
>>>>> SetCheckCondition.java:55)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Que
>>>>> ry.java:350)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.ja
>>>>> va:288)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SP
>>>>> ARQL_Query.java:242)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.ja
>>>>> va:227)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Actio
>>>>> nService.java:183)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Actio
>>>>> nService.java:98)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>>>> 74)
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.j
>>>>> ava:73)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>>>> tHandler.java:1642)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>>>> erChain.java:61)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>> java:108)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>>>> ter.java:137)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>>>> questFilter.java:125)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>>>> erChain.java:66)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>>> java:108)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>>>> ter.java:137)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>>>> questFilter.java:125)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>>>> erChain.java:66)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abstra
>>>>> ctShiroFilter.java:449)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShir
>>>>> oFilter.java:365)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCalla
>>>>> ble.java:90)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallabl
>>>>> e.java:83)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delegatin
>>>>> gSubject.java:383)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(Ab
>>>>> stractShiroFilter.java:362)
>>>>>
>>>>> > at
>>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>>>> questFilter.java:125)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>>>> tHandler.java:1642)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOrigin
>>>>> Filter.java:285)
>>>>>
>>>>> > at
>>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOrig
>>>>> inFilter.java:248)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>>>> tHandler.java:1634)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.jav
>>>>> a:533)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>>> java:146)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.ja
>>>>> va:548)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrappe
>>>>> r.java:132)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>>>> ler.java:257)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHand
>>>>> ler.java:1595)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>>>> ler.java:255)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHand
>>>>> ler.java:1340)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>>>> er.java:203)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java
>>>>> :473)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandl
>>>>> er.java:1564)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>>>> er.java:201)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandl
>>>>> er.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(HandlerWrappe
>>>>> r.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.ja
>>>>> va:260)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstr
>>>>> actConnection.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(QueuedThreadPo
>>>>> ol.java:765)
>>>>>
>>>>> > at
>>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPoo
>>>>> l.java:683)
>>>>>
>>>>> > at java.lang.Thread.run(Thread.java:745)
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > 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.
>>>>> >
>>>>> --
>>>>> Lorenz Bühmann
>>>>> AKSW group, University of Leipzig
>>>>> Group: http://aksw.org - semantic web research center
>>>>>
>>>>>
>>>>>
>>>>>
>> 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.
Re: TDBTransactionException: Not in a transaction
Posted by Andy Seaborne <an...@apache.org>.
Having them in the same storage or one in memory would help.
This is the crux difficult in JENA-1667. How to know if a transaction
has already been started on a dataset when there are several levels of
models over the top.
At the moment, a union graph starts a transaction on its base graph, and
does nothing special about the others (that makes common cases work like
the Ont API and inference where other graph are either memory or same
storage).
Andy
On 12/07/2019 14:23, Nouwt, B. (Barry) wrote:
> Hi Andy, thanks for the update!
>
> Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
>
> - a single dataset with two named graphs (that I can access and update separately, but having separate storage locations is not a requirement. It could also be in memory)
> - the default graph of the dataset is a Secured Model that uses our custom permissions Evaluator
> - the Secured Model contains the union of the two named graphs.
> - configurable via an fuseki assembler .TTL file
>
> Any idea how to achieve this without bumping into JENA-1667?
>
> Regards, Barry
>
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: donderdag 11 juli 2019 18:34
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> Barry,
>
> Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
>
> Andy
>
> On 10/07/2019 10:26, Andy Seaborne wrote:
>> Barry - excellent. I've got it reproduced on my system now.
>>
>> Thanks
>>
>> Andy
>>
>>
>> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>>> Hi Andy/rest,
>>>
>>> I've created an Java example in which the Exception occurs in Jena
>>> version 3.12.0. It uses Maven for dependency resolution and the
>>> Exception happens when you run the Java class JenaExample.
>>>
>>> See: https://github.com/barrynl/jena-example
>>>
>>> Regards, Barry
>>>
>>> -----Original Message-----
>>> From: Andy Seaborne <an...@apache.org>
>>> Sent: maandag 8 juli 2019 16:53
>>> To: users@jena.apache.org
>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>
>>> Some things have improved since 3.9.0.
>>>
>>> Barry - can you turn this into a minimal, free standing example? It's
>>> not manifesting in the same way as JENA-1667.
>>>
>>> Thanks
>>> Andy
>>>
>>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>>> Hi, thanks for the replies!
>>>>
>>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>>> Unfortunately, this would make the process a bit more
>>>> complex...because the functionality I'm trying to add to Fuseki
>>>> definitely works with version 3.9.0. Although you are right that the
>>>> problem could be solved in a newer version...
>>>>
>>>> @Rob: thanks for the pointer to that bug. At least I can keep my eye
>>>> on that one, to see when it gets fixed.
>>>>
>>>> Regards, Barry
>>>>
>>>> -----Original Message-----
>>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>>> Sent: maandag 8 juli 2019 14:55
>>>> To: users@jena.apache.org
>>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>>
>>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>>> Known Bug that is not currently resolved in any version of Jena
>>>>
>>>> Although not sure why this worked in past versions of Fuseki, may be
>>>> a side effect of other Fuseki refactoring that has happened
>>>>
>>>> Rob
>>>>
>>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>>
>>>> On 08/07/2019, 13:23, "Lorenz B."
>>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>>
>>>> Not that I could help here that much, but is there a reason
>>>> for
>>>> migrating from a and old version (2017-12) to a less old
>>>> version
>>>> (2018-09)? I mean, latest release is 3.12.0.
>>>> Maybe this might already fix your problem?
>>>> > Hi all,
>>>> >
>>>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>>> version 3.9.0. However, the following configuration file gives a
>>>> "TDBTransactionException: Not in a transaction" error when I send a
>>>> SELECT query to its SPARQL endpoint. It worked as expected with
>>>> Apache Jena Fuseki version 3.6.0.
>>>> >
>>>> > I've tried the following, but these things did not solve it:
>>>> >
>>>> > * Adding a tdb:DatasetTDB
>>>> > * Use the same tdb:location for both GraphTDB's
>>>> >
>>>> > ----------------------------------------------- begin of
>>>> config ---------------------------------------------
>>>> >
>>>> > # Licensed under the terms of
>>>> http://www.apache.org/licenses/LICENSE-2.0
>>>> >
>>>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>>> >
>>>> > [] rdf:type fuseki:Server ;
>>>> > 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 .
>>>> >
>>>> > ##
>>>> ---------------------------------------------------------------
>>>> > ## Service with only SPARQL query on an inference model.
>>>> > ## Inference model base data in TDB.
>>>> >
>>>> > <#service1> rdf:type fuseki:Service ;
>>>> > fuseki:name "knowledge" ;
>>>> > fuseki:serviceQuery "query" ; # SPARQL query
>>>> service
>>>> > fuseki:serviceUpdate "update" ;
>>>> > fuseki:serviceUpload "upload" ; # Non-SPARQL
>>>> upload service
>>>> > fuseki:serviceReadWriteGraphStore "data" ; #
>>>> SPARQL Graph store protocol (read and write)
>>>> > # A separate read-only graph store endpoint:
>>>> > fuseki:serviceReadGraphStore "get" ; #
>>>> SPARQL Graph store protocol (read only)
>>>> > fuseki:dataset <#dataset> .
>>>> >
>>>> > <#dataset> rdf:type ja:RDFDataset ;
>>>> > ja:defaultGraph <#unionModel> ;
>>>> > #set the timeout for a SPARQL query in milliseconds. 0
>>>> means no timeout and the query never times out.
>>>> > ja:context [ ja:cxtName "arq:queryTimeout" ;
>>>> ja:cxtValue "120000,240000" ] ;
>>>> > ja:namedGraph [
>>>> > ja:graphName
>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>>> > ja:graph <#ontoGraph> ;
>>>> > ];
>>>> > ja:namedGraph [
>>>> > ja:graphName
>>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>>> > ja:graph <#itemGraph> ;
>>>> > ].
>>>> >
>>>> > <#unionModel> rdf:type ja:UnionModel ;
>>>> > ja:rootModel <#itemGraph> ;
>>>> > ja:subModel <#ontoGraph> .
>>>> >
>>>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>>>> > tdb:location "ontoDB" ;
>>>> > tdb:graphName
>>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>>> >
>>>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>>>> > tdb:location "itemDB" ;
>>>> > tdb:graphName
>>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>>> >
>>>> > ------------------------------------------------------- end
>>>> of config -------------------------------------------------
>>>> >
>>>> > Any ideas how to fix the TDBTransactionException? (full
>>>> trace
>>>> below)
>>>> >
>>>> > Regards, Barry
>>>> >
>>>> >
>>>> > org.apache.jena.tdb.transaction.TDBTransactionException: Not
>>>> in a transaction
>>>> > at
>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>>> raphTransaction.java:140)
>>>>
>>>> > at
>>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>>> raphTransaction.java:52)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWra
>>>> pper.java:78)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWra
>>>> pper.java:167)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>>> 24)
>>>> > at
>>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>>> 16)
>>>> > at
>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>> > at
>>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.j
>>>> ava:170)
>>>>
>>>> > at
>>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.ja
>>>> va:147)
>>>>
>>>> > at
>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>>> > at
>>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:25
>>>> 8)
>>>> > at
>>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Triple
>>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextSt
>>>> age(QueryIterTriplePattern.java:49)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNext
>>>> Stage(QueryIterRepeatApply.java:108)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextB
>>>> inding(QueryIterRepeatApply.java:65)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>> ryIteratorBase.java:114)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNext
>>>> Binding(QueryIterBlockTriples.java:63)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>> ryIteratorBase.java:114)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBindi
>>>> ng(QueryIterConvert.java:58)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>> ryIteratorBase.java:114)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>>> inding(QueryIteratorWrapper.java:39)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>> ryIteratorBase.java:114)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>>> inding(QueryIteratorWrapper.java:39)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>> ryIteratorBase.java:114)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>>> inding(QueryIteratorWrapper.java:39)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>>> ryIteratorBase.java:114)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStrea
>>>> m.java:74)
>>>>
>>>> > at
>>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Result
>>>> SetCheckCondition.java:55)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Que
>>>> ry.java:350)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.ja
>>>> va:288)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SP
>>>> ARQL_Query.java:242)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.ja
>>>> va:227)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Actio
>>>> nService.java:183)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Actio
>>>> nService.java:98)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>>> 74)
>>>> > at
>>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.j
>>>> ava:73)
>>>>
>>>> > at
>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>>> tHandler.java:1642)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>>> erChain.java:61)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>> java:108)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>>> ter.java:137)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>>> questFilter.java:125)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>>> erChain.java:66)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>>> java:108)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>>> ter.java:137)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>>> questFilter.java:125)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>>> erChain.java:66)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abstra
>>>> ctShiroFilter.java:449)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShir
>>>> oFilter.java:365)
>>>>
>>>> > at
>>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCalla
>>>> ble.java:90)
>>>>
>>>> > at
>>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallabl
>>>> e.java:83)
>>>>
>>>> > at
>>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delegatin
>>>> gSubject.java:383)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(Ab
>>>> stractShiroFilter.java:362)
>>>>
>>>> > at
>>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>>> questFilter.java:125)
>>>>
>>>> > at
>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>>> tHandler.java:1642)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOrigin
>>>> Filter.java:285)
>>>>
>>>> > at
>>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOrig
>>>> inFilter.java:248)
>>>>
>>>> > at
>>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>>> tHandler.java:1634)
>>>>
>>>> > at
>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.jav
>>>> a:533)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>>> java:146)
>>>>
>>>> > at
>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.ja
>>>> va:548)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrappe
>>>> r.java:132)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>>> ler.java:257)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHand
>>>> ler.java:1595)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>>> ler.java:255)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHand
>>>> ler.java:1340)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>>> er.java:203)
>>>>
>>>> > at
>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java
>>>> :473)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandl
>>>> er.java:1564)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>>> er.java:201)
>>>>
>>>> > at
>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandl
>>>> er.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(HandlerWrappe
>>>> r.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.ja
>>>> va:260)
>>>>
>>>> > at
>>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstr
>>>> actConnection.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(QueuedThreadPo
>>>> ol.java:765)
>>>>
>>>> > at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPoo
>>>> l.java:683)
>>>>
>>>> > at java.lang.Thread.run(Thread.java:745)
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > 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.
>>>> >
>>>> --
>>>> Lorenz Bühmann
>>>> AKSW group, University of Leipzig
>>>> Group: http://aksw.org - semantic web research center
>>>>
>>>>
>>>>
>>>>
> 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.
>
RE: TDBTransactionException: Not in a transaction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
Hi Andy, thanks for the update!
Maybe there is another way to get the setup that I want without having JENA-1667 arise. This is the setup I want:
- a single dataset with two named graphs (that I can access and update separately, but having separate storage locations is not a requirement. It could also be in memory)
- the default graph of the dataset is a Secured Model that uses our custom permissions Evaluator
- the Secured Model contains the union of the two named graphs.
- configurable via an fuseki assembler .TTL file
Any idea how to achieve this without bumping into JENA-1667?
Regards, Barry
-----Original Message-----
From: Andy Seaborne <an...@apache.org>
Sent: donderdag 11 juli 2019 18:34
To: users@jena.apache.org
Subject: Re: TDBTransactionException: Not in a transaction
Barry,
Quick update - it's the mixed database sources in the union graph causing the problems (so it is JENA-1667). There is a partial fix possible (would work in your case) but there are related more complicated cases that won't work so simply to be looked at.
Andy
On 10/07/2019 10:26, Andy Seaborne wrote:
> Barry - excellent. I've got it reproduced on my system now.
>
> Thanks
>
> Andy
>
>
> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>> Hi Andy/rest,
>>
>> I've created an Java example in which the Exception occurs in Jena
>> version 3.12.0. It uses Maven for dependency resolution and the
>> Exception happens when you run the Java class JenaExample.
>>
>> See: https://github.com/barrynl/jena-example
>>
>> Regards, Barry
>>
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: maandag 8 juli 2019 16:53
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction
>>
>> Some things have improved since 3.9.0.
>>
>> Barry - can you turn this into a minimal, free standing example? It's
>> not manifesting in the same way as JENA-1667.
>>
>> Thanks
>> Andy
>>
>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>> Hi, thanks for the replies!
>>>
>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>> Unfortunately, this would make the process a bit more
>>> complex...because the functionality I'm trying to add to Fuseki
>>> definitely works with version 3.9.0. Although you are right that the
>>> problem could be solved in a newer version...
>>>
>>> @Rob: thanks for the pointer to that bug. At least I can keep my eye
>>> on that one, to see when it gets fixed.
>>>
>>> Regards, Barry
>>>
>>> -----Original Message-----
>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>> Sent: maandag 8 juli 2019 14:55
>>> To: users@jena.apache.org
>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>
>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>> Known Bug that is not currently resolved in any version of Jena
>>>
>>> Although not sure why this worked in past versions of Fuseki, may be
>>> a side effect of other Fuseki refactoring that has happened
>>>
>>> Rob
>>>
>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>
>>> On 08/07/2019, 13:23, "Lorenz B."
>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>
>>> Not that I could help here that much, but is there a reason
>>> for
>>> migrating from a and old version (2017-12) to a less old
>>> version
>>> (2018-09)? I mean, latest release is 3.12.0.
>>> Maybe this might already fix your problem?
>>> > Hi all,
>>> >
>>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>> version 3.9.0. However, the following configuration file gives a
>>> "TDBTransactionException: Not in a transaction" error when I send a
>>> SELECT query to its SPARQL endpoint. It worked as expected with
>>> Apache Jena Fuseki version 3.6.0.
>>> >
>>> > I've tried the following, but these things did not solve it:
>>> >
>>> > * Adding a tdb:DatasetTDB
>>> > * Use the same tdb:location for both GraphTDB's
>>> >
>>> > ----------------------------------------------- begin of
>>> config ---------------------------------------------
>>> >
>>> > # Licensed under the terms of
>>> http://www.apache.org/licenses/LICENSE-2.0
>>> >
>>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>> >
>>> > [] rdf:type fuseki:Server ;
>>> > 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 .
>>> >
>>> > ##
>>> ---------------------------------------------------------------
>>> > ## Service with only SPARQL query on an inference model.
>>> > ## Inference model base data in TDB.
>>> >
>>> > <#service1> rdf:type fuseki:Service ;
>>> > fuseki:name "knowledge" ;
>>> > fuseki:serviceQuery "query" ; # SPARQL query
>>> service
>>> > fuseki:serviceUpdate "update" ;
>>> > fuseki:serviceUpload "upload" ; # Non-SPARQL
>>> upload service
>>> > fuseki:serviceReadWriteGraphStore "data" ; #
>>> SPARQL Graph store protocol (read and write)
>>> > # A separate read-only graph store endpoint:
>>> > fuseki:serviceReadGraphStore "get" ; #
>>> SPARQL Graph store protocol (read only)
>>> > fuseki:dataset <#dataset> .
>>> >
>>> > <#dataset> rdf:type ja:RDFDataset ;
>>> > ja:defaultGraph <#unionModel> ;
>>> > #set the timeout for a SPARQL query in milliseconds. 0
>>> means no timeout and the query never times out.
>>> > ja:context [ ja:cxtName "arq:queryTimeout" ;
>>> ja:cxtValue "120000,240000" ] ;
>>> > ja:namedGraph [
>>> > ja:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>> > ja:graph <#ontoGraph> ;
>>> > ];
>>> > ja:namedGraph [
>>> > ja:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>> > ja:graph <#itemGraph> ;
>>> > ].
>>> >
>>> > <#unionModel> rdf:type ja:UnionModel ;
>>> > ja:rootModel <#itemGraph> ;
>>> > ja:subModel <#ontoGraph> .
>>> >
>>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>>> > tdb:location "ontoDB" ;
>>> > tdb:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>> >
>>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>>> > tdb:location "itemDB" ;
>>> > tdb:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>> >
>>> > ------------------------------------------------------- end
>>> of config -------------------------------------------------
>>> >
>>> > Any ideas how to fix the TDBTransactionException? (full
>>> trace
>>> below)
>>> >
>>> > Regards, Barry
>>> >
>>> >
>>> > org.apache.jena.tdb.transaction.TDBTransactionException: Not
>>> in a transaction
>>> > at
>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>> raphTransaction.java:140)
>>>
>>> > at
>>> org.apache.jena.tdb.transaction.DatasetGraphTransaction.get(DatasetG
>>> raphTransaction.java:52)
>>>
>>> > at
>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWra
>>> pper.java:78)
>>>
>>> > at
>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWra
>>> pper.java:167)
>>>
>>> > at
>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>> 24)
>>> > at
>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:1
>>> 16)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>> > at
>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.j
>>> ava:170)
>>>
>>> > at
>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.ja
>>> va:147)
>>>
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:25
>>> 8)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$Triple
>>> Mapper.<init>(QueryIterTriplePattern.java:75)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextSt
>>> age(QueryIterTriplePattern.java:49)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNext
>>> Stage(QueryIterRepeatApply.java:108)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextB
>>> inding(QueryIterRepeatApply.java:65)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNext
>>> Binding(QueryIterBlockTriples.java:63)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBindi
>>> ng(QueryIterConvert.java:58)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>> inding(QueryIteratorWrapper.java:39)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>> inding(QueryIteratorWrapper.java:39)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextB
>>> inding(QueryIteratorWrapper.java:39)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(Que
>>> ryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStrea
>>> m.java:74)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.ResultSetCheckCondition.hasNext(Result
>>> SetCheckCondition.java:55)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Que
>>> ry.java:350)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.ja
>>> va:288)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SP
>>> ARQL_Query.java:242)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.ja
>>> va:227)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(Actio
>>> nService.java:183)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(Actio
>>> nService.java:98)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:
>>> 74)
>>> > at
>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.j
>>> ava:73)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>> tHandler.java:1642)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>> erChain.java:61)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>> java:108)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>> ter.java:137)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>> questFilter.java:125)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>> erChain.java:66)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.
>>> java:108)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFil
>>> ter.java:137)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>> questFilter.java:125)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilt
>>> erChain.java:66)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(Abstra
>>> ctShiroFilter.java:449)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShir
>>> oFilter.java:365)
>>>
>>> > at
>>> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCalla
>>> ble.java:90)
>>>
>>> > at
>>> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallabl
>>> e.java:83)
>>>
>>> > at
>>> org.apache.shiro.subject.support.DelegatingSubject.execute(Delegatin
>>> gSubject.java:383)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(Ab
>>> stractShiroFilter.java:362)
>>>
>>> > at
>>> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRe
>>> questFilter.java:125)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>> tHandler.java:1642)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOrigin
>>> Filter.java:285)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOrig
>>> inFilter.java:248)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servle
>>> tHandler.java:1634)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.jav
>>> a:533)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.
>>> java:146)
>>>
>>> > at
>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.ja
>>> va:548)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrappe
>>> r.java:132)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>> ler.java:257)
>>>
>>> > at
>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHand
>>> ler.java:1595)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHand
>>> ler.java:255)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHand
>>> ler.java:1340)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>> er.java:203)
>>>
>>> > at
>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java
>>> :473)
>>>
>>> > at
>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandl
>>> er.java:1564)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandl
>>> er.java:201)
>>>
>>> > at
>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandl
>>> er.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(HandlerWrappe
>>> r.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.ja
>>> va:260)
>>>
>>> > at
>>> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstr
>>> actConnection.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(QueuedThreadPo
>>> ol.java:765)
>>>
>>> > at
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPoo
>>> l.java:683)
>>>
>>> > at java.lang.Thread.run(Thread.java:745)
>>> >
>>> >
>>> >
>>> >
>>> > 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.
>>> >
>>> --
>>> Lorenz Bühmann
>>> AKSW group, University of Leipzig
>>> Group: http://aksw.org - semantic web research center
>>>
>>>
>>>
>>>
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.
Re: TDBTransactionException: Not in a transaction
Posted by Andy Seaborne <an...@apache.org>.
Barry,
Quick update - it's the mixed database sources in the union graph
causing the problems (so it is JENA-1667). There is a partial fix
possible (would work in your case) but there are related more
complicated cases that won't work so simply to be looked at.
Andy
On 10/07/2019 10:26, Andy Seaborne wrote:
> Barry - excellent. I've got it reproduced on my system now.
>
> Thanks
>
> Andy
>
>
> On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
>> Hi Andy/rest,
>>
>> I've created an Java example in which the Exception occurs in Jena
>> version 3.12.0. It uses Maven for dependency resolution and the
>> Exception happens when you run the Java class JenaExample.
>>
>> See: https://github.com/barrynl/jena-example
>>
>> Regards, Barry
>>
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: maandag 8 juli 2019 16:53
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction
>>
>> Some things have improved since 3.9.0.
>>
>> Barry - can you turn this into a minimal, free standing example? It's
>> not manifesting in the same way as JENA-1667.
>>
>> Thanks
>> Andy
>>
>> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>>> Hi, thanks for the replies!
>>>
>>> @Lorenz: It would indeed be better to migrate to the latest version.
>>> Unfortunately, this would make the process a bit more
>>> complex...because the functionality I'm trying to add to Fuseki
>>> definitely works with version 3.9.0. Although you are right that the
>>> problem could be solved in a newer version...
>>>
>>> @Rob: thanks for the pointer to that bug. At least I can keep my eye
>>> on that one, to see when it gets fixed.
>>>
>>> Regards, Barry
>>>
>>> -----Original Message-----
>>> From: Rob Vesse <rv...@dotnetrdf.org>
>>> Sent: maandag 8 juli 2019 14:55
>>> To: users@jena.apache.org
>>> Subject: Re: TDBTransactionException: Not in a transaction
>>>
>>> This looks like a simpler variation upon JENA-1667 [1] which is a
>>> Known Bug that is not currently resolved in any version of Jena
>>>
>>> Although not sure why this worked in past versions of Fuseki, may be a
>>> side effect of other Fuseki refactoring that has happened
>>>
>>> Rob
>>>
>>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>>
>>> On 08/07/2019, 13:23, "Lorenz B."
>>> <bu...@informatik.uni-leipzig.de> wrote:
>>>
>>> Not that I could help here that much, but is there a reason for
>>> migrating from a and old version (2017-12) to a less old version
>>> (2018-09)? I mean, latest release is 3.12.0.
>>> Maybe this might already fix your problem?
>>> > Hi all,
>>> >
>>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to
>>> version 3.9.0. However, the following configuration file gives a
>>> "TDBTransactionException: Not in a transaction" error when I send a
>>> SELECT query to its SPARQL endpoint. It worked as expected with
>>> Apache Jena Fuseki version 3.6.0.
>>> >
>>> > I've tried the following, but these things did not solve it:
>>> >
>>> > * Adding a tdb:DatasetTDB
>>> > * Use the same tdb:location for both GraphTDB's
>>> >
>>> > ----------------------------------------------- begin of
>>> config ---------------------------------------------
>>> >
>>> > # Licensed under the terms of
>>> http://www.apache.org/licenses/LICENSE-2.0
>>> >
>>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>>> >
>>> > [] rdf:type fuseki:Server ;
>>> > 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 .
>>> >
>>> > ##
>>> ---------------------------------------------------------------
>>> > ## Service with only SPARQL query on an inference model.
>>> > ## Inference model base data in TDB.
>>> >
>>> > <#service1> rdf:type fuseki:Service ;
>>> > fuseki:name "knowledge" ;
>>> > fuseki:serviceQuery "query" ; # SPARQL query
>>> service
>>> > fuseki:serviceUpdate "update" ;
>>> > fuseki:serviceUpload "upload" ; # Non-SPARQL
>>> upload service
>>> > fuseki:serviceReadWriteGraphStore "data" ; #
>>> SPARQL Graph store protocol (read and write)
>>> > # A separate read-only graph store endpoint:
>>> > fuseki:serviceReadGraphStore "get" ; # SPARQL
>>> Graph store protocol (read only)
>>> > fuseki:dataset <#dataset> .
>>> >
>>> > <#dataset> rdf:type ja:RDFDataset ;
>>> > ja:defaultGraph <#unionModel> ;
>>> > #set the timeout for a SPARQL query in milliseconds. 0
>>> means no timeout and the query never times out.
>>> > ja:context [ ja:cxtName "arq:queryTimeout" ;
>>> ja:cxtValue "120000,240000" ] ;
>>> > ja:namedGraph [
>>> > ja:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>>> > ja:graph <#ontoGraph> ;
>>> > ];
>>> > ja:namedGraph [
>>> > ja:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/data> ;
>>> > ja:graph <#itemGraph> ;
>>> > ].
>>> >
>>> > <#unionModel> rdf:type ja:UnionModel ;
>>> > ja:rootModel <#itemGraph> ;
>>> > ja:subModel <#ontoGraph> .
>>> >
>>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>>> > tdb:location "ontoDB" ;
>>> > tdb:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/onto> .
>>> >
>>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>>> > tdb:location "itemDB" ;
>>> > tdb:graphName
>>> <https://www.tno.nl/agrifood/graph/pizza/data> .
>>> >
>>> > ------------------------------------------------------- end
>>> of config -------------------------------------------------
>>> >
>>> > Any ideas how to fix the TDBTransactionException? (full trace
>>> below)
>>> >
>>> > Regards, Barry
>>> >
>>> >
>>> > 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.get(DatasetGraphTransaction.java:52)
>>>
>>> > at
>>> org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
>>>
>>> > at
>>> org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
>>>
>>> > at
>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
>>> > at
>>> org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>> > at
>>> org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
>>>
>>> > at
>>> org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
>>>
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
>>> > at
>>> org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
>>>
>>> > at
>>> org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
>>>
>>> > 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:350)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
>>>
>>> > at
>>> org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
>>> > at
>>> org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
>>>
>>> > 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.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)
>>> >
>>> >
>>> >
>>> >
>>> > 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.
>>> >
>>> --
>>> Lorenz Bühmann
>>> AKSW group, University of Leipzig
>>> Group: http://aksw.org - semantic web research center
>>>
>>>
>>>
>>>
Re: TDBTransactionException: Not in a transaction
Posted by Andy Seaborne <an...@apache.org>.
Barry - excellent. I've got it reproduced on my system now.
Thanks
Andy
On 09/07/2019 09:57, Nouwt, B. (Barry) wrote:
> Hi Andy/rest,
>
> I've created an Java example in which the Exception occurs in Jena version 3.12.0. It uses Maven for dependency resolution and the Exception happens when you run the Java class JenaExample.
>
> See: https://github.com/barrynl/jena-example
>
> Regards, Barry
>
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: maandag 8 juli 2019 16:53
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> Some things have improved since 3.9.0.
>
> Barry - can you turn this into a minimal, free standing example? It's not manifesting in the same way as JENA-1667.
>
> Thanks
> Andy
>
> On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
>> Hi, thanks for the replies!
>>
>> @Lorenz: It would indeed be better to migrate to the latest version. Unfortunately, this would make the process a bit more complex...because the functionality I'm trying to add to Fuseki definitely works with version 3.9.0. Although you are right that the problem could be solved in a newer version...
>>
>> @Rob: thanks for the pointer to that bug. At least I can keep my eye on that one, to see when it gets fixed.
>>
>> Regards, Barry
>>
>> -----Original Message-----
>> From: Rob Vesse <rv...@dotnetrdf.org>
>> Sent: maandag 8 juli 2019 14:55
>> To: users@jena.apache.org
>> Subject: Re: TDBTransactionException: Not in a transaction
>>
>> This looks like a simpler variation upon JENA-1667 [1] which is a
>> Known Bug that is not currently resolved in any version of Jena
>>
>> Although not sure why this worked in past versions of Fuseki, may be a
>> side effect of other Fuseki refactoring that has happened
>>
>> Rob
>>
>> [1] https://issues.apache.org/jira/browse/JENA-1667
>>
>> On 08/07/2019, 13:23, "Lorenz B." <bu...@informatik.uni-leipzig.de> wrote:
>>
>> Not that I could help here that much, but is there a reason for
>> migrating from a and old version (2017-12) to a less old version
>> (2018-09)? I mean, latest release is 3.12.0.
>>
>> Maybe this might already fix your problem?
>>
>> > Hi all,
>> >
>> > I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
>> >
>> > I've tried the following, but these things did not solve it:
>> >
>> > * Adding a tdb:DatasetTDB
>> > * Use the same tdb:location for both GraphTDB's
>> >
>> > ----------------------------------------------- begin of config ---------------------------------------------
>> >
>> > # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
>> >
>> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>> >
>> > [] rdf:type fuseki:Server ;
>> > 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 .
>> >
>> > ## ---------------------------------------------------------------
>> > ## Service with only SPARQL query on an inference model.
>> > ## Inference model base data in TDB.
>> >
>> > <#service1> rdf:type fuseki:Service ;
>> > fuseki:name "knowledge" ;
>> > fuseki:serviceQuery "query" ; # SPARQL query service
>> > fuseki:serviceUpdate "update" ;
>> > fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
>> > fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
>> > # A separate read-only graph store endpoint:
>> > fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
>> > fuseki:dataset <#dataset> .
>> >
>> > <#dataset> rdf:type ja:RDFDataset ;
>> > ja:defaultGraph <#unionModel> ;
>> > #set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
>> > ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
>> > ja:namedGraph [
>> > ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
>> > ja:graph <#ontoGraph> ;
>> > ];
>> > ja:namedGraph [
>> > ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
>> > ja:graph <#itemGraph> ;
>> > ].
>> >
>> > <#unionModel> rdf:type ja:UnionModel ;
>> > ja:rootModel <#itemGraph> ;
>> > ja:subModel <#ontoGraph> .
>> >
>> > <#ontoGraph> rdf:type tdb:GraphTDB ;
>> > tdb:location "ontoDB" ;
>> > tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
>> >
>> > <#itemGraph> rdf:type tdb:GraphTDB ;
>> > tdb:location "itemDB" ;
>> > tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
>> >
>> > ------------------------------------------------------- end of config -------------------------------------------------
>> >
>> > Any ideas how to fix the TDBTransactionException? (full trace below)
>> >
>> > Regards, Barry
>> >
>> >
>> > 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.get(DatasetGraphTransaction.java:52)
>> > at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
>> > at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
>> > at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
>> > at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
>> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>> > at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
>> > at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
>> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
>> > at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
>> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
>> > at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
>> > at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
>> > at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
>> > at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
>> > at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
>> > at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
>> > at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
>> > at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
>> > 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:350)
>> > at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
>> > at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
>> > at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
>> > at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
>> > at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
>> > at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
>> > at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
>> > 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.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)
>> >
>> >
>> >
>> >
>> > 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.
>> >
>> --
>> Lorenz Bühmann
>> AKSW group, University of Leipzig
>> Group: http://aksw.org - semantic web research center
>>
>>
>>
>>
>>
>>
RE: TDBTransactionException: Not in a transaction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
Hi Andy/rest,
I've created an Java example in which the Exception occurs in Jena version 3.12.0. It uses Maven for dependency resolution and the Exception happens when you run the Java class JenaExample.
See: https://github.com/barrynl/jena-example
Regards, Barry
-----Original Message-----
From: Andy Seaborne <an...@apache.org>
Sent: maandag 8 juli 2019 16:53
To: users@jena.apache.org
Subject: Re: TDBTransactionException: Not in a transaction
Some things have improved since 3.9.0.
Barry - can you turn this into a minimal, free standing example? It's not manifesting in the same way as JENA-1667.
Thanks
Andy
On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
> Hi, thanks for the replies!
>
> @Lorenz: It would indeed be better to migrate to the latest version. Unfortunately, this would make the process a bit more complex...because the functionality I'm trying to add to Fuseki definitely works with version 3.9.0. Although you are right that the problem could be solved in a newer version...
>
> @Rob: thanks for the pointer to that bug. At least I can keep my eye on that one, to see when it gets fixed.
>
> Regards, Barry
>
> -----Original Message-----
> From: Rob Vesse <rv...@dotnetrdf.org>
> Sent: maandag 8 juli 2019 14:55
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> This looks like a simpler variation upon JENA-1667 [1] which is a
> Known Bug that is not currently resolved in any version of Jena
>
> Although not sure why this worked in past versions of Fuseki, may be a
> side effect of other Fuseki refactoring that has happened
>
> Rob
>
> [1] https://issues.apache.org/jira/browse/JENA-1667
>
> On 08/07/2019, 13:23, "Lorenz B." <bu...@informatik.uni-leipzig.de> wrote:
>
> Not that I could help here that much, but is there a reason for
> migrating from a and old version (2017-12) to a less old version
> (2018-09)? I mean, latest release is 3.12.0.
>
> Maybe this might already fix your problem?
>
> > Hi all,
> >
> > I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
> >
> > I've tried the following, but these things did not solve it:
> >
> > * Adding a tdb:DatasetTDB
> > * Use the same tdb:location for both GraphTDB's
> >
> > ----------------------------------------------- begin of config ---------------------------------------------
> >
> > # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
> >
> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
> >
> > [] rdf:type fuseki:Server ;
> > 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 .
> >
> > ## ---------------------------------------------------------------
> > ## Service with only SPARQL query on an inference model.
> > ## Inference model base data in TDB.
> >
> > <#service1> rdf:type fuseki:Service ;
> > fuseki:name "knowledge" ;
> > fuseki:serviceQuery "query" ; # SPARQL query service
> > fuseki:serviceUpdate "update" ;
> > fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
> > fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
> > # A separate read-only graph store endpoint:
> > fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
> > fuseki:dataset <#dataset> .
> >
> > <#dataset> rdf:type ja:RDFDataset ;
> > ja:defaultGraph <#unionModel> ;
> > #set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
> > ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
> > ja:namedGraph [
> > ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
> > ja:graph <#ontoGraph> ;
> > ];
> > ja:namedGraph [
> > ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
> > ja:graph <#itemGraph> ;
> > ].
> >
> > <#unionModel> rdf:type ja:UnionModel ;
> > ja:rootModel <#itemGraph> ;
> > ja:subModel <#ontoGraph> .
> >
> > <#ontoGraph> rdf:type tdb:GraphTDB ;
> > tdb:location "ontoDB" ;
> > tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
> >
> > <#itemGraph> rdf:type tdb:GraphTDB ;
> > tdb:location "itemDB" ;
> > tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
> >
> > ------------------------------------------------------- end of config -------------------------------------------------
> >
> > Any ideas how to fix the TDBTransactionException? (full trace below)
> >
> > Regards, Barry
> >
> >
> > 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.get(DatasetGraphTransaction.java:52)
> > at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
> > at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
> > at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
> > at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> > at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
> > at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> > at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
> > at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
> > at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
> > at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
> > at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
> > at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> > at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
> > at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> > at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
> > 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:350)
> > at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
> > at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
> > at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
> > at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
> > at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
> > at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
> > at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
> > 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.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)
> >
> >
> >
> >
> > 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.
> >
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>
>
>
>
>
Re: TDBTransactionException: Not in a transaction
Posted by Andy Seaborne <an...@apache.org>.
Some things have improved since 3.9.0.
Barry - can you turn this into a minimal, free standing example? It's
not manifesting in the same way as JENA-1667.
Thanks
Andy
On 08/07/2019 15:20, Nouwt, B. (Barry) wrote:
> Hi, thanks for the replies!
>
> @Lorenz: It would indeed be better to migrate to the latest version. Unfortunately, this would make the process a bit more complex...because the functionality I'm trying to add to Fuseki definitely works with version 3.9.0. Although you are right that the problem could be solved in a newer version...
>
> @Rob: thanks for the pointer to that bug. At least I can keep my eye on that one, to see when it gets fixed.
>
> Regards, Barry
>
> -----Original Message-----
> From: Rob Vesse <rv...@dotnetrdf.org>
> Sent: maandag 8 juli 2019 14:55
> To: users@jena.apache.org
> Subject: Re: TDBTransactionException: Not in a transaction
>
> This looks like a simpler variation upon JENA-1667 [1] which is a Known Bug that is not currently resolved in any version of Jena
>
> Although not sure why this worked in past versions of Fuseki, may be a side effect of other Fuseki refactoring that has happened
>
> Rob
>
> [1] https://issues.apache.org/jira/browse/JENA-1667
>
> On 08/07/2019, 13:23, "Lorenz B." <bu...@informatik.uni-leipzig.de> wrote:
>
> Not that I could help here that much, but is there a reason for
> migrating from a and old version (2017-12) to a less old version
> (2018-09)? I mean, latest release is 3.12.0.
>
> Maybe this might already fix your problem?
>
> > Hi all,
> >
> > I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
> >
> > I've tried the following, but these things did not solve it:
> >
> > * Adding a tdb:DatasetTDB
> > * Use the same tdb:location for both GraphTDB's
> >
> > ----------------------------------------------- begin of config ---------------------------------------------
> >
> > # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
> >
> > @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
> >
> > [] rdf:type fuseki:Server ;
> > 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 .
> >
> > ## ---------------------------------------------------------------
> > ## Service with only SPARQL query on an inference model.
> > ## Inference model base data in TDB.
> >
> > <#service1> rdf:type fuseki:Service ;
> > fuseki:name "knowledge" ;
> > fuseki:serviceQuery "query" ; # SPARQL query service
> > fuseki:serviceUpdate "update" ;
> > fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
> > fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
> > # A separate read-only graph store endpoint:
> > fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
> > fuseki:dataset <#dataset> .
> >
> > <#dataset> rdf:type ja:RDFDataset ;
> > ja:defaultGraph <#unionModel> ;
> > #set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
> > ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
> > ja:namedGraph [
> > ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
> > ja:graph <#ontoGraph> ;
> > ];
> > ja:namedGraph [
> > ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
> > ja:graph <#itemGraph> ;
> > ].
> >
> > <#unionModel> rdf:type ja:UnionModel ;
> > ja:rootModel <#itemGraph> ;
> > ja:subModel <#ontoGraph> .
> >
> > <#ontoGraph> rdf:type tdb:GraphTDB ;
> > tdb:location "ontoDB" ;
> > tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
> >
> > <#itemGraph> rdf:type tdb:GraphTDB ;
> > tdb:location "itemDB" ;
> > tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
> >
> > ------------------------------------------------------- end of config -------------------------------------------------
> >
> > Any ideas how to fix the TDBTransactionException? (full trace below)
> >
> > Regards, Barry
> >
> >
> > 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.get(DatasetGraphTransaction.java:52)
> > at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
> > at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
> > at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
> > at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> > at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
> > at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> > at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
> > at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
> > at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
> > at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
> > at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
> > at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
> > at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> > at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
> > at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> > at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
> > 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:350)
> > at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
> > at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
> > at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
> > at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
> > at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
> > at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
> > at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
> > 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.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)
> >
> >
> >
> >
> > 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.
> >
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>
>
>
>
>
RE: TDBTransactionException: Not in a transaction
Posted by "Nouwt, B. (Barry)" <ba...@tno.nl.INVALID>.
Hi, thanks for the replies!
@Lorenz: It would indeed be better to migrate to the latest version. Unfortunately, this would make the process a bit more complex...because the functionality I'm trying to add to Fuseki definitely works with version 3.9.0. Although you are right that the problem could be solved in a newer version...
@Rob: thanks for the pointer to that bug. At least I can keep my eye on that one, to see when it gets fixed.
Regards, Barry
-----Original Message-----
From: Rob Vesse <rv...@dotnetrdf.org>
Sent: maandag 8 juli 2019 14:55
To: users@jena.apache.org
Subject: Re: TDBTransactionException: Not in a transaction
This looks like a simpler variation upon JENA-1667 [1] which is a Known Bug that is not currently resolved in any version of Jena
Although not sure why this worked in past versions of Fuseki, may be a side effect of other Fuseki refactoring that has happened
Rob
[1] https://issues.apache.org/jira/browse/JENA-1667
On 08/07/2019, 13:23, "Lorenz B." <bu...@informatik.uni-leipzig.de> wrote:
Not that I could help here that much, but is there a reason for
migrating from a and old version (2017-12) to a less old version
(2018-09)? I mean, latest release is 3.12.0.
Maybe this might already fix your problem?
> Hi all,
>
> I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
>
> I've tried the following, but these things did not solve it:
>
> * Adding a tdb:DatasetTDB
> * Use the same tdb:location for both GraphTDB's
>
> ----------------------------------------------- begin of config ---------------------------------------------
>
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
>
> @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>
> [] rdf:type fuseki:Server ;
> 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 .
>
> ## ---------------------------------------------------------------
> ## Service with only SPARQL query on an inference model.
> ## Inference model base data in TDB.
>
> <#service1> rdf:type fuseki:Service ;
> fuseki:name "knowledge" ;
> fuseki:serviceQuery "query" ; # SPARQL query service
> fuseki:serviceUpdate "update" ;
> fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
> fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
> # A separate read-only graph store endpoint:
> fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
> fuseki:dataset <#dataset> .
>
> <#dataset> rdf:type ja:RDFDataset ;
> ja:defaultGraph <#unionModel> ;
> #set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
> ja:namedGraph [
> ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
> ja:graph <#ontoGraph> ;
> ];
> ja:namedGraph [
> ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
> ja:graph <#itemGraph> ;
> ].
>
> <#unionModel> rdf:type ja:UnionModel ;
> ja:rootModel <#itemGraph> ;
> ja:subModel <#ontoGraph> .
>
> <#ontoGraph> rdf:type tdb:GraphTDB ;
> tdb:location "ontoDB" ;
> tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
>
> <#itemGraph> rdf:type tdb:GraphTDB ;
> tdb:location "itemDB" ;
> tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
>
> ------------------------------------------------------- end of config -------------------------------------------------
>
> Any ideas how to fix the TDBTransactionException? (full trace below)
>
> Regards, Barry
>
>
> 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.get(DatasetGraphTransaction.java:52)
> at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
> at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
> at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
> at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
> at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
> at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
> at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
> at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
> at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
> at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
> at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
> 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:350)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
> at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
> at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
> at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
> at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
> 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.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)
>
>
>
>
> 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.
>
--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center
Re: TDBTransactionException: Not in a transaction
Posted by Rob Vesse <rv...@dotnetrdf.org>.
This looks like a simpler variation upon JENA-1667 [1] which is a Known Bug that is not currently resolved in any version of Jena
Although not sure why this worked in past versions of Fuseki, may be a side effect of other Fuseki refactoring that has happened
Rob
[1] https://issues.apache.org/jira/browse/JENA-1667
On 08/07/2019, 13:23, "Lorenz B." <bu...@informatik.uni-leipzig.de> wrote:
Not that I could help here that much, but is there a reason for
migrating from a and old version (2017-12) to a less old version
(2018-09)? I mean, latest release is 3.12.0.
Maybe this might already fix your problem?
> Hi all,
>
> I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
>
> I've tried the following, but these things did not solve it:
>
> * Adding a tdb:DatasetTDB
> * Use the same tdb:location for both GraphTDB's
>
> ----------------------------------------------- begin of config ---------------------------------------------
>
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
>
> @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>
> [] rdf:type fuseki:Server ;
> 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 .
>
> ## ---------------------------------------------------------------
> ## Service with only SPARQL query on an inference model.
> ## Inference model base data in TDB.
>
> <#service1> rdf:type fuseki:Service ;
> fuseki:name "knowledge" ;
> fuseki:serviceQuery "query" ; # SPARQL query service
> fuseki:serviceUpdate "update" ;
> fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
> fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
> # A separate read-only graph store endpoint:
> fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
> fuseki:dataset <#dataset> .
>
> <#dataset> rdf:type ja:RDFDataset ;
> ja:defaultGraph <#unionModel> ;
> #set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
> ja:namedGraph [
> ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
> ja:graph <#ontoGraph> ;
> ];
> ja:namedGraph [
> ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
> ja:graph <#itemGraph> ;
> ].
>
> <#unionModel> rdf:type ja:UnionModel ;
> ja:rootModel <#itemGraph> ;
> ja:subModel <#ontoGraph> .
>
> <#ontoGraph> rdf:type tdb:GraphTDB ;
> tdb:location "ontoDB" ;
> tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
>
> <#itemGraph> rdf:type tdb:GraphTDB ;
> tdb:location "itemDB" ;
> tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
>
> ------------------------------------------------------- end of config -------------------------------------------------
>
> Any ideas how to fix the TDBTransactionException? (full trace below)
>
> Regards, Barry
>
>
> 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.get(DatasetGraphTransaction.java:52)
> at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
> at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
> at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
> at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
> at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
> at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
> at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
> at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
> at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
> at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
> at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
> 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:350)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
> at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
> at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
> at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
> at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
> 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.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)
>
>
>
>
> 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.
>
--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center
Re: TDBTransactionException: Not in a transaction
Posted by "Lorenz B." <bu...@informatik.uni-leipzig.de>.
Not that I could help here that much, but is there a reason for
migrating from a and old version (2017-12) to a less old version
(2018-09)? I mean, latest release is 3.12.0.
Maybe this might already fix your problem?
> Hi all,
>
> I am migrating my Apache Jena Fuseki from version 3.6.0 to version 3.9.0. However, the following configuration file gives a "TDBTransactionException: Not in a transaction" error when I send a SELECT query to its SPARQL endpoint. It worked as expected with Apache Jena Fuseki version 3.6.0.
>
> I've tried the following, but these things did not solve it:
>
> * Adding a tdb:DatasetTDB
> * Use the same tdb:location for both GraphTDB's
>
> ----------------------------------------------- begin of config ---------------------------------------------
>
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
>
> @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 xsd: <http://www.w3.org/2001/XMLSchema#> .
>
> [] rdf:type fuseki:Server ;
> 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 .
>
> ## ---------------------------------------------------------------
> ## Service with only SPARQL query on an inference model.
> ## Inference model base data in TDB.
>
> <#service1> rdf:type fuseki:Service ;
> fuseki:name "knowledge" ;
> fuseki:serviceQuery "query" ; # SPARQL query service
> fuseki:serviceUpdate "update" ;
> fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
> fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
> # A separate read-only graph store endpoint:
> fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
> fuseki:dataset <#dataset> .
>
> <#dataset> rdf:type ja:RDFDataset ;
> ja:defaultGraph <#unionModel> ;
> #set the timeout for a SPARQL query in milliseconds. 0 means no timeout and the query never times out.
> ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "120000,240000" ] ;
> ja:namedGraph [
> ja:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> ;
> ja:graph <#ontoGraph> ;
> ];
> ja:namedGraph [
> ja:graphName <https://www.tno.nl/agrifood/graph/pizza/data> ;
> ja:graph <#itemGraph> ;
> ].
>
> <#unionModel> rdf:type ja:UnionModel ;
> ja:rootModel <#itemGraph> ;
> ja:subModel <#ontoGraph> .
>
> <#ontoGraph> rdf:type tdb:GraphTDB ;
> tdb:location "ontoDB" ;
> tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/onto> .
>
> <#itemGraph> rdf:type tdb:GraphTDB ;
> tdb:location "itemDB" ;
> tdb:graphName <https://www.tno.nl/agrifood/graph/pizza/data> .
>
> ------------------------------------------------------- end of config -------------------------------------------------
>
> Any ideas how to fix the TDBTransactionException? (full trace below)
>
> Regards, Barry
>
>
> 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.get(DatasetGraphTransaction.java:52)
> at org.apache.jena.sparql.core.DatasetGraphWrapper.getR(DatasetGraphWrapper.java:78)
> at org.apache.jena.sparql.core.DatasetGraphWrapper.find(DatasetGraphWrapper.java:167)
> at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:124)
> at org.apache.jena.sparql.core.GraphView.graphBaseFind(GraphView.java:116)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> at org.apache.jena.graph.compose.MultiUnion.multiGraphFind(MultiUnion.java:170)
> at org.apache.jena.graph.compose.MultiUnion.graphBaseFind(MultiUnion.java:147)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:241)
> at org.apache.jena.graph.impl.GraphBase.graphBaseFind(GraphBase.java:258)
> at org.apache.jena.graph.impl.GraphBase.find(GraphBase.java:255)
> at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern$TripleMapper.<init>(QueryIterTriplePattern.java:75)
> at org.apache.jena.sparql.engine.iterator.QueryIterTriplePattern.nextStage(QueryIterTriplePattern.java:49)
> at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:108)
> at org.apache.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:65)
> at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> at org.apache.jena.sparql.engine.iterator.QueryIterBlockTriples.hasNextBinding(QueryIterBlockTriples.java:63)
> at org.apache.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:114)
> at org.apache.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java:58)
> 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:350)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:288)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:242)
> at org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:227)
> at org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:183)
> at org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:98)
> at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:74)
> at org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73)
> 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.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)
>
>
>
>
> 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.
>
--
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center