com.hp.hpl.jena.query.QueryParseException SPARQL Parser Syntax Error
(Doc ID 1605707.1)
Last updated on DECEMBER 31, 2019
Applies to:
Oracle Spatial and Graph - Version 11.2.0.3 and laterInformation in this document applies to any platform.
Symptoms
SPARQL query works fine when using ARQ and ask directly on the ontologies' files
Same query on the Oracle Sem database, it has a syntax error.
It's the same ARQ version in both cases.
Error message:
Exception in thread "main" com.hp.hpl.jena.query.QueryParseException: Encountered " "/" "/ "" at line 24, column 26.
Was expecting one of:
...
"true" ...
"false" ...
...
"(" ...
...
"[" ...
...
at com.hp.hpl.jena.sparql.lang.ParserARQ.perform(ParserARQ.java:86)
at com.hp.hpl.jena.sparql.lang.ParserARQ.parse$(ParserARQ.java:39)
at com.hp.hpl.jena.sparql.lang.Parser.parse(Parser.java:26)
at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:132)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:69)
at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:40)
at com.dnv.irm.oraclejenatester.DumpRdf.idiotic(DumpRdf.java:93)
at com.dnv.irm.oraclejenatester.DumpRdf.main(DumpRdf.java:63)
This is the Query:
PREFIX rdl: <http://data.aibel.com/rdl/>
PREFIX owl:MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://www.w3.org/2002/07/owl#>
PREFIX rdf: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX xml: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://www.w3.org/XML/1998/namespace>
PREFIX xsd: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://www.w3.org/2000/01/rdf-schema#>
PREFIX aibel: <http://data.aibel.com/rdl/>
PREFIX afn: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://jena.hpl.hp.com/ARQ/function#>
PREFIX fn: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://www.w3.org/2005/xpath-functions#>
PREFIX list: MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be MailScanner has detected a possible fraud attempt from "data.aibel.com" claiming to be <http://jena.hpl.hp.com/ARQ/list#>
SELECT ?class (MIN(?_label) as ?label) (MIN(?_comment) as ?comment) (MAX(?_Ej) as ?Ej)
WHERE {
GRAPH ?g {
# X101014354 is "Longitudinal Weld Joint Quality Factor, Ej"
# (the quality factor is a number between 0 and 1)
?class rdfs:subClassOf+ rdl:X101014354 ;
# X101014375 is "has Quality Factor", annotation property
rdl:X101014375 ?_label ;
# The label useful for descriptive explanation here
rdfs:label ?_comment .
# find the quality factor number used as a constraint, meaning we
# have a number with numeric datatype (likely on a superclass)
?class rdfs:subClassOf ?qfClass .
?qfClass rdfs:subClassOf* [
# :X101014372 is "Quality Factor", datatype property
owl:onProperty rdl:X101014372 ;
owl:someValuesFrom/owl:withRestrictions/
rdf:next*/rdf:first/xsd:minInclusive ?_Ej ] .
}
}
GROUP BY ?class
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |