1 Reply Latest reply on Jan 24, 2011 2:32 PM by Yann39

    BLOB to ORDImage ORA-06510


      I'm building an Oracle APEX application and I need to show images stored as ORDImage.

      Images are stored locally and I don't have any access to the filesystem on the server.
      So I tried to upload an image in the APEX wwv_flow_files table (stored as BLOB) using Shared Components > Images > Create.

      Then I tried to convert the BLOB to ORDImage as follow :
           obj ordsys.ordimage;
           update photos p set p.phot_source = ordsys.ordimage.init() where p.phot_id = 1126;
        update photos p set p.phot_source.source.localdata = (select t.blob_content from wwv_flow_files t where t.filename = 'image_test.jpg') where p.phot_id = 1126;
        select phot_source into obj from photos where phot_id = 1126 for update;
           update photos set phot_source = obj where phot_id = 1126;
      But I get the following error :
      ORA-06510: PL/SQL: unhandled user-defined exception
      ORA-06512: at "ORDSYS.ORDIMG_PKG", line 814
      ORA-06512: at "ORDSYS.ORDIMAGE", line 89
      ORA-06512: at line 7
      06510. 00000 -  "PL/SQL: unhandled user-defined exception"
      *Cause:    A user-defined exception was raised by PL/SQL code, but
                 not handled.
      *Action:   Fix the problem causing the exception or write an exception
                 handler for this condition. Or you may need to contact your
                 application administrator or DBA.
      What does it mean ?
      setProperties() seems to be the problem.