4 Replies Latest reply on Oct 7, 2009 6:40 PM by 655091


      I get the following exception when I run a sparql query with the new Jena adaptor. I see the same error when I run the sem_match equivalent of the query :

      Error message:
      ORA-06502: PL/SQL: numeric or value error: character string buffer too small
      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 776
      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 222
      ORA-06512: at line 1

      The query finally returns the results- albeit after a long time. The same query used to work fine with the old version of the Jena adaptor.

      The query looks like this..
      PREFIX cis:<http://cisoft.usc.edu/iam/DomainModel#> PREFIX owl:<http://cisoft.usc.edu/iam/Metadata.owl#> PREFIX owl2:<http://www.owl-ontologies.com/unnamed.owl#> PREFIX sm:<http://www.w3.org/2002/07/owl#> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT DISTINCT ?CD ?Comments ?FilePath ?FileName ?PublishedOn ?PublishedByUser ?LastModifiedOn ?ModifiedByUser ?MaturityLevel ?VersionNumber ?RM ?rmi ?rmj ?rmk ?RMName ?rmno ?rmIsParameterized ?RMUUID ?RMType ?NumberOfActiveCells ?simStopDate ?simStartDate ?noEquil ?noFluidPropRegs ?noRockPropertyRegions ?WMS where { ?CD  sm:sameAs  <mdc:ccc:1253844487918:0>.?CD owl:CDMDIsMDOfRM ?RM . OPTIONAL { ?CD owl:filePath ?FilePath } . OPTIONAL { ?CD p1 ?FileName } . OPTIONAL { ?CD p2 ?LastModifiedOn } . OPTIONAL { ?CD owl:publishDate ?PublishedOn } . OPTIONAL { ?CD owl2:publishBy ?PublishedByUser } . OPTIONAL { ?CD owl:comments ?Comments } . OPTIONAL { ?CD owl:objectModifiedByUser ?ModifiedBy . ?ModifiedBy owl2:hasCAI ?ModifiedByUser } . OPTIONAL { ?RM cis:iDimensionCells ?rmi } . OPTIONAL { ?RM cis:jDimensionCells ?rmj } . OPTIONAL { ?RM cis:kDimensionCells ?rmk } . OPTIONAL { ?RM cis:name ?RMName } . OPTIONAL { ?RM cis:numberOfCells ?rmno } . OPTIONAL { ?RM cis:RMIsParameterized ?rmIsParameterized } . OPTIONAL { ?RM cis:UUID ?RMUUID } . OPTIONAL { ?RM cis:RMType ?RMType } .OPTIONAL { ?RM cis:numberOfActiveCells ?NumberOfActiveCells } . OPTIONAL { ?RM cis:simStopDate ?simStopDate } . OPTIONAL { ?RM cis:simStartDate ?simStartDate } . OPTIONAL {?RM cis:numberOfEquil ?noEquil } . OPTIONAL { ?RM cis:numberOfFluidPropertyRegions ?noFluidPropRegs } .OPTIONAL { ?RM cis:numberOfRockPropertyRegions ?noRockPropertyRegions } . OPTIONAL { ?RM cis:WMS ?WMS } . OPTIONAL { ?RM cis:maturityLevel ?MaturityLevel } OPTIONAL { ?CD owl:versionNumber ?VersionNumber } . }


      Edited by: user652088 on Oct 6, 2009 8:46 PM
        • 1. Re: ORA-06502
          What is your DB version and what version of Jena Adaptor are you using?


          Zhe Wu
          • 2. Re: ORA-06502
            The oracle database is v11.1.0.7 and we are using the new Jena adaptor (rel 3) that we got from our metalink site.

            • 3. Re: ORA-06502

              It seems that the new version of Jena Adaptor is doing the right job to convert the whole SPARQL into a single SEM_MATCH based query. Now the problem is that database has this known server side bug (table function related) when the query is too big. You did not see this problem with Jena Adaptor v2 because ARQ breaks the query into many small pieces.

              To fix this problem, there are a few choices:

              1) upgrade to database 11.2, or
              2) shorten your query, or
              3) file a tar with Oracle support.

              We are working on an optimization in Jena Adaptor to convert a SPARQL (with just a base BGP and a number of parallel OPTIONAL clauses) into a plain SQL. This may solve your problem even if you continue use


              Zhe Wu
              1 person found this helpful
              • 4. Re: ORA-06502
                Thanks Zhe- that is helpful. We will use one of the workarounds before we switch to 11.2.