|
From: Stefan S. <sc...@un...> - 2013-11-19 10:31:34
|
Hi,
currently i am playing around with dotnetrdf from within Fsharp, using a sesame store as backend.
First, i initialized the connection to the server as follows:
let sescon = SesameHttpProtocolConnector(„192.168.0.1:8080/openrdf-sesame","test")
The domain was not set in the resolve.conf file of the server.
For querying this works fine, but as soon as i try to use a SPARQL Update like:
sescon.Update("INSERT DATA {<http://example.org/ns#jim> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Type> <http://example.org/ns#person>}“)
i always get an the following RDFStorageException .
A HTTP error occured while updating the Store. Store returned the following error message: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
<STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR noshade size="1px">
<P>
While trying to process the request:
<PRE>
POST /openrdf-sesame/repositories/test/statements HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded
Host: 141.26.24.134:8080
Content-Length: 52
Expect: 100-continue
Proxy-Connection: Keep-Alive
</PRE>
<P>
The following error was encountered:
<UL><LI><STRONG>
Invalid Request
</STRONG></UL><P>
Some aspect of the HTTP Request is invalid. Possible problems:
<UL>
<LI>Missing or unknown request method
<LI>Missing URL
<LI>Missing HTTP Identifier (HTTP/1.0)
<LI>Request is too large
<LI>Content-Length missing for POST or PUT requests
<LI>Illegal character in hostname; underscores are not allowed
</UL>
<P>Your cache administrator is <A HREF="mailto:ad...@un...">ad...@un...</A>.
<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Tue, 19 Nov 2013 09:06:01 GMT by cache (squid/2.7.STABLE5)
</ADDRESS>
</BODY></HTML>
After looking into the sesame-logs and some trial and error, i came up with the following solution.
Luckily i could easily get a domain name for my server, setting the domain in the resolve.conf and instantiating the connection using the domain-name then works.
SesameHttpProtocolConnector("http://sesame.example.org:8080/openrdf-sesame","test“)
But this might cause problems if you are not able to get a proper domain name and do not want to run your own DNS.
Maybe someone should look into this.
Greets
Stefan
--
Stefan Scheglmann
WeST Research Group
University of Koblenz-Landau
Universitaetsstrasse 1
D-56070 Koblenz
Tel.: + 49 261 287 2718
Fax: + 49 261 287 100 2718
sc...@un...
http://west.uni-koblenz.de
|