3 Replies Latest reply on Apr 4, 2011 1:22 PM by 755140

    [SOLVED] Error: PLS-00707: unsupported construct or internal error [2603]

    755140
      Hi all,
      I have a SP, when I try to compile with sqldeveloper I have this error

      Error: PLS-00707: unsupported construct or internal error [2603]

      If I change "CREATE OR REPLACE PROCEDURE getsimilar AS" with DECLARE (anonymous block) the code work perfectly...

      What am I doing wrong?

      this is SP
      --------------------------------------------------------------------------------
      CREATE OR REPLACE PROCEDURE getsimilar AS
      id NUMBER;
      score NUMBER;
      image ORDSYS.ORDImage;
      query_signature ORDSYS.ORDImageSignature;
      queryimg ORDSYS.ORDIMAGE;
      CURSOR getphotos IS
      SELECT id, ORDSYS.IMGScore(123) SCORE FROM imgstable WHERE
      ORDSYS.IMGSimilar(sign, query_signature,
      'color="1.00" shape="1.00" texture="1.00" location="1.00"',20,123) = 1 order by SCORE desc;
      BEGIN
      queryimg := ORDSYS.ORDIMAGE.init('FILE','BDMVFSUPLOADSEARCHTMP','test.jpeg');
      query_signature := ORDSYS.ORDIMAGESIGNATURE.init();
      DBMS_LOB.CREATETEMPORARY(query_signature.signature, TRUE);
      query_signature.generateSignature(queryimg);
      OPEN getphotos;
      LOOP
      FETCH getphotos INTO id, score;
      EXIT WHEN getphotos%NOTFOUND;
      DBMS_OUTPUT.PUT_LINE('Image with ID ' || id || ' matches query image. score:' || score);
      END LOOP;
      CLOSE getphotos;
      DBMS_LOB.FREETEMPORARY(query_signature.signature);
      END;
      --------------------------------------------------------------------------------

      Edited by: Reny on 4-apr-2011 6.22
        • 1. Re: Error: PLS-00707: unsupported construct or internal error [2603]
          327282
          Hi
          Try creating the procedure without the positional notation in your function call in the cursor (BTW, the positional params should be specified as <param> => <value>, not <param> = <value>). i.e just pass the values to your functional call as shown below and see if it works. Is this what you intend to do?

          I also suggest that you try and compile the procedure in SQLPLUS.
          CREATE OR REPLACE PROCEDURE getsimilar AS
          id NUMBER;
          score NUMBER;
          image ORDSYS.ORDImage;
          query_signature ORDSYS.ORDImageSignature;
          queryimg ORDSYS.ORDIMAGE;
          CURSOR getphotos IS
          SELECT id, ORDSYS.IMGScore(123) SCORE FROM imgstable WHERE
          ORDSYS.IMGSimilar(sign, query_signature, 
           '1.00', '1.00', '1.00','1.00',20,123) = 1 order by SCORE desc;
          BEGIN
          queryimg := ORDSYS.ORDIMAGE.init('FILE','BDMVFSUPLOADSEARCHTMP','test.jpeg');
          query_signature := ORDSYS.ORDIMAGESIGNATURE.init();
          DBMS_LOB.CREATETEMPORARY(query_signature.signature, TRUE);
          query_signature.generateSignature(queryimg);
          OPEN getphotos;
          LOOP
          FETCH getphotos INTO id, score;
          EXIT WHEN getphotos%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE('Image with ID ' || id || ' matches query image. score:' || score);
          END LOOP;
          CLOSE getphotos;
          DBMS_LOB.FREETEMPORARY(query_signature.signature);
          END;
          Edited by: GG on Apr 4, 2011 11:25 AM

          Edited by: GG on Apr 4, 2011 11:34 AM
          • 2. Re: Error: PLS-00707: unsupported construct or internal error [2603]
            755140
            GG wrote:
            Hi
            Try creating the procedure without the positional notation in your function call in the cursor (BTW, the positional params should be specified as <param> => <value>, not <param> = <value>). i.e just pass the values to your functional call as shown below and see if it works.
            Hi GG, thanks for your replay.

            No, your code not work for me, the ORDSYS.IMGSimilar is call in the correct way in my code.

            If I have
            DECLARE
            id NUMBER;
            score NUMBER;
            image ORDSYS.ORDImage;
            query_signature ORDSYS.ORDImageSignature;
            queryimg ORDSYS.ORDIMAGE;
            CURSOR getphotos IS
            SELECT id, ORDSYS.IMGScore(123) SCORE FROM imgstable WHERE
            ORDSYS.IMGSimilar(sign, query_signature,
            'color="1.00" shape="1.00" texture="1.00" location="1.00"',20,123) = 1 order by SCORE desc;
            BEGIN
            .....
            .....

            my previous code work ok.
            But if I change
            DECLARE in "CREATE OR REPLACE PROCEDURE getsimilar AS"
            for compile and create a PROCEDURE,
            I still get the "Error: PLS-00707: unsupported construct or internal error [2603]".
            • 3. Re: Error: PLS-00707: unsupported construct or internal error [2603]
              755140
              Solved: it's a SQLDeveloper problem, I have executed the script in sqlplus and I have created the procedure correctly.....