Trigger compilation errors in 11g

Using 11g Win 2008 Server 64 bit. I'm trying to create a trigger that willl automatically calculate the total cost of an item from the quantity required multiplied by unit cost. The trigger is used to overide user input if the toal cost of an item is left blank. I've tried variations to the following syntax and would appreciate advice on the right syntax to use. Many thanks, J
CREATE OR REPLACE TRIGGER prodreq_qtycalc
AFTER INSERT ON PRODUCT_REQUIREMENTS
FOR EACH ROW
BEGIN
IF :OLD.TOTALCOST IS NULL
THEN UPDATE PRODUCT_REQUIREMENTS
SET :NEW.TOTALCOST = (UNITCOST * QTYNEEDED);
END;

Jay wrote:
Using 11g Win 2008 Server 64 bit. I'm trying to create a trigger that willl automatically calculate the total cost of an item from the quantity required multiplied by unit cost. The trigger is used to overide user input if the toal cost of an item is left blank. I've tried variations to the following syntax and would appreciate advice on the right syntax to use. Many thanks, J
CREATE OR REPLACE TRIGGER prodreq_qtycalc
AFTER INSERT ON PRODUCT_REQUIREMENTS
FOR EACH ROW
BEGIN
IF :OLD.TOTALCOST IS NULL
THEN UPDATE PRODUCT_REQUIREMENTS
SET :NEW.TOTALCOST = (UNITCOST * QTYNEEDED);
END;As a general rule it is a BAD design to store computed value in row.
what if either UNITCOST or QTYNEEDED is NULL?
  1  CREATE OR replace TRIGGER prodreq_qtycalc
  2    before INSERT ON product_requirements
  3    FOR each ROW
  4    WHEN (old.totalcost IS NULL)
  5  DECLARE
  6  BEGIN
  7      :NEW.totalcost := ( :old.unitcost * :old.qtyneeded );
  8* END prodreq_qtycalc;
SQL> /
Trigger created.

Similar Messages

  • Trigger Compilation Error

    Good day all. I have been trying to get this trigger to work for the past three hours but to no avail. I would greatly appreciate some assistance with the two errors generated from the trigger compilation please.
    the code is:
    CREATE TABLE "User"
    (     "userId" NUMBER NOT NULL ENABLE,
         "userName" VARCHAR2(20) NOT NULL ENABLE,
         "password" VARCHAR2(20) NOT NULL ENABLE,
         "fName" VARCHAR2(30) NOT NULL ENABLE,
         "lName" VARCHAR2(30) NOT NULL ENABLE,
         "dob" Date NOT NULL ENABLE,
         "dateCreated" DATE NOT NULL ENABLE,
         "userType" VARCHAR2(20) NOT NULL ENABLE,
         CONSTRAINT "USER_PK" PRIMARY KEY ("userId") ENABLE,
         CONSTRAINT "uSER_FK1" FOREIGN KEY ("userType")
              REFERENCES "UserTypeLookUp" ("userType") ENABLE)
    CREATE SEQUENCE "User_SEQ" MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER NOCYCLE
    CREATE OR REPLACE TRIGGER "BI_User"
    before insert on "User"
    for each row
    begin
    select "User_SEQ".nextval into :NEW.userId from dual
    end;
    ALTER TRIGGER "BI_User" ENABLE;
    the error when i compile the trigger is;
    Line Position Text
    2 35 PLS-00049: bad bind variable 'NEW.USERID'
    4 1 PLS-00103: Encountered the symbol "/" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with
    When i try to do and insert on the table i get this error;
    ORA-04098: trigger 'CSR.BI_User' is invalid and failed re-validation
         Error     Unable to process row of table User.
    OK

    First close your SELECT with ";"

  • Compilation Error In 11g

    Hi,
    Windows 7 home basic.
    Oracle Fusion Middle Ware 11g Forms [32 Bit] Version 11.1.1.6.0 (Production).
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    I have problem with compiling webutil and others forms & library ?
    " Sql Statement Ignored "
    "the declarion of the type of the expression is in complete or malformat"
    Regards,

    Hi
    While facing compilation errors in forms pls check...
    1.Does any of ur forms supports Graphics which is no longer supported in Forms 11g.
    2.Does it any of ur forms supports Triggers, code e.g. using OLE2 without using Webutil..
    3.Even icons and passwords r Case Sensetive
    4.Forms during compilation may have in-consistancy between package Specification and Bodies...
    Pls before migrating read Oracle Forms 11g Migration Documentation to see the desupported Built in
    Regarding ur SQL Statment Error u might need to upgrade to ORACLE 10.2.0.3 to Solve such a problem
    Regards,
    Amatu Allah
    Edited by: Amatu Allah on May 10, 2012 7:48 AM

  • Trigger compile errors

    Need some direction. I have a user table defined that I would like to track any change in the Active column. when this occurs, I want a trigger to fire on after update to the BPF.Users table. The trigger will insert into the user_audit_log table. There is a sequence defined for that table as well. Here is the trigger:
    CREATE OR REPLACE TRIGGER user_update
    AFTER UPDATE OF active ON BPF.users
    FOR EACH ROW
    when (new.Name <> NULL)
    DECLARE
         currentuser CHAR(6);
         timenow DATE;
    BEGIN
    SELECT USER INTO currentuser from DUAL;
    timenow := SYSDATE;
    INSERT INTO BPF.user_audit_log
    VALUES (user_audit_seq.NEXTVAL, currentuser,:New.Name, timenow, 'Active Status Change');
    END;
    The user_audit_log table is define:
    CREATE TABLE BPF.user_audit_log
    (uaID NUMBER(38) PRIMARY KEY,
    uacuruser VARCHAR2(20),
    uachguser VARCHAR2(20),
    uadate DATE,
    uamsg VARCHAR2(1000)
    Now for the weird part, when I create the trigger, it has compile errors but does not say what they are. I can create the trigger without the insert statement and it compiles fine. I have no idea what is wrong with it. Can anyone give me some direction? Thanks so much!

    Thank you for your help. It has to do with the NVARCHAR2 definition. The character values have to be in this format, n'value', in order for it to insert. Now I just have to figure out how to do that. But here is the table definition.
    SQL> describe BPF.Users
    Name Null? Type
    USER_ID NOT NULL NUMBER(10)
    NAME NOT NULL NVARCHAR2(100)
    FULL_NAME NVARCHAR2(100)
    EMAIL NVARCHAR2(400)
    ACTIVE NOT NULL NUMBER(1)
    PREFERENCES NVARCHAR2(4000)
    DEFAULT_BU_ID NOT NULL NUMBER(10)
    WF_USER_ID NUMBER(10)
    DEFAULT_SECURITY_PROFILE_ID NOT NULL NUMBER(10)
    SYSTEM NOT NULL NUMBER(1)
    REPORTSTO_USER_ID NUMBER(10)
    DEFAULT_FA_ID NOT NULL NUMBER(10)
    USER_ATTR_1 NVARCHAR2(1000)
    USER_ATTR_2 NVARCHAR2(1000)
    USER_ATTR_3 NVARCHAR2(1000)
    USER_ATTR_4 NVARCHAR2(1000)
    USER_ATTR_5 NVARCHAR2(1000)
    USER_ATTR_6 NVARCHAR2(1000)
    USER_ATTR_7 NVARCHAR2(1000)
    USER_ATTR_8 NVARCHAR2(1000)
    USER_ATTR_9 NVARCHAR2(1000)
    USER_ATTR_10 NVARCHAR2(1000)
    ORIGINAL_EMAIL NVARCHAR2(200)
    DEFAULT_PASSWORD NVARCHAR2(40)

  • Capture sql_test ||Trigger compilation errors.

    Thanks Liu Fan.
    I use the sql statement you gave me,it works well on sqlplus, but while put into trigger and have warning message:
    Warning: Trigger created with compilation errors.
    following is code snippet:
    create or replace trigger test_trg
    after UPDATE or DELETE or INSERT on emp
    declare
    this_sql_text varchar2(800);
    CURSOR c1 is
    select b.sql_text from v$session a, v$sqltext_with_newlines b where a.sql_address = b.address
    and a.audsid = (select userenv('SESSIONID') from dual)
    and a.sql_hash_value =b.hash_value
    order by b.piece;
    rec c1%ROWTYPE;
    begin
    open c1;
    loop
    fetch c1 into rec;
    exit when c1%NOTFOUND;
    this_sql_text := this_sql_text &#0124; &#0124; rec.sql_text;
    end loop;
    close c1;
    insert into change_audit (changeDate, mysql_text) values (sysdate,this_sql_text);
    end;
    Does Anyone have a clue why this is happening? Any help will be greatly appreciated.
    null

    I create the same trigger as yours to test. But it failed in compiling because the v$session view cannot be resolved. Then try to wrap the sql statement in dynamic sql. Then compilation is successful and cannot resolve the view during execution.
    My suggestion is that if you can do a test in your system schema to see if the view can be resolved. Following the the test script:
    (You can call this proc in your trigger.)
    PROCEDURE TEST_TRACESQL AS
    PRAGMA AUTONOMOUS_TRANSACTION;
    TYPE TestType IS REF CURSOR;
    test_cv TestType;
    sql_stmt VARCHAR2(200);
    sql_text VARCHAR2(2000);
    tmp_text VARCHAR2(200);
    BEGIN
    sql_stmt := 'select b.sql_text ' &#0124; &#0124;
    'from sys_session a, sys_sqltext b ' &#0124; &#0124;
    'where a.sql_address = b.address ' &#0124; &#0124;
    'and a.audsid = (select userenv(''SESSIONID'') from dual) ' &#0124; &#0124;
    'and a.sql_hash_value = b.hash_value';
    DBMS_OUTPUT.PUT_LINE(SQL_STMT);
    OPEN test_cv FOR sql_stmt;
    LOOP
    FETCH test_cv INTO tmp_text;
    EXIT WHEN test_cv%NOTFOUND;
    sql_text := sql_text &#0124; &#0124; tmp_text;
    END LOOP;
    CLOSE test_cv;
    INSERT INTO test_sql (sqltext) values(sql_text);
    COMMIT;
    END;
    null

  • Trigger Compilation Errors after Full Import with Datapump

    Hello All,
    We did a full import with Oracle Datapump, and encountered some errors related to triggers:
    ORA-39082: Object type TRIGGER:"CONVERT3"."CUBCNVT_AUDIT_RESET" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CUBCNVT_AUDIT_RESET" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CUBCNVT_AUDIT" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CUBCNVT_AUDIT" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CURCNVT_AUDIT_RESET" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CURCNVT_AUDIT_RESET" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CURCNVT_AUDIT" created with compilation warnings
    ORA-39082: Object type TRIGGER:"CONVERT3"."CURCNVT_AUDIT" created with compilation warningsWe are wondering if there is some bug with the datapump on oracle 10.2.0.2. What caused such errors and how to resolve this trigger issue?
    Thanks!

    Hello,
    Show errors / at the end of the trigger and see if any of the dependent objects is missing resulting in error at compilation.
    Also you can try manually fixing the issue
    CREATE OR REPLACE TRIGGER table1_trg
       AFTER INSERT
       ON TABLE1    REFERENCING NEW AS new OLD AS old
       FOR EACH ROW
    DECLARE
       tmpvar   NUMBER;
    BEGIN
    Trigger code
    EXCEPTION
       WHEN OTHERS
       THEN
          -- Consider logging the error and then re-raise
          RAISE;
    END table1_trg;
    SHOW ERRORS;Regards

  • Db link in trigger causes compilation error

    Using Forms 10.1.2.0.2
    Post-Query trigger
    BEGIN
    SELECT item_desc
    INTO :block1.item_desc
    FROM items@database100
    WHERE item_code = :block1.item_code;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    item_code := 'No description for this item';
    END;
    Compilation error
    Error 201: Identifier 'items@database100' must be declared.
    The select statement works in Toad and Sqlplus, but giving me compilation errors in Forms 10g.
    So is this a bug? If yes, is there a patch?
    Can somebody please post a link to a metalink where this problem is discussed/solved?
    Thanks in advance.

    Well, yeah, that had been considered as a work-around.
    However, at this point, the decision is still to use the db link, and we are still trying to figure out how to make it work.
    Edited by: vanilla.villain on May 21, 2009 11:20 AM

  • Compilation error in  AFTER INSERT TRIGGER

    I am getting a compilation error with this code. How can I make this work?
    CREATE OR REPLACE TRIGGER LIMS.u_tu_background_priority
        AFTER INSERT
        ON BACKGROUND
         FOR EACH ROW
    BEGIN
        IF instr(:new.parameter,'S') = 1 THEN
            UPDATE lims.background
            SET priority = 3
              WHERE background_id = :new.background_id
        END IF ;       
    END ;
    /

    TABLE background
    Name                                      Null?    Type                       
    BACKGROUND_ID                             NOT NULL NUMBER(16)                 
    PRIORITY                                           NUMBER                     
    SESSION_ID                                         NUMBER(16)                 
    SCHEDULE_ID                                        NUMBER(16)                 
    WORKSTATION_ID                                     NUMBER(16)                 
    WORKSTATION_GROUP_ID                               NUMBER(16)                 
    PARAMETER                                          VARCHAR2(4000)             
    ACTIVE                                             CHAR(1)                    
    BACKGROUND_TASK_TYPE_ID                            NUMBER(16)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Pls906 compiler error for on_logon trigger

    Hello,
    I wrote a PL/SQL program for on_logon trigger. But it has compiler error(no message file, ora-06540 error and pls906 error). The program is as follow:
    DECLARE un VARCHAR2(80);
    pw VARCHAR2(80);
    cn VARCHAR2(80);
    BEGIN
    /* ** Bring up the logon screen */
    Logon_Screen;
    /*** Get the username, password and connect string. */
    un=Get_application_property(username);
    pw=Get_application_property(password);
    cn=get_application_property(connect_string);
    /*** Log the user onto the database */
    IF cn IS NOT NULL THEN
    LOGON(un,pw&#0124; &#0124;'@'&#0124; &#0124;cn);
    ELSE
    LOGON(un,pw);
    END IF;
    END;
    Any help is appreciated
    null

    I tried following
    ================================================================
    SQL> create or replace trigger after_logon_audit
    2 AFTER LOGON ON DATABASE
    3 WHEN (USER not in ('SYS','SYSTEM')
    4 BEGIN
    5 INSERT INTO LOGON_AUDIT
    6 (log_time,log_user,LOG_IPADDR,LOG_TERMINAL,LOG_MACHINE,LOG_SESSIONID,LOG_OSUSER)
    7 ( select SYSDATE, USER, SYS_CONTEXT('USERENV','IP_ADDRESS'), SYS_CONTEXT('USERENV','TERMINAL'),
    8 a.machine, SYS_CONTEXT('USERENV','SESSIONID'), a.OSUSER
    9 from V$SESSION a, dual
    10 where
    11 SYS_CONTEXT('USERENV','SESSIONID') = a.AUDSID
    12 and SYS_CONTEXT('USERENV','SESSION_USERID') = USER#);
    13 COMMIT;
    14 RAISE_APPLICATION_ERROR(-20002,'The DB is unavailable');
    15 END;
    16
    17 /
    ===============================================================
    but got the following error message.
    ========================
    AFTER LOGON ON DATABASE
    ERROR at line 2:
    ORA-04072: invalid trigger type
    ========================
    Problem still persists. :(

  • Compilation error while generating the form in linux

    Hello everyone,
    I am using Oracle Designer ver10.1.2.4 in windows to generate the forms with standard object library ofgwebol.olb and template form ofgwebt.fmb. form (with both .fmb and .fmx files) are generated without errors. Also when I open the forms in separately they compiles without errors. But when I copy the same .fmb file into linux enviroment and compile it using frmcmp.sh userid=user/password@database module_type=form compile_all=yes module=form_name it gives following errors.
    $> frmcmp.sh userid=odin/odin@ontw10g module_ty
    pe=form compile_all=yes module=LOGIN_SCHERM
    Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)
    Forms 10.1 (Form Compiler): Release - Production
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE 10.1.0.4.0 Production
    FRM-18108: Failed to load the following objects.
    Source Module:ofgwebol.olb
    Source Object: CGSO$CHAR_DO
    Source Module:ofgwebol.olb
    Source Object: CGSO$CHAR_DO
    Source Module:ofgwebol.olb
    Source Object: CGSO$BLOCK
    Source Module:ofgwebol.olb
    Source Object: CGSO$CANVAS
    Source Module:ofgwebol.olb
    Source Object: CGSO$WINDOW
    Compiling function CGTE$CHECK_CONSTRAINT_VIO...
    No compilation errors.
    Compiling procedure CGTE$INLOGGEN_ERRORS...
    No compilation errors.
    L/SQL ERROR 0 at line 17, column 3
    Statement ignored
    PL/SQL ERROR 201 at line 36, column 3
    identifier 'CGNV$.NAV_CLOSE_FORMS' must be declared
    PL/SQL ERROR 0 at line 36, column 3
    Statement ignored
    PL/SQL ERROR 201 at line 37, column 3
    identifier 'CGNV$.NAV_OPENING_WND' must be declared
    PL/SQL ERROR 0 at line 37, column 3
    Statement ignored
    Compiling KEY-HELP trigger on form...
    No compilation errors.
    Compiling WHEN-WINDOW-ACTIVATED trigger on form...
    Compilation error on WHEN-WINDOW-ACTIVATED trigger on form:
    PL/SQL ERROR 201 at line 6, column 8
    identifier 'CGNV$GET_ITEM_WINDOW' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    Statement ignored
    Compiling POST-TEXT-ITEM trigger on form...
    Compilation error on POST-TEXT-ITEM trigger on form:
    PL/SQL ERROR 201 at line 4, column 3
    identifier 'CGNV$.STORE_WND_ITEM' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    Statement ignored
    Compiling WHEN-WINDOW-CLOSED trigger on form...
    Compilation error on WHEN-WINDOW-CLOSED trigger on form:
    PL/SQL ERROR 201 at line 5, column 3
    identifier 'CGNV$.TERMINATE_WINDOW' must be declared
    PL/SQL ERROR 0 at line 5, column 3
    Statement ignored
    Compiling WHEN-FORM-NAVIGATE trigger on form...
    Compilation error on WHEN-FORM-NAVIGATE trigger on form:
    PL/SQL ERROR 201 at line 3, column 3
    identifier 'CGNV$.REMOVE_CHILD_FORM' must be declared
    PL/SQL ERROR 0 at line 3, column 3
    Statement ignored
    Compiling KEY-EXIT trigger on form...
    Compilation error on KEY-EXIT trigger on form:
    PL/SQL ERROR 201 at line 5, column 3
    identifier 'CGNV$.NAV_ENTER_QUERY' must be declared
    PL/SQL ERROR 0 at line 5, column 3
    Statement ignored
    PL/SQL ERROR 201 at line 9, column 5
    identifier 'CGNV$.CLOSE_ALL_WINDOWS' must be declared
    PL/SQL ERROR 0 at line 9, column 5
    Statement ignored
    Compiling KEY-CLRFRM trigger on form...
    No compilation errors.
    Compiling ON-ERROR trigger on INLOGGEN data block...
    No compilation errors.
    Compiling KEY-PREV-ITEM trigger on AGB_ID item in INLOGGEN data block...
    Compilation error on KEY-PREV-ITEM trigger on AGB_ID item in INLOGGEN data block
    PL/SQL ERROR 201 at line 4, column 3
    identifier 'CGNV$GO_PREV_ITEM' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    Statement ignored
    Compiling KEY-NEXT-ITEM trigger on AGB_NAAM item in INLOGGEN data block...
    Compilation error on KEY-NEXT-ITEM trigger on AGB_NAAM item in INLOGGEN data blo
    ck:
    PL/SQL ERROR 201 at line 4, column 3
    identifier 'CGNV$GO_NEXT_ITEM' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    Statement ignored
    Compilation errors have occurred.
    Form not created
    I think some standard library are missing in Linux environment. But I do not know the name of them and neither I can find. Please suggest the what need to be done to resolve the problem. The reason I am compiling the form in Linux is that I can run the form in windows because of corrupted installation of OC4j.
    Thanking you all much in advance.
    Edited by: Deepank on Dec 2, 2008 1:49 AM

    Deepank-
    When generating forms from Designer, Designer attaches libraries - like ofgmes.pll, ofgnavl.pll, etc. You will need to copy these libraries to the same directory where your forms reside on your Linux box. To find out what libraries ate attached to your form, open it on your windows PC after generating it from Designer and you will see the attached libraries. Also, watch out for the case-sensitivity of Linux. If you have the Designer libraries on your linux box and you still get errors, try changing the case of the names of the libraries.
    Hope this helps,
    Dan

  • Webutil form compilation error

    Hi all
    I configured webutil on Application server 10g on linux. but when i compile the demo form on application server using
    /u01/app/oracle/OraHome_2/bin/frmcmp.sh module=$ORACLE_HOME/forms/WU_TEST_106.fmb userid=webutil/webutil@orant module_type=form compile_all=yes OUTPUT_FILE=$ORACLE_HOME/forms/WU_TEST_106.fmx
    it give me the errors
    FRM-18108: Failed to load the following objects.
    Source Module:webutil.olb
    Source Object: WEBUTIL
    Compiling procedure GET_CLIENTINFO...
    Compilation error on procedure GET_CLIENTINFO:
    PL/SQL ERROR 201 at line 3, column 35
    identifier 'WEBUTIL_CLIENTINFO.GET_USER_NAME' must be declared
    PL/SQL ERROR 0 at line 3, column 3
    Statement ignored
    PL/SQL ERROR 201 at line 4, column 35
    identifier 'WEBUTIL_CLIENTINFO.GET_IP_ADDRESS' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    Statement ignored
    Compilation errors have occurred.
    Form not created
    ==========================================
    i search a lot but failed ..
    any solution regarding this plz thanks in advance.

    [oracle@appserver ~]$ /u01/app/oracle/OraHome_2/bin/frmcmp_batch.sh module=$ORACLE_HOME/forms/webutil.pll userid=webutil/webutil@orant module_type=library compile_all=yes OUTPUT_FILE=$ORACLE_HOME/forms/webutil.plx
    Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)
    Forms 10.1 (Form Compiler): Release - Production
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE 10.1.0.4.0 Production
    Compiling library WEBUTIL...
    Invalidating Package Spec CLIENT_IMAGE......
    Invalidating Package Spec CLIENT_OLE2......
    Invalidating Package Spec CLIENT_TEXT_IO......
    Invalidating Package Spec CLIENT_TOOL_ENV......
    Invalidating Package Spec CLIENT_WIN_API_DEBUG......
    Invalidating Package Spec CLIENT_WIN_API......
    Invalidating Package Spec CLIENT_WIN_API_ENVIRONMENT......
    Invalidating Package Spec CLIENT_WIN_API_PRELOAD......
    Invalidating Package Spec JAVA_EXCEPTION......
    Invalidating Package Spec WEBUTIL_BROWSER......
    Invalidating Package Spec WEBUTIL_CLIENTINFO......
    Invalidating Package Spec WEBUTIL_C_API......
    Invalidating Package Spec JAVA_SYSTEM......
    Invalidating Package Spec JAVA_APPSERV_READER......
    Invalidating Package Spec DELIMSTR......
    Invalidating Package Spec WEBUTIL_FILE......
    Invalidating Package Spec JAVA_APPSERV_WRITER......
    Invalidating Package Spec WEBUTIL_DB_LOCAL......
    Invalidating Package Spec JAVA_FILE......
    Invalidating Package Spec WEBUTIL_FILE_TRANSFER......
    Invalidating Package Spec WEBUTIL_HOST......
    Invalidating Package Spec WEBUTIL_SEPARATEFRAME......
    Invalidating Package Spec WEBUTIL_CORE......
    Invalidating Package Spec WEBUTIL_SESSION......
    Invalidating Package Spec WEBUTIL_UTIL......
    Invalidating Package Body WEBUTIL_UTIL......
    Invalidating Package Body WEBUTIL_SESSION......
    Invalidating Package Body WEBUTIL_SEPARATEFRAME......
    Invalidating Package Body WEBUTIL_HOST......
    Invalidating Package Body WEBUTIL_FILE_TRANSFER......
    Invalidating Package Body WEBUTIL_FILE......
    Invalidating Package Body WEBUTIL_DB_LOCAL......
    Invalidating Package Body WEBUTIL_C_API......
    Invalidating Package Body WEBUTIL_CORE......
    Invalidating Package Body WEBUTIL_CLIENTINFO......
    Invalidating Package Body WEBUTIL_BROWSER......
    Invalidating Procedure Body SHOW_WEBUTIL_INFORMATION......
    Invalidating Package Body JAVA_SYSTEM......
    Invalidating Package Body JAVA_FILE......
    Invalidating Package Body JAVA_EXCEPTION......
    Invalidating Package Body JAVA_APPSERV_WRITER......
    Invalidating Package Body JAVA_APPSERV_READER......
    Invalidating Package Body DELIMSTR......
    Invalidating Package Body CLIENT_WIN_API_PRELOAD......
    Invalidating Package Body CLIENT_WIN_API_ENVIRONMENT......
    Invalidating Package Body CLIENT_WIN_API_DEBUG......
    Invalidating Package Body CLIENT_WIN_API......
    Invalidating Package Body CLIENT_TOOL_ENV......
    Invalidating Package Body CLIENT_TEXT_IO......
    Invalidating Package Body CLIENT_OLE2......
    Invalidating Package Body CLIENT_IMAGE......
    Invalidating Procedure Body CLIENT_HOST......
    Invalidating Function Body CLIENT_GET_FILE_NAME......
    Compiling Package Spec CLIENT_IMAGE......
    Compiling Package Spec CLIENT_OLE2......
    Compiling Package Spec CLIENT_TEXT_IO......
    Compiling Package Spec CLIENT_TOOL_ENV......
    Compiling Package Spec CLIENT_WIN_API_DEBUG......
    Compiling Package Spec CLIENT_WIN_API......
    Compiling Package Spec CLIENT_WIN_API_ENVIRONMENT......
    Compiling Package Spec CLIENT_WIN_API_PRELOAD......
    Compiling Package Spec JAVA_EXCEPTION......
    Compiling Package Spec WEBUTIL_BROWSER......
    Compiling Package Spec WEBUTIL_CLIENTINFO......
    Compiling Package Spec JAVA_SYSTEM......
    Compiling Package Spec JAVA_APPSERV_READER......
    Compiling Package Spec DELIMSTR......
    Compiling Package Spec WEBUTIL_FILE......
    Compiling Package Spec JAVA_APPSERV_WRITER......
    Compiling Package Spec WEBUTIL_DB_LOCAL......
    Compiling Package Spec JAVA_FILE......
    Compiling Package Spec WEBUTIL_FILE_TRANSFER......
    Compiling Package Spec WEBUTIL_HOST......
    Compiling Package Spec WEBUTIL_SEPARATEFRAME......
    Compiling Package Spec WEBUTIL_CORE......
    Compiling Package Spec WEBUTIL_SESSION......
    Compiling Package Spec WEBUTIL_UTIL......
    Compiling Package Body WEBUTIL_UTIL......
    Compiling Package Body WEBUTIL_SESSION......
    Compiling Package Body WEBUTIL_SEPARATEFRAME......
    Compiling Package Body WEBUTIL_HOST......
    Compiling Package Body WEBUTIL_FILE_TRANSFER......
    Compiling Package Body WEBUTIL_FILE......
    Compiling Package Body WEBUTIL_DB_LOCAL......
    Compiling Package Body WEBUTIL_C_API......
    Compiling Package Body WEBUTIL_CORE......
    Compiling Package Body WEBUTIL_CLIENTINFO......
    Compiling Package Body WEBUTIL_BROWSER......
    Compiling Procedure Body SHOW_WEBUTIL_INFORMATION......
    Compiling Package Body JAVA_SYSTEM......
    Compiling Package Body JAVA_FILE......
    Compiling Package Body JAVA_EXCEPTION......
    Compiling Package Body JAVA_APPSERV_WRITER......
    Compiling Package Body JAVA_APPSERV_READER......
    Compiling Package Body DELIMSTR......
    Compiling Package Body CLIENT_WIN_API_PRELOAD......
    Compiling Package Body CLIENT_WIN_API_ENVIRONMENT......
    Compiling Package Body CLIENT_WIN_API_DEBUG......
    Compiling Package Body CLIENT_WIN_API......
    Compiling Package Body CLIENT_TOOL_ENV......
    Compiling Package Body CLIENT_TEXT_IO......
    Compiling Package Body CLIENT_OLE2......
    Compiling Package Body CLIENT_IMAGE......
    Compiling Procedure Body CLIENT_HOST......
    Compiling Function Body CLIENT_GET_FILE_NAME......
    Done.
    [oracle@appserver ~]$
    here is the code how i compile webutil.. its done sucessfully.

  • "success with compilation error" ?

    Hopefully someone can shed light on this. Here is the sample code...
    SQL> create or replace procedure pr_TEST
    2 as
    3 begin
    4 execute immediate 'create or replace trigger tr_test after insert or update or delete on test
    for each row declare v_row test%rowtype; v_col1 varchar(32); v_col2 varchar(32); v_work varchar(32)
    ; begin insert into test values (v_col1, v_col2) ;end; /';
    5
    6 end;
    7 /
    Procedure created.
    SQL> exec pr_test;
    ERROR:
    ORA-24344: success with compilation error
    ORA-06512: at "ROOT.PR_TEST", line 4
    ORA-06512: at line 1
    Have you ever heard of an ORA-24344 ? Any suggestions on what to correct ?
    thx in advance,
    RP.

    You don't want the slash at the end of the string:
    sql>create or replace procedure pr_test
      2  as
      3  begin
      4   execute immediate 'create or replace trigger tr_test after insert or update or delete on test
      5  for each row declare v_row test%rowtype; v_col1 varchar(32); v_col2 varchar(32); v_work varchar
    (32);
      6   begin insert into test values (v_col1, v_col2) ;end;';  -- no slash here at end
      7  end;
      8  /
    Procedure created.

  • Oracle JDBC Driver Compile Errors

    I'd like to try out this new Preview Edition but I get the following errors:
    Error(22,8): class oracle.jdbc.driver.OracleCallableStatement is not public; cannot be accessed from outside of package oracle.jdbc.driver
    Error(23,8): class oracle.jdbc.driver.OracleTypes is not public; cannot be accessed from outside of package oracle.jdbc.driver
    These erors occur at the import statements:
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    when I attempt to compile a JDev 10.1.3 project in the 11g Technology Preview Edition. Any idea why?
    TIA,
    Jeff

    We don't support project migration from 10.1.3 to the
    technology preview.
    Does the problem reproduce if you create a new
    project in 11tp?Shay,
    Thanks for the quick response. I created a new application in 11tp from scratch. I created a View Object and pasted the offending code into it and got the same compile errors. I actually got the code about a year ago from Steve's Not Yet Documented Applications. He has since removed the App from the page, changed the code and added it to the Dev Guide. The sample app showed how to bind a View object to a REF Cursor returned from a stored procedure and it looked something like this:
    CallableStatement cs = conn.prepareCall("{?=call package.name(P_CODIGO => ?)}");
    cs.rgisterOutParameter(1,OracleTypes.CURSOR);
    cs.setInt(2,16782);
    cs.executeQuery();
    ResultSet result = ((OracleCallableStatement)cs).getCursor(1);
    Changing the code to look more like what is now in the DEV GUIDE will more than likely work because he eliminates the need for the OracleCallableStatement.
    This brings me to my next point. If migration is not currently supported, will it be when the production release of JDEV 11g is available? Shame on me for just quickly skimming the release notes but when the import wizard ran on my project it did not warn me that the feature is not supported or that problems are likely. Upon resolving the issues with the callable statement, I had significant other compile errors in my jspx pages that will probably not be as trivial to fix. If project upgrades are not performed "easily" it will certainly push the 11g adoption date out considerably.
    Thanks again, your comments are always encouraged.
    Jeff

  • ORA-24344: Success with compilation error.

    Hi, i got the following error notification mail when the DB job [runs only once in a day at 1 AM] tries to execute the following procedure.
    The mail reads like this ----
    "Condition Raised in: toll_partitions.recompile_invalid_objects
    Short Desc: ORA-24344
    Long Desc: ORA-24344: Success with compilation error.
    Cause: Trigger creation did not successfully complete.
    Solution: Check trigger status for all triggers created in this schema and find out which error caused the failure by querying the user_errors table for the named trigger and Trigger type.
    --- end of mail ----
    === This is the procedure =====
    PROCEDURE recompile_invalid_objects IS
    -- Declare variables
    v_ins_str VARCHAR2(2000);
    cursor_handle NUMBER;
    execute_feedback NUMBER;
    v_unix_str VARCHAR2(200);
         v_object_cnt NUMBER := 0;
         -- Declare cursor objects
         CURSOR curs_obj IS
    SELECT decode( OBJECT_TYPE, 'PACKAGE BODY',
    'ALTER PACKAGE ' || OWNER||'.'||OBJECT_NAME || ' COMPILE BODY',
    'ALTER ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' COMPILE' )
                   "COMP_OBJECT"
    FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
              AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
    BEGIN
         -- Set Package/Procedure Name for email notification.
         vFacility := cProcName || '.recompile_invalid_objects';
    -- Select invalid object count
    BEGIN
         SELECT count(*)
              INTO v_object_cnt
              FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
                   AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
              -- Recompile invalid objects
              IF v_object_cnt > 0 THEN
              FOR i in curs_obj
                   LOOP
                   v_ins_str := i.COMP_OBJECT;
                        cursor_handle := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(cursor_handle,
         v_ins_str,
                   DBMS_SQL.V7);
    execute_feedback := DBMS_SQL.EXECUTE(cursor_handle);          
    DBMS_SQL.CLOSE_CURSOR(cursor_handle);
    COMMIT;
                   END LOOP;
              END IF;
    END;
    EXCEPTION
         WHEN OTHERS THEN
         -- Log error condition and generate email notification if needed.
    toll_handle.error_condition(vFacility, toll_handle.get_ora_desc(sqlerrm),vErrorID);
         END recompile_invalid_objects;
    ==== end of procedure ====
    I got '0' count when I ran the invalid object count to see the invalid objects. I ran the following code ..and it gave me 0 value.
    SELECT count(*)
              FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
                   AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
    --- end of query ---
    The count 0 means, there are no invalid objects. But it throws daily the same error notification mail at 1 AM[the time job runs]. I compiled the procedure and it reports no errors. I checked the status of the triggers and all are valid and enabled. Please suggest me. Any help in this regard will be of great help to me. Thanks in advance...

    Just some hints. I'm not sure if they help solving your problem.
    1) Don't COMMIT inside a cursor.
    2) Instead of DBMS_SQL you could use DBMS_DDL.ALTER_COMPILE, also see here: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_ddl2.htm#1000604
    3) Check if there are other jobs running during the recompile. Maybe you run into some conflicts.
    4) Output the statement that creates the error. It looks like you could try to put this into your exception handler: toll_handle.error_condition(vFacility, v_ins_str,vErrorID);

  • Trigger compile with after migrated from 8i to 10g

    Hi All,
    We try to migrate a 8i database to 10g by using the exp and imp. All tables and data are already migrated by imp. During the imp, there are errors said the trigger compile with errors.
    When login to the em to check, I found these 2 errors.
    Line # = 2 Column # = 1 Error Text = PL/SQL: SQL Statement ignored
    Line # = 2 Column # = 60 Error Text = PL/SQL: ORA-00942: table or view does not exist
    My trigger is a very simple one:
    BEGIN
    Select TB_COUNTER_SEQ.NEXTVAL INTO :NEW.INCREMENT_NUM FROM DUAL;
    END;
    And I'm sure the "TB_COUNER_SEQ" is there.
    Do I need to change anything on the trigger when migrating from 8i?
    In fact, besides this trigger, all other trigger imp to this schema are having the same error. The schema in the 10g is a newly created one, is there any special right I need to create grant to this new user?
    Thanks a lot.
    Mike

    Hi, Mike,
    user3211655 wrote:
    Hi All,
    We try to migrate a 8i database to 10g by using the exp and imp. All tables and data are already migrated by imp. During the imp, there are errors said the trigger compile with errors.
    When login to the em to check, I found these 2 errors.
    Line # = 2 Column # = 1 Error Text = PL/SQL: SQL Statement ignored
    Line # = 2 Column # = 60 Error Text = PL/SQL: ORA-00942: table or view does not exist
    My trigger is a very simple one:
    BEGIN
    Select TB_COUNTER_SEQ.NEXTVAL INTO :NEW.INCREMENT_NUM FROM DUAL;
    END;
    And I'm sure the "TB_COUNER_SEQ" is there.
    Do I need to change anything on the trigger when migrating from 8i?
    In fact, besides this trigger, all other trigger imp to this schema are having the same error. The schema in the 10g is a newly created one, is there any special right I need to create grant to this new user?Grant the necessary privileges on the tables (and any other objects used, like sequences) directly to the owner of the triggers. Privileges granted to a role don't count in AUTHID OWNER stored procedures; the privileges have to be granted to the owner of the stored procedure (or to PUBLIC).
    It the error is occurring at position 60, then it looks like you don't have privileges on dual. Login as SYS and
    GRANT SELECT ON dual TO PUBLIC;You may need synonyms (perhaps public synonyms) for the objects, too.

