Home » Developer & Programmer » Forms » Trigger raised unhandled exception: ORA-302000 (Oracle Forms Developer 6)
Trigger raised unhandled exception: ORA-302000 [message #613213] Thu, 01 May 2014 01:24 Go to next message
kupstar
Messages: 16
Registered: November 2013
Location: PNG
Junior Member
Hi Experts,
I was running a compiled oracle developer form version 6 and I'm getting the subject error - (Trigger raised unhandled exception:ORA-302000). I can be able to run without any issue with the super user account but not with normal user accounts. The following is the line of codes that were executed while the error was thrown out.

Please review and advise why normal user accounts are getting the error.
BEGIN 
    SELECT Max(booking_id) 
           ||1 
    INTO   w_audit_id 
    FROM   lv_bookings; 

    ---select trunc(sysdate)     into w_audit_date from dual; 
    w_tp := Trunc(SYSDATE); 

    w_tp_time := To_char(SYSDATE, 'HH24MISS'); 

    w_tp_type := 'A'; 

    w_userid := 'AutoUpdate'; 

    --- 
    filename := 'I:\leaveEntitle.txt'; --- Open windows explorer  

    in_file := text_io.Fopen(filename, 'R'); 

    --- 
    reportname := 'C:\temp\leaveEntitle_LOG.txt'; --- Open windows explorer  

    report_outpf := text_io.Fopen(reportname, 'W'); 

    ---                                                                                
    LOOP 
        --- until spreadsheet file is exhausted...                                  
        --- 
        cnt := cnt + 1; 

        text_io.Get_line(in_file, linebuf); 
        ---- Reads in a csv file into working area linebuf 

        ---  
        IF Rtrim(linebuf) IS NOT NULL THEN 
          v_employee# := Lpad(Get_excel_row_itm(Rtrim(linebuf), 1, 3), 5, '0'); 

          v_next_travel_out := To_date(Rtrim(Get_excel_row_itm(linebuf, 2, 3)), 
                               'RRRR-MM-DD'); 

          v_next_travel_in := To_date(Rtrim(Get_excel_row_itm(linebuf, 3, 3)), 
                              'RRRR-MM-DD'); 

          --- 
          Message(cnt 
                  ||' Loading : ' 
                  ||v_employee#, no_acknowledge); 

          synchronize; 

          DECLARE 
              CURSOR c1 IS 
                SELECT 'YEP' 
                FROM   ot_infl_dload 
                WHERE  employee# = v_employee# 
                       AND ( ( next_travel_out = v_next_travel_out 
                               AND next_travel_in = v_next_travel_in ) 
                              OR v_next_travel_out <= next_travel_in 
                              OR ( v_next_travel_out > next_travel_in 
                                   AND v_next_travel_out <= next_travel_in + 15 
                                 ) 
                              OR v_next_travel_out + 15 < v_next_travel_in ); 
              yep VARCHAR2(3) := 'noo'; 
          BEGIN 
              yep := 'noo'; 

              OPEN c1; 

              FETCH c1 INTO yep; 

              CLOSE c1; 

              --- 
              IF yep = 'noo' THEN 
                INSERT INTO ot_infl_dload 
                VALUES      ( v_employee#, 
                             v_next_travel_out, 
                             v_next_travel_in, 
                             v_date_uploaded, 
                             '' ); 

                COMMIT; 
              ---else 
              ---message('Record exists for employee: '||v_employee#,no_acknowledge);synchronize; 
              END IF; 
          END; 
        END IF; 
    --- 
    END LOOP; 
--- 
EXCEPTION 
    WHEN no_data_found THEN 
      NULL; 
END; 



[EDITED by LF: formatted code, applied [code] tags]

[Updated on: Thu, 01 May 2014 05:10] by Moderator

Report message to a moderator

Re: Trigger raised unhandled exception: ORA-302000 [message #613225 is a reply to message #613213] Thu, 01 May 2014 05:16 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Which line exactly causes the error? As you're on 6i, you'll have to put MESSAGE calls into this code and follow its execution.

Blindly guessing, your "super user" has rights, but "normal user" doesn't have access to a file (directory?) you are working with.
Re: Trigger raised unhandled exception: ORA-302000 [message #613264 is a reply to message #613225] Thu, 01 May 2014 17:36 Go to previous messageGo to next message
kupstar
Messages: 16
Registered: November 2013
Location: PNG
Junior Member
Hi Littefoot,

I have given all the necessary permissions on the directory to the normal user but its throwing out the error. The super user doesn't have access to the directory but was able to run the form without any issues. And yes, am using 6i.

Please advise.
Re: Trigger raised unhandled exception: ORA-302000 [message #613266 is a reply to message #613264] Fri, 02 May 2014 00:12 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What about the first sentence I wrote?
Re: Trigger raised unhandled exception: ORA-302000 [message #613287 is a reply to message #613266] Fri, 02 May 2014 20:37 Go to previous messageGo to next message
kupstar
Messages: 16
Registered: November 2013
Location: PNG
Junior Member
When it's trying to do the insert on the table ot_infl_dload, it throws out the error. The user who created the table (susper user) can insert without any issues. I've checked the Grants but the normal user has insert and update privilelge via role. The normal user also has a private sysnonym. I even tried creating a public synonym for this table but it still throws out the error. The error message now I am getting is ORA-04067.
Re: Trigger raised unhandled exception: ORA-302000 [message #613292 is a reply to message #613287] Sat, 03 May 2014 03:56 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

the normal user has insert and update privilelge via role.

Try to grant these privileges directly to the normal user (instead of via role).
Previous Topic: Forms Personalization Validating a Multi-Record Block (2 Merged)
Next Topic: APEX or FORM BUILDER
Goto Forum:
  


Current Time: Thu Apr 25 09:20:22 CDT 2024