> -----Original Message-----
> From: Andy Seaborne [mailto:[email protected]] On Behalf
> Of Andy Seaborne
> Sent: Sunday, January 22, 2012 3:15 PM
> To: [email protected]
> Subject: Re: Fuseki with SDB not returning any results
> 
> On 22/01/12 15:36, John Fereira wrote:
> > Greetings,
> >
> > I just joined the list but have been working with jena and other
> semantic web tools and apps for awhile. I've been trying to get fuseki
> running and think I'm really close to what I want to do with it, but
> not
> quite here.
> >
> > I'm working with a semantic web application called Vivo
> > (vivoweb.org)
> which uses a SDB backed with MySQL. I've written a java web app which
> manages sparql queries, issues them against a joseki SPARQL endpoint
> and
> returns the results in multiple formats (basically similar to what elda
> is doing.) That's been running in production for over a year but
> because
> we've run into issues with joseki hanging up (we've got a restart
> script
> the runs periodically to restart the service) and elda is quite a bit
> more robust then the webapp I wrote I'm looking at a elda/fuseki/vivo
> configuration that will be used for a project that I am working on for
> a
> well known UN organization.
> >
> > I've got an elda/joseki/vivo implementation working and it serves up
> LOD datasets fine so far but I'm running into issues replacing joseki
> with fuseki. I built a fuseki instance from the 0.2.1-SNAPSHOT
> 
> You can get development builds from
> https://repository.apache.org/content/repositories/snapshots/org/apache
> /jena/jena-fuseki/
> 
> It's rebuild nightly if anything changed.

I believe that's where I got the 0.2.0-SNAPSHOT, but then I had to get the SDB 
and MySQL libraries and put them in the CLASSPATH to get fuseki to start with 
the SDB additions to the config file.


> 
> > and added
> SDB support and MySQL libraries. It starts up without any errors, but
> when I access it from elda (or the s-query tool in the fuseki dist),
> fuseki is handling the query but returning no results. My test, using
> s-tools, looks like this:
> 
> > ./s-query --service http://localhost:3030/ds/sparql 'SELECT * {?s ?p
> ?o}'
> >
> > Which returns:
> >
> > {
> >    "head": {
> >      "vars": [ "s" , "p" , "o" ]
> >    } ,
> >    "results": {
> >      "bindings": [
> >
> >      ]
> >    }
> > }
> >
> > I can provide a copy of my fuseki "desc" file if necessary but
> thought I just check first to see if anyone has any ideas.
> 
> Yes please.
> 
> And are you absolutely sure there is data in the default graph?  It's
> rather easy to not have data and only find out later.

As I said, I can get data out of the same triple store by pointing Joseki an 
it.  In fact, I ripped the SDB/MySQL configuration out of a working joseki 
configuration almost intact. 


Here's what my "ttl" file looks like:
# begin desc.ttl
@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 sdb:      <http://jena.hpl.hp.com/2007/sdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix :        <#> .

[] rdf:type fuseki:Server ;
   # Server-wide context parameters can be given here.
   # For example, to set query timeouts: on a server-wide basis:
   # Format 1: "1000" -- 1 second timeout
   # Format 2: "10000,60000" -- 10s timeout to first result, then 60s timeout 
to for rest of query.
   # See java doc for ARQ.queryTimeout
   # ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "10000" ] ;

   # Load custom code (rarely needed)
   # ja:loadClass "your.code.Class" ;

   # Services available.  Only explicitly listed services are configured.
   #  If there is a service description not linked from this list, it is 
ignored.
   fuseki:services (
     <#service1>
   ) .
# Declaration additional assembler items.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .

# TDB
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

# SDB

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

<#dataset> rdf:type sdb:DatasetStore ;
   ## Number of concurrent connections allowed to this dataset.
   sdb:store <#store> .

<#store> rdf:type sdb:Store  ;
   rdfs:label "SDB" ;
   sdb:layout "layout2" ;
   sdb:connection 
    [  rdf:type sdb:SDBConnection ;
     # Using MySQL
     sdb:sdbHost        "localhost" ;
     sdb:sdbType        "MySQL" ;
     sdb:sdbName        "vivodb" ;
     sdb:sdbUser        "*****" ;
     sdb:sdbPassword    "*******" ;
     sdb:driver "com.mysql.jdbc.Driver" ;
    ]
  .
## ---------------------------------------------------------------
## Vivo dataset in sdb

<#service1> rdf:type fuseki:Service ;
    fuseki:name                       "ds" ;       # http://host:port/ds
    fuseki:serviceQuery               "query" ;    # SPARQL query service
    fuseki:serviceQuery               "sparql" ;    # SPARQL query service
    # A separate ead-only graph store endpoint:
    fuseki:serviceReadGraphStore      "get" ;      # SPARQL Graph store 
protocol (read only)
    fuseki:dataset                   <#dataset> ;
    .
# end desc.ttl

Reply via email to