Hello,

I try to set up a fuseki endpoint wiith a jena tdb backend. This works as
expected when I use the --loc argument, but I can't get it to work if I
instead provide a config file with a tdb:location argument.

See listing #1 for usage with the --loc argument. A tdb file structure is
made in an empty directory and all seems well.
See listing #2 for usage with a config.ttl file. A tdb file structure is
not made in an empty directory.

Listing #3 details version information that might be relevant.

I guess the more likely hypothesis is that my assumption that --loc and the
tdb:location arguments work in an equivalent fashion is wrong. If that is
indeed the case, then my follow up question is; "how do I get fuseki to
create or reuse a tdb structure in a file location of my choosing from a
config file?"

I've tried to google this and read the documentation (
https://jena.apache.org/documentation/fuseki2/fuseki-run.html#fuseki-as-a-standalone%20server,
https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html)
without seeing where I go wrong.

Any and all help as to where I err is appreciated.

:-)

Morten F.

-----------------listing #1 -----------------

yarc@yarc-mainlinux /tmp $ mkdir testdb1
yarc@yarc-mainlinux /tmp $ /local/fuseki/fuseki-server -v --debug
--loc=/tmp/testdb1 /test1
[2015-05-04 14:33:07] Server     INFO  Running in read-only mode for /test1
[2015-05-04 14:33:07] Server     INFO  Fuseki 2.0.0 2015-03-08T09:49:20+0000
[2015-05-04 14:33:07] Config     INFO  FUSEKI_HOME=/local/fuseki
[2015-05-04 14:33:07] Config     INFO  FUSEKI_BASE=/tmp/run
[2015-05-04 14:33:07] Servlet    INFO  Initializing Shiro environment
[2015-05-04 14:33:07] Config     INFO  Shiro file: file:///tmp/run/shiro.ini
[2015-05-04 14:33:08] Config     INFO  Template file:
templates/config-tdb-dir
[2015-05-04 14:33:08] Config     INFO  TDB dataset: directory=/tmp/testdb1
[2015-05-04 14:33:08] Builder    INFO  Service: TDB /test1
[2015-05-04 14:33:08] Config     INFO  Register: /test1
[2015-05-04 14:33:08] Server     INFO  Started 2015/05/04 14:33:08 CEST on
port 3030
^C
yarc@yarc-mainlinux /tmp $ ls testdb1/
GOSP.dat  GPOS.idn  journal.jrnl  nodes.dat  OSPG.idn  POSG.dat
prefix2id.dat  prefixIdx.dat  SPOG.dat  tdb.lock
GOSP.idn  GSPO.dat  node2id.dat   OSP.dat    OSP.idn   POSG.idn
prefix2id.idn  prefixIdx.idn  SPOG.idn
GPOS.dat  GSPO.idn  node2id.idn   OSPG.dat   POS.dat   POS.idn
prefixes.dat   SPO.dat        SPO.idn

---------------------listing #2 -------------------

yarc@yarc-mainlinux /tmp $ /local/fuseki/fuseki-server -v --debug
--conf=./config.ttl
[2015-05-04 14:38:17] Server     INFO  Fuseki 2.0.0 2015-03-08T09:49:20+0000
[2015-05-04 14:38:17] Config     INFO  FUSEKI_HOME=/local/fuseki
[2015-05-04 14:38:17] Config     INFO  FUSEKI_BASE=/tmp/run
[2015-05-04 14:38:17] Servlet    INFO  Initializing Shiro environment
[2015-05-04 14:38:17] Config     INFO  Shiro file: file:///tmp/run/shiro.ini
[2015-05-04 14:38:17] Config     INFO  Configuration file: ./config.ttl
[2015-05-04 14:38:18] Server     INFO  Started 2015/05/04 14:38:18 CEST on
port 3030
^C
yarc@yarc-mainlinux /tmp $ ls testdb2
yarc@yarc-mainlinux /tmp $ less config.ttl
# 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#> .

# TDB
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

## ---------------------------------------------------------------
## Updatable TDB dataset with all services enabled.

<#service_tdb_all> rdf:type fuseki:Service ;
    rdfs:label                      "TDB test2" ;
    fuseki:name                     "test2" ;
    fuseki:serviceQuery             "query" ;
    fuseki:serviceQuery             "sparql" ;
    fuseki:serviceUpdate            "update" ;
    fuseki:serviceUpload            "upload" ;
    fuseki:serviceReadWriteGraphStore      "data" ;
    # A separate read-only graph store endpoint:
    fuseki:serviceReadGraphStore       "get" ;
    fuseki:dataset           <#tdb_dataset_readwrite> ;

    .

<#tdb_dataset_readwrite> rdf:type      tdb:DatasetTDB ;
    tdb:location "/tmp/testdb2" ;
    ##tdb:unionDefaultGraph true ;
    .
-------------------listing #3 ---------------------

yarc@yarc-mainlinux /tmp $ /local/fuseki/fuseki-server --version
Jena:       VERSION: 2.13.0
Jena:       BUILD_DATE: 2015-03-08T09:49:20+0000
ARQ:        VERSION: 2.13.0
ARQ:        BUILD_DATE: 2015-03-08T09:49:20+0000
RIOT:       VERSION: 2.13.0
RIOT:       BUILD_DATE: 2015-03-08T09:49:20+0000
TDB:        VERSION: 1.1.2
TDB:        BUILD_DATE: 2015-03-08T09:49:20+0000
Fuseki:     VERSION: 2.0.0
Fuseki:     BUILD_DATE: 2015-03-08T09:49:20+0000
yarc@yarc-mainlinux /tmp $ java -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

Reply via email to