On 14/01/16 09:46, Bangalore Akhilesh wrote:
Hi,

I would like to know the steps involved in setting up Fuseki to work with
SDB against Oracle database. Can one of you please help?

Also, does Fuseki2 work as expected with SDB?

Thanks,
Akhilesh


Hi Akhilesh,

It works (I just checked) though it is a bit tricky. It is easily influenced by the external environment.

1/ Get the jars onto the Fuseki class path - it's easier to take the script or however you are running it and change it to put the jars and the fuseki server jar, use -cp and then main entry point:

org.apache.jena.fuseki.cmd.FusekiCmd

The "fuseki-dev" script in

https://github.com/apache/jena/tree/master/jena-fuseki2/jena-fuseki-core

may help. It does not use a standalone jar.

(Or download source and modify the POM and rebuild - once you have that working you can have a completely self contained jar for the server. Convenient, but it takes more to set up.)

2/
If you have a store description for an SDB store,

http://jena.apache.org/documentation/sdb/
http://jena.apache.org/documentation/sdb/fuseki_integration.html

You need a fuseki configuration file including stuff in the server file (config.ttl). I didn't test in different "configuration/" files.

---- config.ttl
@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 sdb:     <http://jena.hpl.hp.com/2007/sdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

[] rdf:type fuseki:Server ;
    ## Initialize SDB.
    ja:loadClass "org.apache.jena.sdb.SDB" ;
    fuseki:services (
      <#service1>
    ) .

# Probably unnecessary nowadays in a Fuseki description.
# sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .

<#service1> rdf:type fuseki:Service ;
    # URI of the dataset -- http://host:port/ds
    fuseki:name                        "ds" ;
    fuseki:serviceQuery                "sparql" ;
    fuseki:serviceQuery                "query" ;
    fuseki:serviceUpdate               "update" ;
    fuseki:serviceUpload               "upload" ;
    fuseki:serviceReadWriteGraphStore  "data" ;
    fuseki:serviceReadGraphStore       "get" ;
    fuseki:dataset                     <#dataset> ;
    .

    <#dataset> rdf:type sdb:DatasetStore ;
        sdb:store <#store> .

    <#store> rdf:type sdb:Store ;
        sdb:layout     "layout2" ;
        sdb:connection <#conn> ;
        .

    <#conn> rdf:type sdb:SDBConnection ;
        ... your setup ...
-----
ja:loadClass will become unnecessary in 3.1.0


An example (and not tested recently) Oracle setup for a Store:

https://github.com/apache/jena/blob/master/jena-sdb/Store/sdb-oracle.ttl


If you get it to work, I'll revise the documentation some more.

        Andy

Reply via email to