Oracle.spatial.rdf.server.ParseException Error Inserting Into A Rulebase

(Doc ID 1597053.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial and Graph - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

oracle.spatial.rdf.server.ParseException Error Inserting Into A Rulebase

--Immediate Person rule ----error!
insert into mdsys.semr_person_rb values('immediateperson_rule','(?x :siblingOf ?y) or (?x :parentOf ?z)', NULL,'(?x :immediatepersonOf ?y)',SEM_ALIASES(SEM_ALIAS('','http://FamilyPerson/person/')));
COMMIT;

ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.spatial.rdf.server.ParseException: Encountered "or" at line 1, column
20.
Was expecting one of:

"(" ...
ORA-06512: at "MDSYS.RDF_APIS_INTERNAL", line 104
ORA-06512: at "MDSYS.RDF_APIS_INTERNAL", line 3623
ORA-06512: at "MDSYS.RDFR_8_INSTRIG", line 2
ORA-04088: error during execution of trigger 'MDSYS.RDFR_8_INSTRIG'


test case

execute sem_apis.drop_rulebase('PERSON_RB');
EXECUTE SEM_APIS.CREATE_RULEBASE('PERSON_RB');

--Grandparent rule - ok successful
INSERT INTO mdsys.semr_person_rb VALUES('grandparent_rule','(?x :parentOf ?y) (?y :parentOf ?z)', NULL,'(?x :grandParentOf ?z)',SEM_ALIASES(SEM_ALIAS('','http://FamilyPerson/person/')));
--Immediate Person rule ----error!
INSERT INTO mdsys.semr_person_rb values('immediateperson_rule','(?x :siblingOf ?y) or (?x :parentOf ?z)', NULL,'(?x :immediatepersonOf ?y)',SEM_ALIASES(SEM_ALIAS('','http://FamilyPerson/person/')));

ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.spatial.rdf.server.ParseException: Encountered "or" at line 1, column
20.
Was expecting one of:

"(" ...
ORA-06512: at "MDSYS.RDF_APIS_INTERNAL", line 104
ORA-06512: at "MDSYS.RDF_APIS_INTERNAL", line 3623
ORA-06512: at "MDSYS.RDFR_8_INSTRIG", line 2
ORA-04088: error during execution of trigger 'MDSYS.RDFR_8_INSTRIG'

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms