On 09/01/13 20:54, Elli Schwarz wrote:
Andy,
I just upgraded my pom files to point to the latest Jena snapshots (from this
morning). While I can verify that JENA-361 is fixed for SELECT queries, I'm
still having the problem for INSERT. So, this code doesn't work:
String updateString = "prefix ex: <http://example.org/> \n"
+ "with <urn:test:t1> \n" + "INSERT {?foo ex:foo ?obj} \n"
+ "WHERE { ?foo ex:prop1 [ \n"
+ " ex:prop2 ?o ;\n"
+ " ex:prop3 ?obj ] "
+ "}";
UpdateRequest update = UpdateFactory.create(updateString);
UpdateRemote.execute(update, "http://localhost:3030/ds/update"); //exception
thrown here
I get this exception (truncated):
org.apache.jena.atlas.web.HttpException: 400 Encountered " "?" "? "" at line 9,
column 5. Was expecting one of: ...
If I don't use the bracket notation above, but explicitly create another
variable instead of the [ ], it works fine. So it looks like the same problem
as JENA-361, but for INSERT scripts. As before, this works fine if I use Fuseki
directly.
(PS. Do you prefer me to report these kinds of issues in JIRA or using this
mailing list?)
Either work for me - it's the "complete minimal example" that matters
most. If things are an immediate fix and a bit "corner case", I don't
always raise a JIRA just to close it immediately, but generally having a
record in JIRA is good.
I've opened a JIRA for this as I can't look at it right now.
https://issues.apache.org/jira/browse/JENA-378
Simple case:
arq.uparse 'INSERT {} WHERE { ?x ?p [ ?a ?b ] }'
needs to be legal syntax and that command checks the whole cycle.
Andy
Thanks,
Elli