You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by an...@orange.com on 2019/05/17 12:07:27 UTC

Help for an issue on Jena Assembler (configuration of UnionModel with GraphTDB2 as rootModel)

Hello,

I am requesting your help with an issue about Jena Assembler:


I have a Fuseki2 server (3.10.0) configured with a Jena Assembler config file.

The goal is to have a Dataset exposing two named graph:

-          "Model" named graph is a Memory Model that define a custom Ontology

-          "Data" named graph is a GraphTDB2 Model used to store individuals (All triples are persisted in TDB)

I am working on a way to have the default graph of this dataset to be a Union Model.
This way, the default graph would be the union of Data + Model for Selects queries, and for Update queries triples will be inserted in the Data graph under the hood,

Below the interesting part of my configuration file:


@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

@prefix tdb2:     <http://jena.apache.org/2016/tdb#> .



[...]



<#dataset> a ja:RDFDataset ;

      ja:defaultGraph <#unionGraph> ;

      ja:namedGraph

            [

                  ja:graphName <uri:context/model> ;

                  ja:graph <#modelGraph>

            ] ;

      ja:namedGraph

            [

                  ja:graphName <uri:context/data> ;

                  ja:graph <#dataGraph>

            ] ;

      .







<#modelGraph> a ja:MemoryModel ;

      ja:content [ ja:externalContent <file :ontology.ttl> ] ;

      .



<#dataGraph> a tdb2:GraphTDB2 ;

      tdb2:location "tdb" ;

      .



<#unionGraph> a ja:UnionModel ;

      ja:rootModel <#dataGraph> ;

      ja:subModel <#modelGraph> ;

      .

When I start Fuseki2 server with this configuration, the server start correctly, but I have an issue when performing SPARQL requests:
From Fuseki2 Web page, any Select  requests on any of the three Graph produce a "TransactionException: Not in a transaction", and for update requests it produce a "TransactionException: Currently in an active transaction"

This error is not happening when <#unionGraph> is defined as:


<#unionGraph> a ja:UnionModel ;

      ja:subModel <#modelGraph> , <#dataGraph> ;

      .

And I have no transaction issue even when I try to perform queries on <#dataGraph> that requires Transaction to be used (I think Fuseki2 must make the transaction itself ).


But somehow, all Fuseki2 endpoints are broken (meaning incomprehensible issues with Transactions) when I try to use ja:rootModel with <#dataGraph>.
I guess the way to fix it is to tell to Jena that <#unionGraph> must use Transaction because the rootModel is a graphTDB2 individual.

So I have tried to use "ja:transactional" with <#unionGraph > as a Subject but it's not working, (I'm not sure about the use of ja:transactional) .
And I can't make my dataset to be a tdb2:DatasetTDB2 because it's ignoring  all configurations coming from ja: namespace.



Does anyone knows how to have a working UnionModel with a GraphTDB2 as rootModel ?
Is it a missing feature of Jena Assembler ? Or a bug ?

In advance, thanks for helping me with this issue.


Cordially,
Antoine.


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.