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 <[email protected]>
Sent: maandag 8 juli 2019 14:55
To: [email protected]
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."
<[email protected]> 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