Reputation: 51
I am trying to insert an resource in my rdf file which is being stored in local virtuoso triple store. My sparql endpoint is also on my own server. But it says some error 500 is coming which says server internal problem occured. Thanks for any suggestion in advance
My SPARQL query is
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA
{
<http://edf.org/resource/dev> foaf:name "dev" .
}
Upvotes: 2
Views: 7100
Reputation: 28646
Yep Jeen was correct.
Virtuoso still supports the older non-standard SPARUL syntax rather than did not yet support the new SPARQL 1.1 update syntax (added in Virtuoso 6.1.7 / 7.0.0).
Also Virtuoso does not allow inserts into the default graph as it doesn't have an explicit unnamed default graph. Your update needs to be changed to the following:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA INTO GRAPH <http://example.org/graph>
{
<http://edf.org/resource/dev> foaf:name "dev" .
}
For comparison in standard SPARQL 1.1:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
INSERT DATA
{
GRAPH <http://example.org/graph>
{ <http://edf.org/resource/dev> foaf:name "dev" . }
}
Another possible issue is whether you have permissions set up properly so that SPARQL Updates can be made via the web interface?
To do this, you need to go into Virtuoso conductor (http://localhost:8890/conductor/
by default) and ensure the SPARQL
user account has the role SPARQL_UPDATE
applied to it. You'll find the User Accounts tab under the System Admin tab.
Upvotes: 3
Reputation: 22042
Your SPARQL update query looks fine. At a guess, I'd say your version of Virtuoso does not support SPARQL Update (it's relatively new feature of the SPARQL language and not all RDF databases support it fully yet). Ask around on the Virtuoso's own community forum for details.
Upvotes: 0