ARQInternalErrorException during query execution in Jena 4.10.0 while using TDB #2150
-
Hi all, We are attempting to upgrade from Jena 3.5 to Jena 4.10.0. Query : INSERT {
GRAPH <http://knowledge-store-test.com/b4a77401-9233-4115-b9db-dcbed33d73e2> {
<rdf:s1> <rdf:p1> "o1" .
}
}
WHERE
{ GRAPH <http://knowledge-store-test.com/b4a77401-9233-4115-b9db-dcbed33d73e2>
{ <rdf:s2> <rdf:p2> <rdf:o2>}
GRAPH <http://knowledge-store-test.com/8bfa2a32-f95e-476f-99e9-84b355bed6a2>
{ FILTER NOT EXISTS { <rdf:s3> <rdf:p3> "o3" }}
} Error :
Code to repro the issue : private final Triple triple1 = new Triple(
createURI("rdf:s1"),
createURI("rdf:p1"),
createLiteral("o1"))
private final Triple triple2 = new Triple(
createURI("rdf:s2"),
createURI("rdf:p2"),
createURI("rdf:o2"))
private final Triple triple3 = new Triple(
createURI("rdf:s3"),
createURI("rdf:p3"),
createLiteral("o3"))
private final graph1 = getNamedGraph()
private final graph2 = getNamedGraph()
@Test
void testQueryFailure() {
RDFConnection conn = RDFConnection.connect(TDBFactory.createDataset());
UpdateBuilder updateBuilder = new UpdateBuilder();
updateBuilder.addInsert(graph1, triple1);
SelectBuilder where = new SelectBuilder();
where.addWhere(triple2);
updateBuilder.addGraph(graph1, where);
SelectBuilder notExists = new SelectBuilder();
notExists.addWhere(triple3);
SelectBuilder where2 = new SelectBuilder();
where2.addFilter(where2.getExprFactory().notexists(notExists));
updateBuilder.addGraph(graph2, where2);
UpdateRequest updateRequest = updateBuilder.buildRequest();
System.out.println("From the tests : " + updateRequest.toString())
update(conn, updateRequest);
}
public void update(final RDFConnection conn, final UpdateRequest request) {
conn.begin(ReadWrite.WRITE);
try {
conn.update(request);
conn.commit();
} finally {
conn.end();
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
So your raw SPARQL (after I fixed GitHub's conversion of the URIs into Markdown links 🤦 ) is perfectly valid SPARQL Update which ARQs parser accepts Given the error:
And the fact that you are using the Query Builder API this looks like a bug in that API, in that it's building a Query AST that other parts of ARQ (the I think the problem is that the Query Builder puts a bare |
Beta Was this translation helpful? Give feedback.
-
This was created Jan 4 2004, 4.29AM The example query shown is not the query string generated by the update builder, which is
Note the different layout around the |
Beta Was this translation helpful? Give feedback.
-
As noted on the email list, the suggested workaround works because it is the parser generating the AST to be compiled. |
Beta Was this translation helpful? Give feedback.
-
Using "Create issue from discussion" created #2153. The issue is not related to TDB. |
Beta Was this translation helpful? Give feedback.
Using "Create issue from discussion" created #2153.
The issue is not related to TDB.