Virtuoso Sparql Endpoint - does not work

486 views
Skip to first unread message

Robbet

unread,
May 25, 2011, 2:30:47 PM5/25/11
to rdf-...@googlegroups.com
Hi,

i run a Virtuoso sparql endpoint locally on my notebook (http://my-domain.dyndns.org/sparql) and receive no results when using it within the rdf-spark code.
When i replace it by http://dbpedia.org/sparql on the same query it runs fine. Any ideas?

Same query works on the sparql frontend so the server is functional.

Thanks and best regards,

Robert


P.S: Great project .... go on!

Johannes Trame

unread,
May 26, 2011, 4:57:05 AM5/26/11
to rdf-...@googlegroups.com
Hi Robert,
what do you mean by you receive no results? Is the response empty or the request not successful? Did you already tried to debug the request (e.g. with Firebug)? Maybe you can post the request and response headers?
You should also test if your local sparql endpoint accepts the json accept header. For example, send a simple request with curl -H "Accept: application/json" "http://my-domain.dyndns.org/sparql?query=SELECT+*+WHERE%7B%0A%3Fx+%3Fy+%3Fz.%0A%7D+LIMIT+10" -v
If this does not work you should try different accept headers.... like "Accept: application/sparql-results+json.  

Kind regards, Johannes

2011/5/25 Robbet <rob...@gmx.de>

Robbet

unread,
May 26, 2011, 5:44:48 AM5/26/11
to johanne...@googlemail.com, rdf-...@googlegroups.com
Hi Johannes,

thanks for your reply.

No results means no response. (on Firebug too).
If i run the curl command on my local server i get the proper response with entries.

C:\Users\Robbie\Desktop\virtuoso-opensource\bin>curl -H "Accept:application/json
" "http://localhost:8890/sparql?query=select+*+where+%7B+%3Fs+%3Fp+%3Fo+%0D%0A%7
D+LIMIT+5" -v
* About to connect() to localhost port 8890 (#0)
* Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8890 (#0)
> GET /sparql?query=select+*+where+%7B+%3Fs+%3Fp+%3Fo+%0D%0A%7D+LIMIT+5 HTTP/1.1

> User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0
> Host: localhost:8890
> Accept:application/json
>
< HTTP/1.1 200 OK
< Server: Virtuoso/06.01.3127 (Win64) x86_64-generic-win-64
< Connection: Keep-Alive
< Date: Thu, 26 May 2011 09:40:30 GMT
< Accept-Ranges: bytes
< Content-Type: application/json; charset=UTF-8
< Content-Length: 1553
<

{ "head": { "link": [], "vars": ["s", "p", "o"] },
  "results": { "distinct": false, "ordered": true, "bindings": [
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid" }     , "p": { "type": "uri", "value": "http://www.w3.org/1999
/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value": "http://www.ope
nlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid-nullable" }    , "p": { "type": "uri", "value": "http://www.w3.
org/1999/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value": "http:/
/www.openlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid-nonblank" }    , "p": { "type": "uri", "value": "http://www.w3.
org/1999/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value": "http:/
/www.openlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default-iid-nonblank-nullable" }   , "p": { "type": "uri", "value": "http:/
/www.w3.org/1999/02/22-rdf-syntax-ns#type" }    , "o": { "type": "uri", "value":
 "http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat" }},
    { "s": { "type": "uri", "value": "http://www.openlinksw.com/virtrdf-data-for
mats#default" } , "p": { "type": "uri", "value": "http://www.w3.org/1999/02/22-r
df-syntax-ns#type" }    , "o": { "type": "uri", "value": "http://www.openlinksw.
com/schemas/virtrdf#QuadMapFormat" }} ] } }* Connection #0 to host localhost lef
t intact
* Closing connection #0


I noticed that it works on the one hand on some Virtuoso sparql endpoints (like dbpedia.org, lod.openlinksw.com) and on the other hand on some not (like semantic.data.gov/sparql, nevisian.dyndns.org/sparql).
Here is the Firebug error i receive when i query my local virtuoso server.


Best regards,

Robert

Robbet

unread,
May 29, 2011, 9:11:10 AM5/29/11
to rdf-...@googlegroups.com, johanne...@googlemail.com
Hi,

it's fixed (thanks to Virtuoso mailinglist). CORS has to be enabled within the Virtuoso server configuration.

[1] http://ods.openlinksw.com/wiki/main/Main/VirtTipsAndTricksGuideCORSSetup
[2] http://enable-cors.org/


But ... another question.


I'm new to RDF-spark and want to present my sparql results on a html page.
Unfortunately i don't get into the configuration using the jquers.spark.simpletable.js.
The table has to be more extended (clickable links etc.).

What up with this element.html? Where i'm able to change the visual aspects of the table?
Maybe someone could give me some initial hints :)

Thanks!

Best regards,

Robert
Reply all
Reply to author
Forward
0 new messages