Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error dialog and no data (trying it out with fuseki 2) #4

Open
retog opened this issue Apr 6, 2015 · 1 comment
Open

Error dialog and no data (trying it out with fuseki 2) #4

retog opened this issue Apr 6, 2015 · 1 comment

Comments

@retog
Copy link

retog commented Apr 6, 2015

I did the following:

  • started fuseki 2 with docker run --name fuseki stain/jena-fuseki
  • installed foowiki on lighhttpd on another container named foowiki
apt-get update
apt-get install lighttpd wget unzip
cd /var/www/
wget https://github.com/danja/foowiki/archive/master.zip
/etc/init.d/lighttpd start
mv foowiki-master/ foowiki
  • changed foowiki/js/foowiki/config.js adding the prefix "http://fuseki:3030" to sparql*Endpoint
  • started a container for firefox linked to both fuseki and foowiki: docker run -d -p 127.0.0.1:5689:22 --link=fuseki:fuseki --link=foowiki:foowiki reto/firefox
  • started firefox in that docker: ssh -X -R64713:localhost:4713 -X [email protected] -p 5689 firefox
  • uploaded pages.ttl to a newly created foowiki dataset, both in thed efault graph as well as http://hyperdata.it/wiki

Accessing http://foowiki/foowiki/index.html produces two dialogs with the text "error", I see that two requests are sent to fuseki, such as:
http://fuseki:3030/foowiki/sparql?query=PREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%20%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%20%20%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%20%20%0APREFIX%20dctype%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2F%3E%20%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%20%20%0APREFIX%20sioc%3A%20%3Chttp%3A%2F%2Frdfs.org%2Fsioc%2Fns%23%3E%20%20%0APREFIX%20wiki%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fstuff%2Fwiki%23%3E%20%20%0A%0ASELECT%20DISTINCT%20%3FtopicLabel%20%20%20%0A%20FROM%20NAMED%20%3Chttp%3A%2F%2Fhyperdata.it%2Fwiki%3E%20%20%0AWHERE%20%7B%20%20%0A%20%20%20%20%3Fs%20dc%3Atopic%20%3FtopicURI%20.%20%0A%20%20%20%20%3FtopicURI%20rdfs%3Alabel%20%3FtopicLabel%20.%20%20%0A%7D%20%20%0A&output=xml

Both requests results in a 200 response but no data in the response. Strangely the same query produces some results in the fuseki console. Maybe its a problem sending the query as GET request? Does an empty result causes the error-dialog?

@retog
Copy link
Author

retog commented Apr 6, 2015

Ok, missed the essential error message before:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://fuseki:3030/foowiki/sparql?query=PREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%20%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%20%20%0APREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%20%20%0APREFIX%20dctype%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2F%3E%20%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%20%20%0APREFIX%20sioc%3A%20%3Chttp%3A%2F%2Frdfs.org%2Fsioc%2Fns%23%3E%20%20%0APREFIX%20wiki%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fstuff%2Fwiki%23%3E%20%20%0A%0ASELECT%20DISTINCT%20%3FtopicLabel%20%20%20%0A%20FROM%20NAMED%20%3Chttp%3A%2F%2Fhyperdata.it%2Fwiki%3E%20%20%0AWHERE%20%7B%20%20%0A%20%20%20%20%3Fs%20dc%3Atopic%20%3FtopicURI%20.%20%0A%20%20%20%20%3FtopicURI%20rdfs%3Alabel%20%3FtopicLabel%20.%20%20%0A%7D%20%20%0A&output=xml. This can be fixed by moving the resource to the same domain or enabling CORS.

So I have to find out how to enable CORS on fuseki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant