0 Replies Latest reply: Jan 16, 2013 7:09 PM by 985110 RSS

    Unable to upload XLSX files

    985110
      Hi Everyone,

      I know there is a seperate thread about a similar issue
      Namely Upload of XLSX File using XLS2COLLECTION

      But the error message in that thread is different to what we are getting,

      When trying to upload an XLSX file in Apex 4+ and the 2.0EA listener we get the following error message.


      Error - Error while executing this process "Upload Supporting Documents" ORA-06502: PL/SQL: numeric or value error: character string buffer too small
      ORA-06502: PL/SQL: numeric or value error: character string buffer too small
      Technical Info (only visible for developers)
      is_internal_error: false
      ora_sqlcode: -6502
      ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
      component.type: APEX_APPLICATION_PAGE_PROCESS
      component.id: 3772917940833991
      component.name: Upload Supporting Documents
      error_backtrace:
      ORA-06512: at line 7
      ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926
      ORA-06512: at "SYS.WWV_DBMS_SQL", line 966
      ORA-06512: at "SYS.WWV_DBMS_SQL", line 992
      ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 649
      ORA-06512: at "APEX_040100.WWV_FLOW_PROCESS", line 129

      I have tried to look at the above packages but they are all obviscated.

      Also, looking at the code in the APEX action, there was a table(rec_supporting_docs) that had a 50 length mime type column, which i changed to 255, but this has still not fixed it.

      The code in the apex action is
      declare
      l_blob blob := null;
      l_mime_type varchar2(50) := null;
      begin

      -- Get the uploaded supporting document
      select blob_content, mime_type
      into l_blob, l_mime_type
      from apex_application_files
      where name = :P10_SUPPORTING_DOC;

      delete from apex_application_files
      where name = :P10_SUPPORTING_DOC;

      insert into rec_supporting_docs (supporting_doc_id, rec_id, supporting_row_no,
      supporting_col_val, supporting_doc, doc_name,
      uploaded_date, mime_type, created_by, created_date)
      values (rsd_seq.nextval, :P10_REC_ID, replace(:P10_SEGMENT, substr(:P10_SEGMENT,-1,1), ''),
      substr(:P10_SEGMENT,-1,1), l_blob,
      substr(:P10_SUPPORTING_DOC, instr (:P10_SUPPORTING_DOC, '/') + 1),
      sysdate, l_mime_type, v('APP_USER'), sysdate);

      -- Add audit record
      SGL_RECHELP.RECONCILIATIONS_PKG.Insert_Audit(:P10_REC_ID, 'Supporting Document Uploaded', :APP_USER);

      end;


      Any help or suggestions woudl be greatly appreaciated.

      Regards