5 Replies Latest reply on May 16, 2008 10:06 AM by 639645

    SPARQL support through Jena

    631789
      I am trying to run SPARQL queries through the ARQ API using the Oracle Jena implementation.

      Except where noted the failures contain the following information:
      ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.rdf.server.TokenMgrError: Lexical error at line 1, column 72. Encountered: "/" (47), after : "http:"
      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 169
      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 35
      ORA-06512: at line 4


      Desired Query (Fails on Oracle Jena, works on Jena memory and DB Jena):
      SELECT DISTINCT ?p
      WHERE
      {
      ?p <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.owl-ontologies.com/demo5.owl#SomeObjectClass>.
      { ?sae <http://www.owl-ontologies.com/demo5.owl#hasObjective> ?p . } UNION
      { ?sae <http://www.owl-ontologies.com/demo5.owl#isObjectiveOf> ?p . }
      { ?sae <http://www.owl-ontologies.com/demo5.owl#isSubjectOf> ?s . } UNION
      { ?sae <http://www.owl-ontologies.com/demo5.owl#hasSubject> ?s . }
      ?s <http://www.owl-ontologies.com/demo5.owl#hasSomeIDValue> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
      }

      I isolated two distinct problems with the query execution, but the following issue is the most problematic:

      Working Query (literal triple only, removed datatype to get it to work):
      SELECT DISTINCT ?s
      WHERE
      {
           ?s <http://www.owl-ontologies.com/demo5.owl#hasSomeIDValue> "1" .
      }

      Failing Query (literal triple only, datatype causes query failure):
      SELECT DISTINCT ?s
      WHERE
      {
           ?s <http://www.owl-ontologies.com/demo5.owl#hasSomeIDValue> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
      }

      I also tried running the failing query using the prefix notation and with various other bogus datatype URI values to just get the query to run without errors, but nothing I tried worked.

      Are datatypes unsupported in Oracle? All of the queries above run with both in memory Jena and database Jena implementations without any issues.

      Thanks,
      Robert