Home » Developer & Programmer » Forms » Uploading to application server failed (oracle 19i)
Uploading to application server failed [message #424045] Wed, 30 September 2009 01:18 Go to next message
clarenz_25
Messages: 3
Registered: October 2008
Junior Member
good day!

i have a problem in uploading files in the server. i am using web forms. but when i run it from the developer program it runs smoothly. but when when i try to run it from the web it always prompt me "FILE UPLOAD TO APPLICATION SERVER FAILED". here is the procedure that i used in the program. UPLOAD_AS:

/* Formatted on 2009/10/15 16:11 (Formatter Plus v4.8.0) */
PROCEDURE UPLOAD_AS IS
   l_success         boolean;
   l_bare_filename   varchar2 (50);
   v_loader_path     VARCHAR2 (256);
   status            number;
   Problem           EXCEPTION;
BEGIN
   tool_env.getvar ('LEG_TOP', v_loader_path);
   v_loader_path := v_loader_path || '/ISP';
   l_bare_filename := substr (:CTRL.file_name,
                              instr (:CTRL.file_name, '\', -1) + 1);
   l_success :=
      webutil_file_transfer.Client_To_AS_with_progress
                  (clientFile => :CTRL.file_name,
                   serverFile => v_loader_path || '/' || l_bare_filename,
                   progressTitle => 'Upload to Application Server in progress',
                   progressSubTitle => 'Please wait', asynchronous => false,
                   callbackTrigger => null);
   if l_success then
      message ('File uploaded successfully to the Application Server');
      BEGIN
         insert into flt_isp
                     (CTRL_NO,
                      ID_NUMBER,
                      ENAME,
                      PLANT,
                      DEPARTMENT,
                      CATEGORY1,
                      IMP_DEPT,
                      ERO,
                      STATUS,
                      CUR_DATE,
                      ISP_TITLE,
                      ENTERED_BY,
                      VOID_NO,
                      FILENAME,
                      P_CONDITION,
                      S_CONDITION)
              values (:CTRL_NO,
                      :ctrl.ID_NUMBER,
                      :NAME_item1,
                      :PLANT,
                      :DEPARTMENT,
                      :CATEGORY1,
                      :IMP_DEPT,
                      :name_item2,
                      :STATUS,
                      :CUR_DATE,
                      :text_item61,
                      :ENTERED_BY,
                      :VOID_NO,
                      NVL (:FILE_NAME, ' '),
                      :P_CONDITION,
                      :S_CONDITION);
      EXCEPTION
         WHEN OTHERS THEN
            MESSAGE (MESSAGE_CODE || ' - ' || MESSAGE_TEXT);
            MESSAGE (MESSAGE_CODE || ' - ' || MESSAGE_TEXT);
            RAISE FORM_TRIGGER_FAILURE;
      END;
      commit;
      CLEAR_MESSAGE;
   else
      message ('File upload to Application Server failed');
   end if;
exception
   when others then
      message ('File upload failed: ' || sqlerrm);
END;

[EDITED by DJM: formatted the code and applied [code] tags]

[Updated on: Thu, 15 October 2009 00:12] by Moderator

Report message to a moderator

Re: Uploading to application server failed [message #426325 is a reply to message #424045] Thu, 15 October 2009 00:13 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

Have you verified that the directory exists?

Have you determined on which line the code is failing?

David
Previous Topic: Webutil WEBUTIL_FILE.FILE_OPEN_DIALOG ERROR
Next Topic: pjc calender implementation in oracle form9i & Plugable java calender implementation in oracle f
Goto Forum:
  


Current Time: Fri Sep 20 10:32:44 CDT 2024