You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Laura Morales <la...@mail.com> on 2017/11/29 11:56:00 UTC

Error 500: Not in a transaction

So, this is the Assembler file that I'm trying to use:

======================================================
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 tdb2:    <http://jena.apache.org/2016/tdb#>
PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>

[] rdf:type fuseki:Server ;
   fuseki:services (
     <#service_tdb2>
   ) .

<#service_tdb2> a fuseki:Service ;
    rdfs:label          "TDB2 Service" ;
    fuseki:name         "tdb2" ;
    fuseki:serviceQuery "query", "sparql" ;
    fuseki:dataset      <#dataset> ;
    .

<#dataset> a ja:RDFDataset ;
    # tdb2:location              "" ;
    # tdb2:unionDefaultGraph     true ;
    ja:namedGraph                [ ja:graphName <http://example.org/g1> ;
		                   ja:graph     <#g1> ] ;
    .

<#g1> a tdb2:GraphTDB2 ;
    tdb2:location "g1" ;
    .
======================================================

what I'm trying to do, basically, is to have a dataset with multiple graphs but where each graph is located in its own location. Adding another graph would be (ideally) like this:

<#g2> a tdb2:GraphTDB2 ;
    tdb2:location "g2" ;
    .

With the above assembler:

# select ?g where { graph ?g {} }

this query works, I get a list of graphs

# select * from ex:g1 where { ?s ?p ?o } limit 10

this query doesn't work, I get "Error 500: Not in a transaction" but I really don't understand how to fix this. Is it possible to do what I'm trying to achive?

Re: Error 500: Not in a transaction

Posted by Andy Seaborne <an...@apache.org>.
See "compared to TDB1"

http://jena.staging.apache.org/documentation/tdb2/

On 02/12/17 13:18, Laura Morales wrote:
>> Extracting a single graph from TDB2 and using it in a general dataset
>> isn't supported (yet, if ever).
> 
> TDB-1 does it though, doesn't it? https://jena.apache.org/documentation/tdb/assembler.html#mixed-datasets
> 

Re: Error 500: Not in a transaction

Posted by Laura Morales <la...@mail.com>.
> Extracting a single graph from TDB2 and using it in a general dataset
> isn't supported (yet, if ever).

TDB-1 does it though, doesn't it? https://jena.apache.org/documentation/tdb/assembler.html#mixed-datasets

Re: Error 500: Not in a transaction

Posted by Andy Seaborne <an...@apache.org>.
Extracting a single graph from TDB2 and using it in a general dataset 
isn't supported (yet, if ever).

     Andy

On 29/11/17 11:56, Laura Morales wrote:
> So, this is the Assembler file that I'm trying to use:
> 
> ======================================================
> 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 tdb2:    <http://jena.apache.org/2016/tdb#>
> PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
> 
> [] rdf:type fuseki:Server ;
>     fuseki:services (
>       <#service_tdb2>
>     ) .
> 
> <#service_tdb2> a fuseki:Service ;
>      rdfs:label          "TDB2 Service" ;
>      fuseki:name         "tdb2" ;
>      fuseki:serviceQuery "query", "sparql" ;
>      fuseki:dataset      <#dataset> ;
>      .
> 
> <#dataset> a ja:RDFDataset ;
>      # tdb2:location              "" ;
>      # tdb2:unionDefaultGraph     true ;
>      ja:namedGraph                [ ja:graphName <http://example.org/g1> ;
> 		                   ja:graph     <#g1> ] ;
>      .
> 
> <#g1> a tdb2:GraphTDB2 ;
>      tdb2:location "g1" ;
>      .
> ======================================================
> 
> what I'm trying to do, basically, is to have a dataset with multiple graphs but where each graph is located in its own location. Adding another graph would be (ideally) like this:
> 
> <#g2> a tdb2:GraphTDB2 ;
>      tdb2:location "g2" ;
>      .
> 
> With the above assembler:
> 
> # select ?g where { graph ?g {} }
> 
> this query works, I get a list of graphs
> 
> # select * from ex:g1 where { ?s ?p ?o } limit 10
> 
> this query doesn't work, I get "Error 500: Not in a transaction" but I really don't understand how to fix this. Is it possible to do what I'm trying to achive?
>