Apologies for this. I sent this before subscribing to the list. Please
see my other post 'null pointer exception when inserting into a named
graph', which is a better statement of the problem.
- ES
On 08/11/2011 09:18 AM, Eric Scott wrote:
Hi all -
When I execute this query (taken verbatim from
http://www.w3.org/Submission/SPARQL-Update/):
"PREFIX dc: <http://purl.org/dc/elements/1.1/>
INSERT DATA INTO <http://example/bookStore>
{ <http://example/book3> dc:title \"Fundamentals of Compiler
Design\" }
"
I get a null pointer exception in this context:
0:
com.hp.hpl.jena.sparql.core.DatasetGraphCollection.add(DatasetGraphCollection.java:27)
1:
com.hp.hpl.jena.sparql.core.DatasetGraphWrapper.add(DatasetGraphWrapper.java:57)
2:
com.hp.hpl.jena.sparql.modify.UpdateEngineWorker.visit(UpdateEngineWorker.java:215)
3:
com.hp.hpl.jena.sparql.modify.request.UpdateDataInsert.visit(UpdateDataInsert.java:15)
4:
com.hp.hpl.jena.sparql.modify.UpdateEngineMain.execute(UpdateEngineMain.java:28)
5:
com.hp.hpl.jena.sparql.modify.UpdateProcessorBase.execute(UpdateProcessorBase.java:48)
6: com.hp.hpl.jena.update.UpdateAction.execute$(UpdateAction.java:319)
7: com.hp.hpl.jena.update.UpdateAction.execute(UpdateAction.java:312)
8: com.hp.hpl.jena.update.UpdateAction.execute(UpdateAction.java:272)
9: com.hp.hpl.jena.update.UpdateAction.execute(UpdateAction.java:226)
Here's a minimal pairing that works just fine:
"PREFIX dc: <http://purl.org/dc/elements/1.1/>
INSERT DATA
{ <http://example/book3> dc:title \"Fundamentals of Compiler
Design\" }
"
I'm new to this. Do I need to somehow declare this named graph
<http://example/bookStore> before inserting into it?
Versions: Jena 2.6.4, arq 2.8.8.
Any help appreciated!
Regards,