Maybe you are looking for

  • Adobe Bridge in Photoshop - How to install Bridge and camera raw? And what is it all about?

    Hi everyone! I am actually in love with this adobe photoshop. I used PSCS2 before, but later on upgraded to CS4. But I feel tired in upgrading to CS5. One time, I found a tutorial in youtube about camera raw, and would really want to use it. But I wa

  • Please Help!   I've got a WRT54GX2 that I used for 2 year...

    Please Help! I've got a WRT54GX2 that I used for 2 years with no problems. I recently tried to set up network with different IP DSL (Bellsouth). The problem is the computer can not "locate" wireless router. Is this due to the Westell modem not being

  • ME6H :  point score for vendor evaluation

    Dear guru , In vendor evaluation analysis for on-time delivery performance I can see fields point score 1 and point score 2. Can  you explain me which is the difference between these two fields ? Thanks in advance.

  • Clarification for MetaXAP::parse required

    Does MetaXAP::parse handle UTF-16 encoded xml? I've knocked up a sample UTF-16 packet and libxmptk is throwing XAP_ERR_BAD_XML. I've traced this error through which is occurring deep within xmlparse.c. At this stage it's likely that my UTF-16 sample

  • Issue with hearing a track

    I am a brand new user of Audition 1.0 and still in the baby steps of learning and understanding the program.  So far, I have managed to do pretty well figuring everything out.  But yesterday I spent all day recording a new piece and after everything