Hi Paul, this is not a direct answer to your questions... However, I want to ask you why you are trying "Joseki with SDB" rather than "Fuseki with TDB". You seems to be at the beginning with Joseki, SDB and willing to learn.
So, let me point you at the most recent (and probably easier to use) stuff: http://openjena.org/wiki/Fuseki Fuseki comes with TDB in it. TDB is the Jena native storage system, pure Java. Nothing to install/manage separately. Unless, there are specific good reasons why you want to stick with Joseki and SDB. In that case, I am curious and I would like to know what are the key features for you. Best regards, Paolo Paul Murray wrote: > 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. > > > > > > > > > If you have received this transmission in error please notify us immediately > by return e-mail and delete all copies. If this e-mail or any attachments > have been sent to you in error, that error does not constitute waiver of any > confidentiality, privilege or copyright in respect of information in the > e-mail or attachments. > > Please consider the environment before printing this email.
