Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 3.10.0
-
None
Description
java.lang.IllegalArgumentException: Predicate ("[some path here, for example (S|^S)/((S|^S))?]"^^java:org.apache.jena.sparql.path.P_Seq) must be a Path, URI , variable, or a wildcard.
Is a prefix missing? Prefix must be defined before use.
at org.apache.jena.arq.querybuilder.updatebuilder.WhereQuadHolder.testTriple(WhereQuadHolder.java:190)
at org.apache.jena.arq.querybuilder.updatebuilder.WhereQuadHolder.addWhere(WhereQuadHolder.java:204)
at org.apache.jena.arq.querybuilder.UpdateBuilder.addWhere(UpdateBuilder.java:813)
at org.apache.jena.arq.querybuilder.UpdateBuilder.addWhere(UpdateBuilder.java:983)
at org.apache.jena.arq.querybuilder.UpdateBuilder.addWhere(UpdateBuilder.java:1012)
How to reproduce:
Path path = createSomePath()...
UpdateRequest update = new UpdateRequest(new UpdateBuilder()
.addWhere(subject, path, object)
.build());
RDFConnectionRemoteBuilder connectionBuilder = connectionBuilderFactory.createConnectionBuilder();
try (RDFConnection connection = connectionBuilder.build())
{ connection.update(update); }Workaround:
.addWhere(new TriplePath(subject, path, object));