On 14/10/11 02:19, Paul Murray wrote, at the end:
> … OMG! OMG! Success!
>
> So, the issue appears to be that the 3.4.4 download at
> source forge is bad.

Paul,

Thank you for reporting this - it does look like packaging error. The version of ARQ that Joseki relies on seems to be out of step with the SDB build in the download packaging.

I'm glad you managed to get something working.

I've done a development build with all the current development versions so things should be in-step:

http://openjena.org/repo-dev/org/joseki/joseki/3.4.5-SNAPSHOT/

Hope that helps,

        Andy

(That said, I'm putting more time into Fuseki (which is "Joseki 4") because it provides a more complete implementation of the SPARQL protocols)


Ok.

I want to host a SPARQL end point which serves up data from a couple of 
different systems, which I will load into an SDB data store. These are APNI 
(Australian Pant Names Index) and AFD (Australian Faunal Directory). Ideally, I 
would like people to be able to query against either graph, and also the union 
of the graphs.

I am attempting to get a minimal JOSEKI server up, using SDB and named graphs.

My SDB database has two quadruples in it:
=============================================================
        http://test.org/A, http://test.org/A#A, http://test.org/voc#name, "My name 
is A"
        http://test.org/B, http://test.org/B#B, http://test.org/voc#name, "My name 
is B"
=============================================================

This is my joseki config:
=============================================================
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>  .
@prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>  .
@prefix xsd:<http://www.w3.org/2001/XMLSchema#>  .

@prefix module:<http://joseki.org/2003/06/module#>  .
@prefix joseki:<http://joseki.org/2005/06/configuration#>  .
@prefix ja:<http://jena.hpl.hp.com/2005/11/Assembler#>  .
@prefix sdb:<http://jena.hpl.hp.com/2007/sdb#>  .

<>  rdfs:label "Joseki Configuration File - SDB example" .

[]
        rdf:type joseki:Server;
        joseki:serverDebug "true".

[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .
sdb:DatasetStore  rdfs:subClassOf  ja:RDFDataset .
sdb:Model rdfs:subClassOf  ja:Model .

<#service1>
     rdf:type            joseki:Service ;
     rdfs:label          "SPARQL-SDB";
     joseki:serviceRef   "sparql";      # web.xml must route this name to Joseki
     joseki:dataset      [
         rdf:type sdb:DatasetStore;
         joseki:poolSize 2;
         sdb:store [
             rdf:type sdb:Store ;
             sdb:layout "layout2/index";
             sdb:connection [
                 rdf:type sdb:SDBConnection;
                 sdb:sdbType       "MySQL";
                 sdb:sdbHost       "localhost";
                 sdb:sdbName       "jena";
                 sdb:sdbUser       "jena";
                 sdb:sdbPassword   "jena";
                 sdb:rdbType       "MySQL";
                 sdb:driver        "com.mysql.jdbc.Driver"
             ]
         ]
     ] ;
     joseki:processor [
         rdfs:label "SPARQL processor for fixed datasets" ;
         rdf:type joseki:Processor ;
         module:implementation [
             rdf:type joseki:ServiceImpl;
             module:className<java:org.joseki.processors.SPARQL>
         ] ;

         joseki:allowExplicitDataset       "false"^^xsd:boolean ;
         joseki:allowWebLoading            "false"^^xsd:boolean ;
         joseki:lockingPolicy              joseki:lockingPolicyMRSW
     ];
     .
=============================================================

Joseki launches ok. When I fetch this URL:
=============================================================
http://localhost:2020/sparql?query=select ?s ?p ?o where { ?s ?p ?o }
=============================================================


I get this stack trace
=============================================================
11:33:00 INFO  SPARQL               :: Throwable: 
com.hp.hpl.jena.sparql.core.Quad.isDefaultGraphIRI()Z
java.lang.NoSuchMethodError: 
com.hp.hpl.jena.sparql.core.Quad.isDefaultGraphIRI()Z
        at 
com.hp.hpl.jena.sdb.compiler.SqlStageBasicQuad.build(SqlStageBasicQuad.java:67)
        at com.hp.hpl.jena.sdb.compiler.SqlStageList.build(SqlStageList.java:23)
… etc
=============================================================

There are several issues.

First, a NoSuchMethodError means that the runtime classpath is not the same as 
the classpath with which the code was compiled. My joseki is simply the version 
that I downloaded from the web -
        
http://sourceforge.net/projects/joseki/files/Joseki-SPARQL/Joseki-3.4.4/joseki-3.4.4.zip/download
That it gets (even can get) this error anywhere is a bit of a worry.

The next problem is that, obviously, I really don't understand the 
configuration stuff. I also don't understand sparql itself well enough yet.

Ideally: i would like to have two named graphs GraphA and GraphB. I would also like to have a named 
graph GraphAB. And I would like GraphAB to be the default graph. This permits me to do versioning - 
I can load "data from APNI October" into SDB, and make the default graph be "APNI 
October data and AFD June data and CommonTerms"

The thing is: looking at the Joseki example config files, there's a section 
that says:
        # Service publishes the whole of the SDB store - this is the usual way 
to use SDB.

But looking into it a bit more closely, It would seem that this is meant to work with the 
anonymous triples rather than the quadruples. Ok … but why do I get an exception? 
Shouldn't it just be saying "there are no triples in this graph" because the 
triples table is empty?

So lets try the bit that allows you to pick one particular graph.

=============================================================
     joseki:dataset [
         rdf:type ja:RDFDataset ;
         ja:defaultGraph [
             rdf:type sdb:Model ;
             sdb:graphName<http://test.org/A>  ;
             sdb:dataset [
                 rdf:type sdb:DatasetStore;
                 joseki:poolSize 2;
                     sdb:store [
                     rdf:type sdb:Store ;
                     sdb:layout "layout2/index";
                     sdb:connection [
                     rdf:type sdb:SDBConnection;
                         sdb:sdbType       "MySQL";
                         sdb:sdbHost       "localhost";
                         sdb:sdbName       "jena";
                         sdb:sdbUser       "jena";
                         sdb:sdbPassword   "jena";
                         sdb:rdbType       "MySQL";
                         sdb:driver        "com.mysql.jdbc.Driver"
                     ]
                 ]
             ] ;
         ]
     ] ;
=============================================================

Nope. Same problem. A java error - quite a low-level one. All right. Lets try 
an older version of Joseki.

… OMG! OMG! Success!

So, the issue appears to be that the 3.4.4 download at source forge is bad.

Reply via email to