Andy, Yes, my tests pass now. Thank you!
(I was waiting for the Maven repo to be updated before I tested this, and I didn't notice the update until this morning. How often does the SNAPSHOT repo get updated? Apparently, it doesn't happen every time you commit.) -Elli ________________________________ From: Andy Seaborne <[email protected]> To: [email protected] Sent: Thursday, January 10, 2013 9:28 AM Subject: Re: Problem querying with sparqlService On 10/01/13 10:13, Andy Seaborne wrote: > 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 Should be fixed now. Similar sort of problem but different code error to the last time. Andy > > 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 >
