Hi Michel,

Looks more like a question for the VIVO people.

The fact you get (empty) results suggests the Fuseki setup is fine.

An easy mistake to make is to connect to the wrong database or connect to one that isn't an SDB database. Looking with the MySQL admin tools may help.

Try the query :

select * WHERE { { ?a ?b ?c } UNION { GRAPH ?g { ?s ?p ?o } } } LIMIT 10

in case there are named graphs.

        Andy

On 06/09/13 05:31, Michel de Lange wrote:
Dear all,


I am trying to set up fusekiwith mysql (on Windows7). I canstart fuseki,
it connects to the database and the only problem is: It does not
retrieve any data.


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


[] rdf:type fuseki:Server ;
fuseki:services (
<#service>
) .

##[] ja:loadClass "net.rootdev.fusekisdbconnect.SDBConnect" .
##jumble:SDBConnect rdfs:subClassOf ja:RDFset .

## Initialize SDB.
[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .

## Declare that sdb:DatasetStore is an implementation of ja:RDFDataset .
sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .

<#service> rdf:type fuseki:Service ;
# URI of the dataset -- http://host:port/ds
fuseki:name "ds" ;

# SPARQL query services e.g. http://host:port/ds/sparql?query=...
fuseki:serviceQuery "sparql" ;
fuseki:serviceQuery "query" ;
# SPARQL Update service -- http://host:port/ds/update?request=...
fuseki:serviceUpdate "update" ; # SPARQL query service -- /ds/update

# Upload service -- http://host:port/ds/upload?graph=default or
?graph=URI or
#?default
# followed by a multipart body, each part being RDF syntax.
# Syntax determined by the file name extension.
fuseki:serviceUpload "upload" ; # Non-SPARQL upload service

# SPARQL Graph store protocol (read and write)
# GET, PUT, POST DELETE to http://host:port/ds/data?graph= or ?default=
#fuseki:serviceReadWriteGraphStore "data" ;

# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ; # Graph store protocol (read only) --
#/ds/get
# ... (special case) and as both /ds?default and /ds/?default
fuseki:serviceReadGraphStore "" ;

fuseki:dataset <#dataset> ;
.

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

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

<#conn> rdf:type sdb:SDBConnection ;
sdb:sdbType "MySQL";
sdb:sdbHost "localhost";
sdb:sdbName "VIVODB3";
sdb:driver "com.mysql.jdbc.Driver";
sdb:sdbUser "root";
sdb:sdbPassword "fred";
sdb:jdbcURL
"jdbc:mysql://localhost:3306/VIVODB3?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true";

sdb:pingQuery "SELECT 1";
#sdb:datasource "java:jboss/datasources/SDB";
============================================================================================



This is what i get when I start fuseki (this looks goodto me)


16:09:33 INFO Config :: Home Directory: C:\jena-fuseki-0.2.7\jena
-fuseki-0.2.7\.
16:09:33 INFO Config :: Configuration file: config.ttl
16:09:33 INFO Config :: Service: <file:///C:/jena-fuseki-0.2.7/je
na-fuseki-0.2.7/config.ttl#service>
16:09:33 INFO Config ::   name = ds
16:09:33 INFO Config ::   query = /ds/query
16:09:33 INFO Config ::   query = /ds/sparql
16:09:33 INFO Config ::   update = /ds/update
16:09:33 INFO Config ::   upload = /ds/upload
16:09:33 INFO Config :: graphStore(R) = /ds/
16:09:33 INFO Config :: graphStore(R) = /ds/get
16:09:34 INFO Server :: Dataset path = /ds
16:09:34 INFO Server :: Fuseki 0.2.7 2013-05-11T22:05:51+0100
16:09:34 INFO Server :: Started 2013/09/06 16:09:34 NZST on port
3030
16:09:41 INFO Fuseki :: [1] GET http://localhost:3030/ds/get?quer
y=SELECT++%3Fa+%3Fb%0AWHERE%0A++%7B+%3Fa+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%

2F22-rdf-syntax-ns%23type%3E+%3Fb+%7D%0ALIMIT+++5%0A
16:09:41 INFO Fuseki :: [1] 400 Neither ?default nor ?graph in th
e query string of the request
16:14:01 INFO Fuseki :: [2] GET http://localhost:3030/ds/sparql?q
uery=SELECT++%3Fa+%3Fb%0AWHERE%0A++%7B+%3Fa+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F

02%2F22-rdf-syntax-ns%23type%3E+%3Fb+%7D%0ALIMIT+++5%0A
16:14:01 INFO Fuseki :: [2] Query = SELECT  ?a ?b WHERE   { ?a <h
ttp://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?b } LIMIT   5
16:14:02 INFO Fuseki :: [2] exec/select
16:14:02 INFO Fuseki :: [2] 200 OK
.

But when I got to localhost:3030, and run this sparql query

select ?a ?b ?c WHERE { ?a ?b ?c }

It returns nodata. It just saysthis:

{ "head": { "vars": [ "a" , "b" , "c" ] } , "results": { "bindings": [ ]
} }


If I go to the VIVO application, and type this query in through Site
Admin, I gets lots of data. So there /is/ somethingin the database. I
also know that the fuseki query definitely goes to mysql, because if I
stop mysql just before running the query in localhost:3030, I get an
error. So it goes to mysql, but it does not return any data. My question
is: why not?

Any help is greatly appreciated,


Michel






Reply via email to