Error in trigger (simple)

hi ,
I 've written the following trigger but unable to trace why the following errors ..
All the columns are written properly as per the table ...
CREATE OR REPLACE TRIGGER TRI1
AFTER INSERT OR UPDATE OR DELETE
OF INL_ID,MRR_CD, REQ, MM, ML_STS, FLL_TMST, LLL_TMST, CAT, LOAT
ON F_FL_T
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
INSERT INTO MBF_D(
            C_ID,
            DMBF,
            ROGF , 
            RMBF,
            RSF,
            MSEQ,
            MNM,
            MCD,
            MNM,
            TCLL,
            TCLL,
            T_DAT,
            TDAT,
            OUAT,
            AD,
            MP)
     VALUES(1,1,1,1,1,1,'A','W','W',SYSDATE,
      SYSDATE,SYSDATE,SYSDATE,'N',0','I');
END; errror::
2/2 PL/SQL: SQL Statement ignored
5/26 PL/SQL: ORA-00911: invalid character
21/4 PLS-00103: Encountered the symbol "end-of-file" when expecting
one of the following:
thanks,
josh

How did you able to create that table which has duplicate column name?
Check your code ->
INSERT INTO MBF_D(
C_ID,
DMBF,
ROGF ,
RMBF,
RSF,
MSEQ,
MNM,
MCD,
MNM,
TCLL,
TCLL,
T_DAT,
TDAT,
OUAT,
AD,
MP)
VALUES(1,1,1,1,1,1,'A','W','W',SYSDATE,
SYSDATE,SYSDATE,SYSDATE,'N',0,'I');
See the bold part in your script. Did you create using any double quotes?
See one test ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.02
satyaki>
satyaki>create table test_sss
  2      (
  3        eno  number(5),
  4        eno  number(5)
  5      );
      eno  number(5)
ERROR at line 4:
ORA-00957: duplicate column name
Elapsed: 00:00:00.00
satyaki>
satyaki>create table test_sss
  2      (
  3        eno  number(5),
  4        "eno" number(5)
  5      );
Table created.
Elapsed: 00:00:01.01
satyaki>
satyaki>Can you explain?
Regards.
Satyaki De.

Similar Messages

  • Overwriting framework error messages of simple types

    Hi
    Is it possible to overwrite the framework error messages of simple types? For example: Instead of "Enter the value in the format -2,733.34" we prefer something like "Enter the percent value in the format 0.00 to 100." or "Enter a correct percent value.".
    Use case: We use for the most input fields for any numbers (telefon, amount, age, ...) the simple type "decimal", this offers following advantages:
    - optional use (and framework validation) of fraction digits
    - the input field has no default value (integer/long/short writes as default "0" to the input field, that is in most cases - for example post/zip code - not useful)
    Otherwise decimal simple types has the disadvantage, that if the user write any letters in the (decimal) input field, the error message is as described above and so not very helpful too.
    Thanks in advance
    Stefan

    Hi Stefan
    Unfortunately seems no way to customize the error messages.
    1. If the standard numeric simple type does not suit your needs, theoretically you can try to override the Java class of the standard type and add your custom messages/logic. For example, for Integer this is DdTypeInteger & DdTypeInt. Methods you need to override is format(...) and parse(...). After this in controller's code you should create a new attribute and provide your own custom type as input parameter.
    I never tried this way
    2. You can make the attribute as Calculated. Then in getter/setter you should put your custom formatting/parsing logic.
    BR, Siarhei

  • COMMIT statement generates error in trigger

    My COMMIT statement generates error from my 'when-button-pressed' trigger.
    First I issue a very simple Insert statement, then a commit, but I get:
    FRM-41009. Function key not allowed. Press Ctrl+F1 for list of valid keys.
    Do you think I have a trigger somewhere else that could be affecting this commit ?
    Bob

    I FIGURED IT OUT, FOLKS.
    I was in query mode before issuing the commit. I simply chose a record and it worked.
    Thanks anyway,
    bob

  • HSDIO conditionally fetch hardware compare sample errors (script trigger to flag whether or not to wait for software trigger)

    I am moderately new to Labview and definitely new to the HSDIO platform, so my apologies if this is either impossible or silly!
    I am working on a system that consists of multiple PXI-6548 modules that are synchronized using T-CLK and I am using hardware compare.  The issue I have is that I need to be able to capture ALL the failing sample error locations from the hardware compare fetch VI... By ALL I mean potentially many, many more fails than the 4094 sample error depth present on the modules.
    My strategy has been to break up a large waveform into several subsets that are no larger than 4094 samples (to guarantee that I can't overflow the error FIFO) and then fetch the errors for each block.  After the fetch is complete I send a software reference trigger that is subsequently exported to a scriptTrigger that tells the hardware it is OK to proceed (I do this because my fetch routine is in a while loop and Labview says that the "repeated capbility has not yet been defined" if I try to use a software script trigger in a loop).
    This works fine, but it is also conceivable that I could have 0 errors in 4094 samples.  In such a case what I would like to do is to skip the fetching of the hardware compare errors (since there aren't any) and immediately begin the generation of the next block of the waveform.  That is, skip the time where I have to wait for a software trigger.
    I tried to do this by exporting the sample error event to a PFI and looping that PFI back in to generate a script trigger.  What I thought would happen was that the script trigger would get asserted (and stay asserted) if there was ever a sample error in a block, then I could clear the script trigger in my script.  However, in debug I ended up exporting this script trigger back out again and saw that it was only lasting for a few hundred nanoseconds (in a case where there was only 1 injected sample error)... The sample error event shows up as a 1-sample wide pulse.
    So, my question is this:  is there a way to set a flag to indicate that at least one sample error occurred in a given block  that will persist until I clear it in my script?  What I want to do is below...
    generate wfmA subset (0, 4094)
    if scriptTrigger1
      clear scriptTrigger1
      wait until scriptTrigger0
    end 
    clear scriptTrigger0
    generate wfmA subset (4094, 4094)
    I want scriptTrigger1 to be asserted only if there was a sample error in any block of 4094 and it needs to stay asserted until it is cleared in the script.  scriptTrigger0 is the software trigger that will be sent only if a fetch is performed.  Again, the goal being that if there were no sample errors in a block, the waiting for scriptTrigger0 will not occur.
    I am probably going about it all wrong (obviously since it doesn't work), so any help would be much appreciated!

    Please disregard most of my previous post... after some more debug work today I have been able to achieve the desired effect at slower frequencies.  I did straighten out my script too:
    generate wfmA
    if scriptTrigger1
      clear scriptTrigger0
      wait until scriptTrigger0
    end if
    generate wfmA
    scriptTrigger1 = sample error event flag
    scriptTrigger0 = software trigger (finished fetching error backlog in SW)
    However, I am still having a related issue.
    I am exporting the Sample Error Event to a PFI line, looping that back in on another PFI line, and having the incoming version of the Sample Error Event generate a script trigger.  My stimulus has a single injected sample error for debug. For additional debug I am exporting the script trigger to yet another PFI; I have the sample error event PFI and the script trigger PFI hooked up to a scope.
    If I run the sample clock rate less than ~133MHz everything works... I can see the sample error event pulse high for one clock period and the script trigger stays around until it is consumed by my script's if statement.
    Once I go faster than that I am seeing that the script trigger catches the sample error event occasionally.  The faster I go, the less often it is caught.  If I widen out the error to be 2 samples wide then it will work every time even at 200MHz.
    I have tried PFI0-3 and the PXI lines as the output terminal for the sample error event and they all have the same result (this implies the load from the scope isn't the cause).
    I don't know what else to try?  I can't over sample my waveform because I need to run a true 200MHz. I don't see anything that would give me any other control over the sample error event in terms of its pulsewidth or how to export it directly to a script trigger instead of how I'm doing it.
    Any other ideas?

  • How can i creat a trigger    error  invalid trigger specification

    i have a stored procedure which i want it to be triggered when an insertion is done on table A
    and that stored procedure accepts values from the insertion performed in table A
    and inserts into Table B by either updating the table or insertion into Table B
    how can i achieve this
    OK fine i have a table called Table A
    i want a trigger that can accept values such as
    create or replace trigger UpdateMyDoc  after insert on  Table A
    for each row
    accoutntno varchar2,
    ID varchar2
    As
    cnt number;
    Begin
    update Table B value (accoutntno ,ID ); commit;
    end ;
    is the above possible if it is then i get this  [1]: (Error): ORA-04079: invalid trigger specification
    any help
    Edited by: kama021 on Aug 13, 2009 2:24 AM

    Stop right there, Kama.
    update Table B value (accoutntno ,ID ); commit;Do not go any further on triggers, until you at least know how to write an UPDATE
    Or is it INSERT
    Once you have that in place, carry on by reading a bit about Transactions
    Regards
    Peter

  • Error in trigger

    Hi,
    I am stuck with the error PLS-00103.
    Actually what I want to do is, I have a table user_info which holds the details about the users like passwords.
    Each time a user updates a password in the table, the new password should go into the varrying array old_passwords, which is an attribute in the table. If the number of passwords are equal to the size(i.e 10) of the array then,
    the new password which is being updated should be checked whether it is already there in the last 10 passwords,
    if it is there then I have to raise an exception, otherwise I have to trim the last password from the array and add the new password to the first position of the array.
    And for inserting the passwords I have a procedure called add_password which takes a varying object and the new password as parameters. I have written the code in order to avoid the mutating table error.
    I am showing all that I have done, I wil be very thankful, if anyone can suggest me a way to solve the problem.
    -- Table user_info
    create table User_Info(Name varchar2(20),
    Passwd varchar2(10),
    E_Mail varchar2(30) constraint email_pk primary key deferrable initially immediate,
    Rank varchar2(20),
    Country varchar2(30) constraint user_fk references country, Passwd_Change_Date date,
    Last_Login date,
    Old_Passwords Old_Passwds_Ty,
    constraint uname_uq unique(name));
    -- package to avoid mutating table error
    create or replace package new_pas as
    type pwd_ty is table of user_info%rowtype index by binary_integer;
    upwd_table pwd_ty;
    end new_pas;
    --after row level trigger to store new values
    create or replace trigger b_trig
    after update of passwd on user_info
    for each row
    begin new_pas.upwd_table(new_pas.upwd_table.count+1).passwd:=:new.passwd; new_pas.upwd_table(new_pas.upwd_table.count+1).name:=:old.name;
    end b_trig;
    -- after statement level trigger
    create or replace trigger trig_pass after update of passwd on user_info
    begin
    declare old_pass old_passwds_ty;
    begin select old_passwords into old_pass from user_info where name=new_pas.upwd_table(new_pas.upwd_table.count+1).name;
    if old_pass is null or old_pass.count<old_pass.limit then
    add_password(old_passwds_ty('some'),new_pas.upwd_table(new_pas.upwd_table.count+1).passwd);
    elsif old_pass.count=old_pass.limit then
    for i in 1 .. old_pass.count loop
    if old_pass(i)=new_pas.upwd_table(new_pas.upwd_table.count+1).passwd then raise exceptions_package.Invalid_password;
    end if;
    end loop;
    add_password(old_passwds_ty('some'),new_pas.upwd_table(new_pas.upwd_table.count+1).passwd);
    new_pas.upwd_table.delete;
    end if;
    end trig_pass;
    -- The error while compiling this trigger is:
    37/0 PLS-00103: Encountered the symbol "end-of-file" when expecting one of the follow ing: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with ><an identifier> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
    -- The body of add_password is:
    create or replace procedure Add_password(user_pwd old_passwds_ty,pwd user_info.passwd%type) is
    new_pass old_passwds_ty;
    u_pwd old_passwds_ty;
    begin
    u_pwd:=user_pwd;
    for rec in (select old_passwords from user_info) loop
    u_pwd:=rec.old_passwords;
    if u_pwd is null then
    new_pass:=old_passwds_ty(pwd);
    elsif u_pwd.count=u_pwd.limit then
    new_pass:=old_passwds_ty(pwd);
    u_pwd.trim;
    for i in 1 .. u_pwd.count loop
    new_pass(i+1):=u_pwd(i);
    end loop;
    exit;
    end if;
    end loop;
    update user_info set old_passwords=new_pass; end add_password;
    Thanks for reading, I will be very thankful, If I can get a solution

    -- after statement level trigger
    create or replace trigger trig_pass after update of passwd on user_info
    begin
    declare old_pass old_passwds_ty;
    begin select old_passwords into old_pass from user_info where name=new_pas.upwd_table(new_pas.upwd_table.count+1).name;
    if old_pass is null or old_pass.count<old_pass.limit then
    add_password(old_passwds_ty('some'),new_pas.upwd_table(new_pas.upwd_table.count+1).passwd);
    elsif old_pass.count=old_pass.limit then
    for i in 1 .. old_pass.count loop
    if old_pass(i)=new_pas.upwd_table(new_pas.upwd_table.count+1).passwd then raise exceptions_package.Invalid_password;
    end if;
    end loop;
    add_password(old_passwds_ty('some'),new_pas.upwd_table(new_pas.upwd_table.count+1).passwd);
    new_pas.upwd_table.delete;
    end if;
    end;
    end trig_pass;
    Need one more end;
    /

  • BPC 7.5NW SP08: "unknown MDX error" message for simple dimension formula

    Hi everyone!!
    We are facing many different issues concerning dimension formulas and
    script logic. Maybe it's something related to SP08. For instance,
    consider the following:
    - there is a dimension named P_Account, with members Price, SalesCost,
    and others
    - there is a dimension named P_Product, which consists of a hierarchy,
    for instance: Prod1 with two children, Prod1A and Prod1B
    We want to set the following dimension formula in P_Product for Prod1 member:
    IIF([P_Account].CURRENTMEMBER.PROPERTIES("ID") = "Price", Null, 1)
    that is, we wanted to try to be able to avoid summing Price, returning
    Null for (Price, Prod1). Later we would try to replace "1" with the
    appropriate formula to sum children of Prod1 for all other members of
    P_Account. The result is an odd error: "MDX statement error: unknown MDX
    error" (or something similar, since I get the error message in portuguese).
    We have spent almost two days studying alternatives in SDN Forum, blogs,
    google, etc, trying to find a reason for the error but couldn't find it.
    Could anyone help on this one?
    Thanks!
    Luigi

    Hi everyone!
    After contacting SAP, we were asked to try to reproduce the error in APSHELL. I did the following:
    1) created another application set, copying APSHELL, named it TESTAPPSET;
    2) added two members to dimension P_ACCT (ID, ACCTYPE, SCALING, RATETYPE):
       (PRICE, INC, Y, END)
       (SALESCOST, INC, Y, END)
    3) saved to server and processed P_ACCT dimension successfuly
    4) added a UD dimension copied from P_Activity, named P_Product
    5) deleted all members of P_Product, processed the dimension sucessfuly
    6) added FORMULA property to P_Product, with size 200
    7) added three members to P_Product (ID, PARENTH1)
       (Prod1, "")
       (Prod1A, Prod1)
       (Prod1B, Prod1)
    8) saved to server and processed the dimension successfuly
    9) edited P_Product members and added the following as FORMULA for Prod1:
    IIF([P_ACCT].CURRENTMEMBER.PROPERTIES("ID") = "PRICE", Null, 1)
    Result was sucess!!
    10) edit P_Product again and removed the formula, saved to server and processed dimension successfuly;
    11) created an Application named SALES, type Financial Report, copied from PLANNING with dimensions
    12) edit dimensions, removed P_Activity and added P_Product to the list
    13) went back to step (9) and tried to add the formula again, saved to server and processed P_Product dimension. Result was success again!!
    So I imagined the issue might be caused by the user I was log in with. I went back to our application set, logged in as BPC_SYSADMIN and tried to set the formula again and it didn't work. User was not the problem.
    Since I had tried all the above creating everything with all UPPERCASE, I decided to try the following Formula
    IIF([P_ACCOUNT].CURRENTMEMBER.PROPERTIES("ID") = "Price", Null, 1)
    that is, P_ACCOUNT instead of P_Account. Result: success in processing dimension!!! And the formula worked as expected when I opened an Input Schedule to test it.
    When I check my dimension list in BPC Admin it says P_Account (mixed case), instead of P_ACCOUNT (all uppercase) since it was the way we created it.
    So, I spent 1hour to do the whole test, but it worked. I sent two questions/requests for correction or improvement to SAP:
    I) which case should be used in formulas? given I see P_Account in Dimension list, how should I know that I should write formulas with P_ACCOUNT, all uppercase?
    II) could BPC provide more descriptive error messages when processing dimensions and validating script logic? a simple error message such as "unidentified command or reference at P_Account" or anything similar would have saved us 4,5 days of work! it's a lot!
    Thank you guys for your support!!

  • Error in Trigger ( PL/SQL: ORA-01744: inappropriate INTO)

    Hi ,
    I've written the trigger in the following format.. As the original trigger is around 700 lines, so just format is written here.. please co-operate..
    CREATE OR REPLACE TRIGGER --
    AFTER UPDATE OF COL1
    ON TAB1
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    WHEN (NOT(OLD.COL1 IS NULL AND NEW.COL1=0))
    DECLARE
    rowToins PAK1.fdList;
    i number;
    BEGIN
    IF :NEW.COL2='V' THEN
    INSERT INTO DEST(
      D_AT)
    SELECT * FROM ( SELECT --
       PAK2.FUN1('AD',TAB10.ID) AS D_AT
    FROM ---
    WHERE --- )
       WHERE D_AT IS NOT NULL;
    ELSEIF :NEW.COL2 ='H' THEN
    SELECT * FROM ( SELECT --
       PAK2.FUN1('AD',TAB9.ID) AS D_AT
    BULK COLLECT INTO rowToins
    FROM ---
    WHERE --- )
       WHERE D_AT IS NOT NULL;
    i:=rowToins.FIRST;
    WHILE i IS NOT NULL LOOP
    --insert row 1
      PAK1.fun2(rowToins(i).<col>,
    i:=rowToins.NEXT(i);
    END LOOP;
    END IF;
    END;
    /The above code is giving the error..
    PL/SQL: ORA-01744: inappropriate INTOSo how can i correct the code...
    thanks

    The line no..are
    159/3 PL/SQL: SQL Statement ignored
    213/16 PL/SQL: ORA-01744: inappropriate INTO
    159 --> the first where condition in the example code
    213 --> the select list column in the second if condition in example code
    If i remove the
    select * from (
    PAK2.FUN1('AD',TAB9.ID) AS D_AT
    WHERE D_AT IS NOT NULL;Then the trigger is created with no issues....
    please let me know if i'm not clear
    Edited by: josh1612 on Apr 27, 2009 3:42 AM

  • Error while running simple JAXB test class

    I am new to JAXB and trying to run simple tutorial code.
    I created Java project and added required jar files in a classpath.
    But I get error as
    "com.jaxbtest" doesnt contain ObjectFactory.class or jaxb.index
    I am using Eclipse and I have added these external jars in build path as well as in "Open Run Dialog" classpath.
    Thank you in advance.
    YB

    Hi Timo,
    Im using JDev version 11.1.1.6.0.
    I checked the class path on the jdev console. All the library references are mentioned in the manifest.mf classpath of the test project like below:
    Manifest-Version: 1.0
    Class-Path: lib/identitystore.jar
    lib/adfm.jar
    lib/groovy-all-1.6.3.jar
    lib/adftransactionsdt.jar
    lib/adf-dt-at-rt.jar
    lib/adfdt_common.jar
    lib/adflibrary.jar
    lib/xmlparserv2.jar
    lib/db-ca.jar
    lib/jdev-cm.jar
    lib/ojmisc.jar
    lib/commons-el.jar
    lib/jsp-el-api.jar
    etc...
    So I expect the library references should be resolved looking at the manifest file.
    Another set of entries that I see in the jdev classpath are related to the Model project which is under test.
    -classpath
    D:\CurrentProject_1\16_7_2013_3pm\11_7_2013\.adf;
    D:\CurrentProject_1\16_7_2013_3pm\11_7_2013\Model\classes;
    How do I put these entries into my class path? Will it be sufficient if I add the Model.jar into my test project classpath?
    Thanks,
    Sapna

  • Error Calling a simple stored procedure

    Hello. I'm using the code below to call a simple stored procedure which returns a number. Why does it throw the exception (Also below)?
    Thank you,
    Alek
    =======================
    Code:
    import java.sql.*;
    public class Connect
    public static void main (String[] args)
    Connection conn = null;
    //CallableStatement stmtMySQL = null;
    long local_callkey = 0;
    try
    Class.forName("com.mysql.jdbc.Driver");
    String userName = "abc";
    String password = "def";
    String url = "jdbc:mysql://mysqlserver/sxma";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    String theMySQLCall = "{?=call sxma.sp_getnumber()}";
    CallableStatement stmtMySQL = conn.prepareCall(theMySQLCall);
    stmtMySQL.registerOutParameter(1, Types.INTEGER);
    stmtMySQL.execute();
    int res = stmtMySQL.getInt(1);
    if(res!=0)
    throw new Exception("MySQL Query exception return code: " + String.valueOf(res) + ")");
    else
    local_callkey = stmtMySQL.getLong(1);
    System.out.println("Local key is: " + local_callkey);
    catch (Exception e)
    System.err.println ("Cannot connect to database server!");
    e.printStackTrace();
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    ================
    Exception:
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.charAt(String.java:444)
         at com.mysql.jdbc.StringUtils.indexOfIgnoreCaseRespectQuotes(StringUtils.java:951)
         at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1277)
         at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:3640)
         at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:506)
         at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:401)
         at com.mysql.jdbc.Connection.parseCallableStatement(Connection.java:4072)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4146)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4120)
         at Connect.main(Connect.java:20)
    Thank you for your help

    Well, there's certainly something about that line that it doesn't like.
    I'm not really familiar enough with MySQL to remote-debug this one for you, but it seems to be dying while trying to reconcile that call to its metadata for the sproc. Check the sproc declaration -does it return a single out value? Or does it have a single out value in the parameter list (not the same thing, I think) ? And so on.
    Also, with the amended call that I provided is the failing stack trace identical, or slightly different? If different, could you post that too please?
    Finally, do you have a known good sproc call that you can sanity check against? Perhaps take one of the examples from the MySQL site and check that that will work with their reference code?

  • Error On trigger while adding a date

    This is my trigger i want to add 15 dates to issue date,while running a trigger its showing error,
    try to solve that trigger
    create or replace
    TRIGGER ISSUE_BOOK_TRI
    BEFORE
    INSERT ON issue_book FOR EACH ROW
    DECLARE
    CURSOR a IS
    SELECT join_date FROM member_book;
    p_join_date DATE;
    BEGIN
    OPEN a;
    FETCH a INTO p_join_date;
    IF p_join_date> :new.issue_date THEN
    RAISE_APPLICATION_ERROR (-20322,'You may Issue book only after joining');
    elsif
    :new.return_date := :new.issue_date+15;
    end if;
    CLOSE a;
    END;
    Error(15,22): PLS-00103: Encountered the symbol "=" when expecting one of the following: . ( * @ % & = - + < / > at in is mod remainder not rem then <an exponent (**)> <> or != or ~= >= <= <> and or like like2 like4 likec between || indicator multiset member submultiset
    Error(16,5): PLS-00103: Encountered the symbol "END" when expecting one of the following: begin function pragma procedure subtype type <an identifier> <a double-quoted delimited-identifier> current cursor delete exists prior

    /* Formatted on 2012/04/25 14:22 (Formatter Plus v4.8.8) */
    CREATE OR REPLACE TRIGGER issue_book_tri
      BEFORE INSERT
      ON issue_book
      FOR EACH ROW
    DECLARE
      CURSOR a
      IS
        SELECT join_date
          FROM member_book;
      p_join_date   DATE;
    BEGIN
      OPEN a;
      FETCH a
       INTO p_join_date;
      IF p_join_date > :NEW.issue_date
      THEN
        raise_application_error (-20322, 'You may Issue book only after joining');
      ELSIF 1 = 1 -- uuuuuu miss the condition here
      THEN
        :NEW.return_date := :NEW.issue_date + 15;
      END IF;
      CLOSE a;
    END;

  • Runtime error: Creating a simple resource in a CM repository

    Hi All,
         I am trying to create a simple Resource & a collection in a CM repository without properties.
         <b>The list of my imports is as follows:</b>
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.wcm.repository.ICollection;
    import com.sapportals.wcm.repository.IResource;
    import com.sapportals.wcm.repository.IResourceContext;
    import com.sapportals.wcm.repository.ResourceContext;
    import com.sapportals.wcm.repository.ResourceFactory;
    import com.sapportals.wcm.util.uri.RID;
         <b>I have written the following code:</b>
         IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
         com.sapportals.portal.security.usermanagement.IUser user =
                   (com.sapportals.portal.security.usermanagement.IUser) request.getUser().getUser();
                   <b>/* This is as per KM - Java iView - User Authentication */</b>
         try {
              IResourceContext context = new ResourceContext(user);
              RID rid = RID.getRID("/documents/test");
              ICollection parent = (ICollection) ResourceFactory.getInstance().getResource(rid, context);
              IResource resource = parent.createResource("file", null, null);
               } catch (Exception e1) {
              // problem while retrieving the resource
         <b>I am getting a portal Runtime error. The following is its error log:</b>
    Exception ID:07:49_28/06/05_0002_3055650
    [EXCEPTION]
    #1#com.sapportals.portal.prt.runtime.PortalRuntimeException: PortalRuntimeException
         at com.sapportals.portal.prt.core.PortalRequestManager.handleRequestException(PortalRequestManager.java:921)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:803)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    <i><b>Caused by: java.lang.NoClassDefFoundError: com/sapportals/wcm/repository/IResourceContext</b></i>
         at com.satyam.dynpage.MyDynpage.getPage(MyDynpage.java:23)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.getPage(PageProcessorComponent.java:193)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doOnNodeReady(PageProcessorComponent.java:62)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
         ... 21 more
    I don't know why am i getting an exception.
    Please help me in this regard.
    Thanks in advance.
    <b>Regards,
    Sai Krishna.</b>

    You need to put a sharing reference for "com.sap.km.application" in your portalapp.xml. Check out the following portalapp.xml. You can either put
    "com.sap.km.application" or "knowledgemanagement".
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.km.application"/>
      </application-config>
      <components>
        <component name="links_tree">
          <component-config>
            <property name="ClassName" value="com.ust.kmtree.display"/>
            <property name="SecurityZone" value="com.ust.kmtree/high_safety"/>
          </component-config>
          <component-profile>
            <property name="path" value="/documents/prakash"/>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>

  • Error when calling simple restful service from SOA 11G

    Hi'
    I have a URL for simple restful service
    http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate}
    GET method
    I am able to invoke this from IE and This URL is also accessible in UNIX server where SOA server is deployed.
    http://xxxxx:857/swift/v2/EMPIDChanges/2012-11-28%2005:57:49
    I am using HTTP Binding adapter,
    This is what goes in the composite.xml
    <reference name="ff" ui:wsdlLocation="ff.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/http/AssetID/Test_AssetID_VL/ff#wsdl.interface(Request_Response_ptt)"/>
    <binding.ws port="http://xmlns.oracle.com/pcbpel/adapter/http/AssetID/Test_AssetID_VL/ff#wsdl.endpoint(ff/Request_Response_pt)"
    location="ff.wsdl" supports="http">
    <property name="http.verb" type="xs:string" many="false">GET</property>
    <property name="endpointURI" type="xs:string" many="false">http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate}</property>
    <property name="http.payload" type="xs:string" many="false">url-encoded</property>
    <property name="oracle.webservices.auth.username" type="xs:string" many="false" override="may">Test1</property>
    <property name="oracle.webservices.auth.password" type="xs:string" many="false" override="may">Test1</property>
    </binding.ws>
    however I am getting error
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>oracle.fabric.common.FabricInvocationException: Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL</summary>
    </part>
    -<part name="detail">
    <detail>Unable to access the following endpoint(s): REPLACE_WITH_ACTUAL_URL</detail>
    </part>
    -<part name="code">
    <code>null</code>
    </reference>
    Please advice,
    Thanks,
    Yatan

    WS Binding: exception durign SOAP invocation: java.util.NoSuchElementException
    Looks like the error is in the data sent to or expected from the service in your composite. Check that audit logs and composite flow to make sure your soap message when using soapui matches what you are working with in soa suite.

  • How to resolve the error in trigger

    Hi,
    I've written the trigger and the logic is correct but unable to resolve the error.. Could you please suggest me to resolve the error...
    Solved
    Thank you
    Edited by: Smile on Feb 19, 2013 2:34 AM                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Yes you can very well do that
    See the example below. I have three tables.
    SQL> create table t1(no integer)
      2  /
    Table created.
    SQL> create table t2(no integer)
      2  /
    Table created.
    SQL> create table t(no integer)
      2  /
    Table created.I have inserted sample data into t
    SQL> insert into t
      2  select level
      3    from dual
      4  connect by level <= 10
      5  /
    10 rows created.
    SQL> commit
      2  /Now i want to insert even numbers into table t1 and odd numbers into table t2
    SQL> begin
      2     insert all
      3             when (mod(no,2) = 0) then
      4                     into t1 (no) values(no)
      5             else
      6                     into t2 (no) values(no)
      7     select no
      8       from t;
      9  end;
    10  /
    PL/SQL procedure successfully completed.The output is below...
    SQL> select * from t1
      2  /
            NO
             2
             4
             6
             8
            10
    SQL> select * from t2
      2  /
            NO
             1
             3
             5
             7
             9Thanks,
    Karthick.

  • Process chain - After error ABAP - trigger a metachain start does not work.

    Hi,
    I have a process chain, where after an ABAP runs into red (ERROR MESSAGE triggered), another process type, like start a new meta-chain, or start an infopackage starts.... But is does not work. After i go to logs, it asks me whether i want to trigger the following jobs, if i choose yes, it works. But i need to start it automatically, when the ABAP Routine has an error message (RED) in the chain.
    Any idea, because I tried to solve it all the day, but i did not manage to get itwork...
    Many Thanks,
    L.

    Hi,
    the problem is not the ABAP Program.
    I have the following situation:
    A Metachain contains as second step a call of local chain. After the local chain, according to the status of it (green o red), we have other different steps. So we have two different link (red and green) starting from the local process chain step.
    Inside the local process chain there is the ABAP program that check several parameters and if something is not as expected fails with status red. if this situation happens, the local process chain becomes red and in SM37 inside the job i see the error that i forced, but the status is not triggered to the first metachain , so the corresponding following steps are not triggered.
    This issue happens only if fails the ABAP program because, for example, a Infopackages loading fails every thing works and the corresponding steps in the metachain are executed.
    In the ABAP program in order to force the status red we have the following code:
    MESSAGE e162(00) WITH 'Status' 'Red'.
    Any idea?
    Thanks,
    Veronica

Maybe you are looking for