5 Replies Latest reply on Feb 12, 2008 5:47 PM by Mannamal-Oracle

    SEM_MATCH filter error

    545538
      Hi,
      I have are problem.
      When I execute query, I receive error “ORA-06502; PL/SQL: charter string buffer too small… ”.
      How long filter length available?


      SELECT relation_,relation_$RDFVTYP,relationType_,relationType_$RDFVTYP,relationType_$RDFLTYP,toEntity_,toEntity_$RDFVTYP,toEntityLabel_,toEntityLabel_$RDFVTYP,toEntityLabel_$RDFLTYP,toEntityType_,toEntityType_$RDFVTYP,toEntityType_$RDFLTYP
      FROM TABLE(SEM_MATCH(' (?relation_ onto:_from ?y_)' ||
      ' (?relation_ onto:_to ?toEntity_) '||
      ' (?relation_ sofa:__INSTANCEOF_REL ?relationType_) '||
      ' (?toEntity_ sofa:__LABEL_REL ?toEntityLabel_) '||
      ' (?toEntity_ sofa:__INSTANCEOF_REL ?toEntityType_)',
      SEM_Models('ec5_071214_261e'),
      null,
      SEM_ALIASES(SEM_ALIAS('onto','http://objects/objectsMiner/Common.English/ontology#'),
      SEM_ALIAS('sofa','http://sofa.semanticweb.org/sofa/v1.0/system#')),
      ' relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Interactions'') '||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Affairs_with_Personalities'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Affairs_with_Organizations'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Politics'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Related_Incidents'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Located_Represented'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Locates_Represents'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Participates'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Participators'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#CandidateIn'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Incidents'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Mentions'')'||
      ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#MentionedBy'')'))

      Thanks,
      Aleksey
        • 1. Re: SEM_MATCH filter error
          Mannamal-Oracle
          Can you post the entire error (with line numbers) so that we can try and pinpoint the problem? This filter length should work fine.

          You can email the error to me at melliyal <dot> annamalai <at> oracle <dot> com if you prefer to do that.

          Melli
          • 2. Re: SEM_MATCH filter error
            545538
            Hi, Melli.

            SQL> SELECT relation_,relation_$RDFVTYP,relationType_,relationType_$RDFVTYP,relationType_$RDFLTYP,toEntity_,toEntity_$RDFVTYP,toEntityLabel_,toEntityLabel_$RDFVTYP,toEntityLabel_$RDFLTYP,toEntityType_,toEntityType_$RDFVTYP,toEntityType_$RDFLTYP
            2 FROM TABLE(SEM_MATCH(' (?relation_ onto:_from ?y_)' ||
            3 ' (?relation_ onto:_to ?toEntity_) '||
            4 ' (?relation_ sofa:__INSTANCEOF_REL ?relationType_) '||
            5 ' (?toEntity_ sofa:__LABEL_REL ?toEntityLabel_) '||
            6 ' (?toEntity_ sofa:__INSTANCEOF_REL ?toEntityType_)',
            7 SEM_Models('EC_080118_282E'),
            8 null,
            9 SEM_ALIASES(SEM_ALIAS('onto','http://objects/objectsMiner/Common.English/ontology#'),
            10 SEM_ALIAS('sofa','http://sofa.semanticweb.org/sofa/v1.0/system#')),
            11 ' relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Interactions'') '||
            12 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Affairs_with_Personalities'')'||
            13 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Affairs_with_Organizations'')'||
            14 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Politics'')'||
            15 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Related_Incidents'')'||
            16 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Located_Represented'')'||
            17 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Locates_Represents'')'||
            18 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Participates'')'||
            19 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Participators'')'||
            20 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#CandidateIn'')'||
            21 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Incidents'')'||
            22 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Mentions'')'||
            23 ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#MentionedBy'')'))
            24 /

            SELECT relation_,relation_$RDFVTYP,relationType_,relationType_$RDFVTYP,relationType_$RDFLTYP,toEntity_,toEntity_$RDFVTYP,toEntityLabel_,toEntityLabel_$RDFVTYP,toEntityLabel_$RDFLTYP,toEntityType_,toEntityType_$RDFVTYP,toEntityType_$RDFLTYP
            FROM TABLE(SEM_MATCH(' (?relation_ onto:_from ?y_)' ||
            ' (?relation_ onto:_to ?toEntity_) '||
            ' (?relation_ sofa:__INSTANCEOF_REL ?relationType_) '||
            ' (?toEntity_ sofa:__LABEL_REL ?toEntityLabel_) '||
            ' (?toEntity_ sofa:__INSTANCEOF_REL ?toEntityType_)',
            SEM_Models('EC_080118_282E'),
            null,
            SEM_ALIASES(SEM_ALIAS('onto','http://objects/objectsMiner/Common.English/ontology#'),
            SEM_ALIAS('sofa','http://sofa.semanticweb.org/sofa/v1.0/system#')),
            ' relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Interactions'') '||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Affairs_with_Personalities'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Affairs_with_Organizations'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Politics'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Related_Incidents'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Located_Represented'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Locates_Represents'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Participates'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Participators'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#CandidateIn'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Incidents'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Common.English/ontology#Mentions'')'||
            ' OR relationType_=TO_CHAR(''http://objects/objectsMiner/Co

            ORA-06502: PL/SQL: : character string buffer too small ошибка числа или значения
            ORA-06512: на "MDSYS.RDF_MATCH_IMPL_T", line 176
            ORA-06512: на line 1
            • 3. Re: SEM_MATCH filter error
              68458
              I have the same problem. The following sentence works:

              SELECT x Namex,y Namey
              FROM TABLE(SEM_MATCH(
              '(?x :Aheight ?ax) (?x :Bheight ?bx) (?x :Cheight ?cx) (?x :Dheight ?dx)
              (?y :Aheight ?ay) (?y :Bheight ?b1y) (?y :Cheight ?cy) (?y :Dheight ?dy)',
              SEM_Models('family'),
              SEM_Rulebases('RDFS','family_rb'),     
              SEM_ALIASES(SEM_ALIAS('','http://www.example.org/family/')),
              null)) where (to_number(bx)+to_number(ax)) <= (to_number(cy)+to_number(dy)) and
              (to_number(b1y)+to_number(ay)) <= (to_number(cx)+to_number(dx));

              but when I use the same condition into filter clause like this:

              SELECT x Namex,y Namey
              FROM TABLE(SEM_MATCH(
              '(?x :Aheight ?ax) (?x :Bheight ?bx) (?x :Cheight ?cx) (?x :Dheight ?dx)
              (?y :Aheight ?ay) (?y :Bheight ?b1y) (?y :Cheight ?cy) (?y :Dheight ?dy)',
              SEM_Models('family'),
              SEM_Rulebases('RDFS','family_rb'),     
              SEM_ALIASES(SEM_ALIAS('','http://www.example.org/family/')),
              '(to_number(bx)+to_number(ax)) <= (to_number(cy)+to_number(dy)) and to_number(b1y)+to_number(ay)) <= (to_number(cx)+to_number(dx))'));

              I get the same error:

              ERROR en lÝnea 1:
              ORA-06502: PL/SQL: error : buffer de cadenas de caracteres demasiado peque±o
              numÚrico o de valor
              ORA-06512: en "MDSYS.RDF_MATCH_IMPL_T", lÝnea 176
              ORA-06512: en lÝnea 1

              I have many problems with sem_match filter syntax. Could you provide a litle guide for the correct use of this clause?
              • 4. Re: SEM_MATCH filter error
                JorgeB-Oracle
                Hi All,

                I have reproduced in-house with the Family example
                I have created bug 6802000 on your behalf to follow up with Development on this case
                When a resolution comes in I will update the thread also

                Regards!
                Jorge
                • 5. Re: SEM_MATCH filter error
                  Mannamal-Oracle
                  Here is an update on the issue. The limit is currently 4000 characters, the usual length for strings. However, given the posts on this forum, we are planning to extend that limit, and that will probably be in an upcoming patch.

                  Melli