I ran the following queries in SPARQL in Jena framework against an ontology ( The wasBornIn predicate is present in the ontology )
select ?p where
{
?s ?p ?o FILTER NOT EXISTS { ?s :wasBornIn ?o }
}
and
select ?p where
{
{ ?s ?p ?o } MINUS { ?s :wasBornIn ?o }
}
For the first query, I am getting the following errors :
null
Error: Lexical error at line 7, column 21. Encountered: " " (32), after : "NOT"
and
null
Error: Encountered "<EOF>" at line 5, column 16.
Was expecting:
"{" ...
For the second query, I am getting a similar error :
null
Error: Lexical error at line 5, column 38. Encountered: " " (32), after : "MINUS"
Both the queries seems to be correct and I've no idea why I am getting those errors.