Strange behaviour on KEY-COMMIT trigger

Hallo!
I'm developing a form on Forms Builder [32 Bit] Version 10.1.2.0.2 and I have the following problem:
In some of the fields I need to perform a check whether a user inserts correct content type (CAPS + language). To do this I have put on KEY-NEXT-ITEM and POST-TEXT-ITEM triggers on the fields an appropriate function to be executed that gives a suitable message to the user.
On form level I have a KEY-COMMIT trigger that performs some actions besides commit as well.
The problem is that if I enter wrong content on the relevant fields and right after I give SAVE (standard menu or toolbar way) I get the message displayed many times (more than the wrong fields) and no commit.
Any ideas what should I do to eliminate this?
Many thanks,
Alexandra

Thank you very much for the suggestions to use WHEN-VALIDATE-ITEM trigger. It works fine.
My problem was caused by the code in KEY-COMMIT trigger on form level (following COMMIT;):
CLEAR_FORM(no_validate);
do_key('enter_query');
These 2 lines caused the excessive validation producing multiple messages.
I replaced with:
If NOT form_success then
     RAISE Form_Trigger_Failure;
     else
     CLEAR_FORM;
     do_key('enter_query');
End if;

Similar Messages

  • Question: How does the "KEY-COMMIT" trigger work?

    Hello All,
    What is the “KEY-COMMIT” Trigger for the BLK_UPDATE data block for? When is the Trigger being activated? Where can I find the information regarding the "KEY-COMMIT" Trigger (FYI, I have looked at the ORACLE Form online document and the help in the Forms 6i Builder, but so far I found nothing)?
    Any information regarding to the "KEY-COMMIT" Trigger would be greatly appreciated!
    Thanks in advance,
    Jinlan
    --

    From my other post, I got the following information from Andreas Weiden and just want to share with you all here:
    "If you want the code inside your KEY-COMMIT-trigger executed, you will have to do a DO_KEY('COMMIT_FORM'); instead"
    This information really clarifies the def and use of the "KEY-COMMIT" trigger. Great thanks to Andreas for sharing.

  • LR 1.3.1 strange behaviour: L key adds keywords and removes pictures from collection

    After updating to LR 1.3.1 yesterday I found a very strange behaviour that I cannot explain: While in the Library module and looking at a picture from a collection (in loupe mode) I cycle through the different light modes using the L key. Then suddenly (after several hits of the L key) a keyword is added (not always the same keyword) and at the same time an unknown number of pictures is removed from the collection. The keyword is not added to the picture I was currently viewing, but to another one from the same collection. This has not happened before and I have no idea what is going on. I can restore the collection by relaunching an older catalog but of course this does not solve the problem. Can anybody help?
    (PC, Win XP prof SP 2, 4 Gig RAM)

    It is possible that instead of hitting the l key, or perhaps within the same sequence of hits your are in fact accidentally hitting the k key.
    K is the shortcut for "Add shortcut keyword"
    Of course you would have had to set that particular keyword at some point and it does not explain the different keywords being assigned.
    Unless the alt key was involved somehow and you were rating the images with 1-9 numbers. That would account for different keywords being assigned and would seem arbitrary.
    To check: look at one or two of the images that you may have rated using a number key and then look at the keyword set the keyword came from. Press the alt key and a number from 1-9 will appear next to the keyword. If they match then thats the answer.
    If you weren't rating the images this way then.....??
    Perhaps there is a fault with the keyboard itself rather than the program.
    David

  • Strange behavior of KEY-LISTVAL trigger for date field

    The code down lead to next behaviour:
    - When I use the List of Value (LOV) fil the field up with a sysdate.
    I choose one period from the LOV, but the field becomes empty.
    /* CGAP$OLES_SEQUENCE_BEFORE */
    declare
    l_cursor_item VARCHAR2(200) := :system.cursor_item;
    l_null_value BOOLEAN := false;
    begin
    if :system.cursor_value is null
    then
    copy(sysdate,l_cursor_item);
    l_null_value := true;
    end if;
    qms$calendar.key_listval;
    if l_null_value
    then
    copy(null,l_cursor_item);
    end if;
    end;
    It seems logical behavior of this code.
    But I don't understand why Headstart 6.5.4.0. generated this code.
    Headstart version 6.5.0 hasn't this code. There it is simply:
    /* CGAP$OLES_SEQUENCE_BEFORE */
    begin
    qms$calendar.key_listval;
    end;

    HI,
    After I save the entries - I see them on the layout. Then I exit bps0 and entr it again, re-launch the layout and don't see anything - just empty cells for the dates and 0s for the amounts. When I change the Characteristics combinations from "All possible characteristics combinations" to "From Transaction Data" I start seeing the entered values. How could I possibly continue on using All possible characteristics combinations and still see the entered values?
    Best regards,
    Andrey

  • FRM-40735:KEY-COMMIT  ORA-02291 trigger raised unhandled exception

    FRM-40735:KEY-COMMIT ORA-02291 trigger raised unhandled exception. when i tried to save records.
    I am using multi record block , 12 records will display at a time, i am trying to save 1st and 5th record which i changed.
    calling a procedure in key-commit trigger
    PROCEDURE desig_updation IS
    V_count number := get_block_property('employee_master',query_hits);
    BEGIN
    go_block('employee_master');
    first_record;
    for i in 1.. V_count loop
         if((:desig is not null ) and (:new_date is not null) and (:emp_desig<>:desig) and (:new_date >=:emp_desig_date)) then
              :emp_desig :=:desig;
              :emp_grade:=:grade;
              :emp_desig_date:=:new_date;
              :emp_upd_by:=:global.usr;
              :emp_upd_on:=:system.current_datetime;
              if( (:radio_group=2) and (:incr_amt is not null)) then
                   increment_process;
                   end if;
         end if;
         if :system.last_record ='TRUE' then exit;
         else next_record;
         end if;     
    end loop;
    END;
    PROCEDURE commit_action IS
    BEGIN
    desig_updation;
    commit_form;
    IF FORM_SUCCESS THEN
    CLEAR_FORM(NO_VALIDATE);
    EXECUTE_TRIGGER('PRE-FORM');
    END IF;     
    END;
    key-commit-trigger
    commit_action;
    commit_form;
    IF FORM_SUCCESS THEN
    CLEAR_FORM(NO_VALIDATE);
    EXECUTE_TRIGGER('PRE-FORM');
    END IF;
    PROCEDURE increment_process IS
    m_gross_sal number;
    p_rslt varchar2(200);
    p_status varchar2(20);
    BEGIN
    delete from INCR_TEMP where ECODE = :emp_code ;
    m_gross_sal := aod_gross_salary(:emp_orgn,:emp_code,'A');--find current salary
    insert into INCR_TEMP(ECODE , CURR_SAL ,
    INCREMENT_AMT ,TOTAL_AOD,
    STATUS,INCR_TYPE)
    values(:emp_code,m_gross_sal,
    :incr_amt,m_gross_sal+:incr_amt,
    'N','I');
    forms_ddl('commit');
    update_emp_increment(:emp_orgn,:emp_code,
    TRUNC(to_date(to_char(:new_Date,'DD/MM/YYYY'),'DD/MM/YYYY')),null,
    :incr_amt, p_rslt,
    :parameter.p_user,to_date(to_char(SYSDATE,'DD/MM/YYYY'),'DD/MM/YYYY'),'I',
    p_status);
    END;
    thanks,
    rinz

    It seems you are insert some data in child table. For which parent data does not exist. In simple primary key values does not exist while you are trying to insert in foreign key values. check this link.
    http://www.lmgtfy.com/?q=ORA-02291
    -Ammad

  • KEY-COMMIT not firing

    I am working on an Oracle 10g database and am using Oracle Forms Developer 10g to create forms. I have created a new 2 field table in my database:
    CREATE TABLE career_cluster
    (career_cluster_code VARCHAR2(3) NOT NULL
    ,CONSTRAINT career_cluster_pk
    PRIMARY KEY (career_cluster_code)
    USING INDEX
    TABLESPACE GALINDX
    ,career_cluster_desc VARCHAR2(30) NOT NULL
    TABLESPACE galaxy;
    I have also created a form so that users can enter data into this table. I have a career_cluster data block in my form with two items: career_cluster_code (set with a maximum length of 3 in my property palette) and career_cluster_desc (set with a maximum length of 30 in my property palette). Both items are also set in the property palettes to a char data type. In my SQL code (in the form) I always have these two items set as varchar2 with (3) and (30), respectively.
    The form opens fine when I run it, however when I click on my SAVE button my KEY-COMMIT trigger is not fired -- it jumps directly to my ON-ERROR trigger and I get an Oracle ORA-06502 error message. I don't see any inconsistencies in my data types or lengths. Below is my KEY-COMMIT code:
    DECLARE hold_item varchar2(30) := :system.cursor_item;
    hold_record varchar2(10) := :system.cursor_record;
    mess_name varchar2(80);
    mess_text varchar2(80);
    BEGIN
    go_block('career_cluster');
         if (error_code = 40202) then
              goto end_of_trigger;
         end if;
    if :system.block_status = 'CHANGED' then null;
    commit_form;
    if FORM_SUCCESS then null;
    mess_name := 'Transaction Complete';
    mess_text := 'Career Cluster(s) committed to the database';
    DISP_ALERT2(mess_text,mess_name);
    end if;
    else null;
    mess_name := 'No changes to commit';
    mess_text := 'No changes have been made to the Career Cluster Code Table';
    DISP_ALERT2(mess_text,mess_name);
    end if;
    go_item(hold_item);
    go_record(hold_record);
    <<end_of_trigger>>
    null;
    END;
    I put in a DISP_ALERT message right after the BEGIN statement but it never displayed so I don't think this trigger is firing. I also put a similar DISP_ALERT message in my ON-ERROR trigger and that does display, so I know it is going right to my ON-ERROR trigger. Does anyone have any ideas what might be triggering the ON-ERROR?
    Thanks,
    -NTW

    ORA-06502 is a numeric or value error string which is raised when an arithmetic, numeric, string, conversion, or constraint error occurrs. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
    I would suggest you to look at the columns definitions in the table and the form fields/variables data types and lengths and make sure they are same as the backend table columns.
    Also, you don't need to put NULL; after each IF ELSE conditions if you have any other statements.
    I would also suggest that you handle any errors in either exception handler of the block or in the ON-ERROR triggers.
    Try this:
    DECLARE
        hold_item varchar2(30) := :system.cursor_item;
        hold_record varchar2(10) := :system.cursor_record;
        mess_name varchar2(80);
        mess_text varchar2(80);
    BEGIN
        GO_BLOCK('career_cluster');
        IF :system.block_status = 'CHANGED' THEN
            commit_form;
            IF FORM_SUCCESS THEN
                mess_name := 'Transaction Complete';
                mess_text := 'Career Cluster(s) committed to the database';
                DISP_ALERT2(mess_text,mess_name);
            END IF;
        ELSE
            mess_name := 'No changes to commit';
            mess_text := 'No changes have been made to the Career Cluster Code Table';
            DISP_ALERT2(mess_text,mess_name);
        END IF;
        GO_RECORD(hold_record);
        GO_ITEM(hold_item);
    EXCEPTION
      WHEN OTHERS THEN  MESSAGE(TO_CHAR(ERROR_CODE)||'-'||ERROR_TEXT);
      RAISE FORM_TRIGGER_FAILURE;
    END;

  • Key-Commit

    Hi all,
    Can anyone suggest me about
    What’s the default parameter in key commit trigger?
    Thanking you
    Seshu

    Seshu,
    are you doing an exam and just asking all the questions on the forum? All your questions sound very "exam" like".
    Grant Ronald
    Forms Product Management
    p.s. on line help would answer this.

  • About Key-Commit

    I have lots of complex validation written on Key-Commit trigger.
    But whenever user tries to clear the form, its asking "Do You
    Want To Save The Changes", if user says yes then Key-Commit
    Trigger is not firing.
    Same thing happens when user press Key-Enterqry, Key-Exit
    button.
    So could u suggest me where can i write my complex validation
    that should fire before commit.
    Note : I can not write in Pre-commit & On-Commit trigger because
    i am having restricted procedure in kEY-COMMIT.
    wILL NEW VERSION OF FORMS FIRES HEY-COMMIT TRIGGER.
    rEPLY SOON
    BHAVESH
    null

    Hi Bhavesh,
    You might have solved your problem by now but if not then a
    suggestion from my end.
    In key-clrfrm trigger
    fire an explicit alert asking if user wants to commit changes
    if user chooses ok to do so then
    use following built-in : do-key('commit')
    which will explicitly fire the key-commit trigger
    hence fulfilling your purpose.
    the following is the source code :
    declare
    al_button number;
    begin
    if :system.form_status = 'CHANGED' then
    al_button := show_alert('c_alert');
    if al_button = ALERT_BUTTON1 then -- OK button
    do_key('commit');
    end if;
    end if;
    clear_form;
    end;
    Hope this solves your problem...
    Regards
    Rashmi
    Bhavesh (guest) wrote:
    : Hi
    : Thanks For reply
    : I can not write restricted procedure like go_item in
    : When-validate-record.
    : Also i have lots of complex validation, flag setting and
    : updatation which should gets fire before commit.
    : Because of restricted form procedure i can not write in pre-
    : commit or when-validate-record, according to me keycommit is
    the
    : correct trigger for all complex validation.
    : Also i am giving u example
    : Try to create simple master-detail form.
    : Make a business rule on form level that at least one child
    : record should present.
    : So how this business rule u will implement using simpest way,
    i
    : know there are lots of way like creating global or parameter
    : variables. but i don't want to use that.
    : My logic for above business rule is as,
    : Create key-commit trigger
    : navigate to detail ---- Restricted proc. go_block('detail')
    : go to the first record ---- Restricted proc. first_record
    : if :field is null then
    : message('at least one child should present') ;
    : raise form_triger_failure ;
    : end if ;
    : commit_form ;
    : so for above validation code which is the alternative trigger
    : Reply soon
    : Bhavesh
    : Fatih Sami KARAKAS (guest) wrote:
    : : Bhavesh Gandhi (guest) wrote:
    : : : I have lots of complex validation written on Key-Commit
    : : trigger.
    : : : But whenever user tries to clear the form, its asking "Do
    : You
    : : : Want To Save The Changes", if user says yes then Key-Commit
    : : : Trigger is not firing.
    : : : Same thing happens when user press Key-Enterqry, Key-Exit
    : : : button.
    : : : So could u suggest me where can i write my complex
    : : validation
    : : : that should fire before commit.
    : : : Note : I can not write in Pre-commit & On-Commit trigger
    : : because
    : : : i am having restricted procedure in kEY-COMMIT.
    : : : wILL NEW VERSION OF FORMS FIRES HEY-COMMIT TRIGGER.
    : : : rEPLY SOON
    : : : BHAVESH
    : : If you write your validation code in the
    : : WHEN-VALIDATE-RECORD trigger then
    : : this trigger fires before KEY-COMMIT.
    : : For KEY-EXIT and KEY-ENTERQRY, you must re-write this
    trigger.
    : : for the first one, write the code as
    : : exit_form(no_commit);
    : : for the second, write
    : : clear_block(no_commit);
    : : enter_query;
    : : Fatih Sami KARAKAS
    : : Turkiye
    null

  • URGENT!  Problems with On-Commit and Key-Commit triggers!!

    Hi there,
    We are having a problem with our form actually saving a value to the database after the commit_form is given.
    When we hit the Save Button (which triggers the Key-Commit, and that in turn triggers the On-Commit trigger) we want a populated global variable to save to the database. Now when we hit Save, we can see the field get populated properly with this Global Variable (Global.Last_Tckt_Read), BUT it doesn't save to the database.
    Here is the code from the On-Commit trigger:
    IF :cg$bf_meter.closing_ticket_issued = 'N'
    THEN
    :CG$bf_meter.opening_meter_reading := :GLOBAL.LAST_TCKT_READ;
    :CG$bf_meter.opening_meter_reading_date := :GLOBAL.LAST_TCKT_DATE;
    :CG$bf_meter.closing_meter_reading_date := :CG$bf_meter.last_ticket_date;
    :GLOBAL.PREV_METER_READING := :CG$BF_METER.LAST_TICKET_READING;
    :GLOBAL.WINDOW_ACTIVE_CHECK := 'true';
    :GLOBAL.FTDAYCHM_SAVED := 'true';
    commit_form;
    ELSE
    :GLOBAL.PREV_METER_READING := :CG$BF_METER.LAST_TICKET_READING;
    :GLOBAL.WINDOW_ACTIVE_CHECK := 'true';
    :GLOBAL.FTDAYCHM_SAVED := 'true';
    commit_form;
    END IF;
    The code in the Key-Commit trigger is just commit_form;. Now, the code from the On-Commit seems to work fine if its in the Key-Commit trigger -- BUT we need to use the On-Commit in case the user exits the Form with the Exit Button on the toolbar or "X" on the title bar (Neither the Exit Button and the "X" will call the Key-Commit trigger).
    Any ideas how we can get this data value to actually SAVE in the database??
    Thanks for any help -- please respond, this deadline has already passed!
    Mike

    Well, I can't say I understand what you want, but:
    1) if you have only commit_form in key-commit - then you do not need this trigger. key-commit will fire when F10 (commit) is pressed, but since it is doing the same - there is no need.
    2) why don't you populate your block values to be saved right in SAVE button trigger and issue commit_form in the same trigger?
    Then you can have key-commit to cover the same functionality for F10 with code:
    go_item('save');
    execute_trigger('when-button-pressed');
    3) I cannot get the point of the "close" stuff - on close you want to check for changes or not? and to allow the user to exit with or without saving?

  • How to Run sequencially two Key-Commit triggers with different scope

    Hi all
    I have two Key-Commit triggers at form and Block level. Form level trigger is inherited from a library. In block level trigger, I have some additional checks. What I want is, to execute the Block level trigger first and than the form level. I tried working with the override/Before/after property of triggers which does the job of sequencing execution but the Raise Form_Trigger_Failure in the block level trigger doesn't stop the execution of form level trigger. Block level trigger does the checks and display corresponding alerts but than the form level trigger also executes.
    I don't wanna copy the code from Form level trigger to the block level trigger as it is common to whole application and may need some additional coding/ bug fixing later.
    Any help would be appreciated.
    RMA

    Thanks for all the help.
    In Key-Commit trigger I am just setting the Blocks' properties, nothing special, the main checks are in On-Commit trigger. I also understand the work around by using a user defined trigger but, to my knowledge, Oracle doesn't recommend it.
    My form has two datablocks, Parent and a child. The entered quantity in the Master block needs to be verified against the Number of units entered in the child block. If they are not the same, I want the alert and stop execution.
    Now I am using Pre-Insert trigger in the master block but was a little surprised because of the sequencing behavior. My understanding was that RAISE FORM_TRIGGER_FAILURE stops execution of all the code after it even is it is in another trigger/procedure ..but now it appears that I was wrong :-(
    Any suggestions??
    RMA

  • Why KEY-COMMIT didn't response??????????

    why KEY-COMMIT didn't response??????????
    my Program Units is LYH:
    LYH(Package Spec):
    PACKAGE LYH IS
    PROCEDURE EVENT(EVT in VARCHAR2);
    END;
    LYH(Package Body):
    PACKAGE BODY LYH IS
    procedure EVENT(EVT in VARCHAR2) is
    TYPE Array1 IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;
    arr_department_code Array1;
    j2 number:=1;
    BEGIN
    --if EVT='POST-CHANGE' then     
    if EVT='KEY-COMMIT' then
              -- insert into XCT_EQ_PRODUCTIONS
         -- ITEM_NAME)
    --     VALUES
         -- :XCT_EQ_PRODUCTIONS.ITEM_NAME);
         --'lllllllllllllll');
         -- commit;
         FND_MESSAGE.DEBUG('AAAA');     
         go_block('XCT_EQ_PRODUCTIONS');
    first_record;
    j2:=1;
    loop
         arr_department_code(j2):=:XCT_EQ_PRODUCTIONS.DEPARTMENT_CODE;
    exit when :system.last_record='TRUE';
         next_record;     
         j2:=j2+1;
    end loop;     
    for ii in 1..arr_department_code.last loop
              if arr_department_code(ii)=arr_department_code(ii+1) then
                   FND_MESSAGE.DEBUG('two same department');
              --     exit ;
                   RAISE FORM_TRIGGER_FAILURE;
              end if;
    end loop;
    END IF;
    END EVENT;     
    END LYH;
    I call LYH in KEY-COMMIT trigger(Data Blocks)
    LYH.EVENT('KEY-COMMIT');
    why din't show message'two same department is forbidden' when i typed two same department name 'EP4100' i running the form

    yes,
    Oracle E-Business Suite 11i,
    Now Generate the form file ......
    Compile Successful !!!
    i upload the file XWPF539L.fmb ,then run,my code have FND_MESSAGE.DEBUG('two same department is forbidden');
    but din't show message'two same department is forbidden' when i typed two same department name 'EP4100'

  • One to many mapping - strange behaviour

    I noticed a strange behaviour which happens when working with 1 to n
    relationships. Maybe the behaviour is intended by the JDO specification or
    maybe I haven't set the proper kodo properties to make it work.
    Here's the problem:
    I have the following two classes wich I map to a database table each (using
    datastore identity):
    class Person
    private String name;
    private Collection cars;
    // setters and getters
    class Car
    private String model;
    private Person owner;
    // setters and getters
    When I have a persistent car object and I assign it to a persistent person
    like this:
    car.setOwner(person);
    and I immediately retrieve all cars of the person by calling:
    Collection c = person.getCars()
    the car ist not in the collection as I would expect it to be. In my opinion
    JDO should make sure the car is added to the collection.
    Even after I commit the whole transaction the car is still not in the
    collection.
    To make the car appear in the collection I have to create a new
    PersistentManager (when using javax.jdo.option.Optimistic=true) and refetch
    the person object again.
    Can anyone enlighten me on this problem?
    Thank you!
    Donat Hauser
    [email protected]
    mapping.jdo
    <class name="Person">
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="cars">
    <collection element-type="Car"/>
    <extension vendor-name="kodo" key="inverse" value="owner"/>
    </field>
    </class>
    <class name="Car">
    <extension vendor-name="kodo" key="table" value="CAR"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="model">
    <extension vendor-name="kodo" key="data-column"
    value="MODEL"/>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="data-column"
    value="OWNER"/>
    </field>
    </class>

    Donat,
    This is a bit of a philosophical question. One of the goals of JDO is to
    be as closely aligned to the Java language as possible, and Java has no
    concept of a shared relation. So, we do not perform any work to ensure
    that relations get 'magically' set on both sides. Instead, you must set
    both sides of the business relation yourself in Java code.
    The result of this is that code that you write will behave the same
    regardless of whether or not the objects are persistent. So, you can write
    test cases or non-persistent parts of your application and trust that the
    code will behave the same in both instances.
    -Fred
    In article <[email protected]>, M__ller Alfons wrote:
    >
    I noticed a strange behaviour which happens when working with 1 to n
    relationships. Maybe the behaviour is intended by the JDO specification or
    maybe I haven't set the proper kodo properties to make it work.
    Here's the problem:
    I have the following two classes wich I map to a database table each (using
    datastore identity):
    class Person
    private String name;
    private Collection cars;
    // setters and getters
    class Car
    private String model;
    private Person owner;
    // setters and getters
    When I have a persistent car object and I assign it to a persistent person
    like this:
    car.setOwner(person);
    and I immediately retrieve all cars of the person by calling:
    Collection c = person.getCars()
    the car ist not in the collection as I would expect it to be. In my opinion
    JDO should make sure the car is added to the collection.
    Even after I commit the whole transaction the car is still not in the
    collection.
    To make the car appear in the collection I have to create a new
    PersistentManager (when using javax.jdo.option.Optimistic=true) and refetch
    the person object again.
    Can anyone enlighten me on this problem?
    Thank you!
    Donat Hauser
    [email protected]
    mapping.jdo
    <class name="Person">
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="cars">
    <collection element-type="Car"/>
    <extension vendor-name="kodo" key="inverse" value="owner"/>
    </field>
    </class>
    <class name="Car">
    <extension vendor-name="kodo" key="table" value="CAR"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="model">
    <extension vendor-name="kodo" key="data-column"
    value="MODEL"/>
    </field>
    <field name="owner">
    <extension vendor-name="kodo" key="data-column"
    value="OWNER"/>
    </field>
    </class>
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • Strange behaviour of Runtime.getRuntime().exec(command)

    hello guys,
    i wrote a program which executes some commands in commandline (actually tried multiple stuff.)
    what did i try?
    open "cmd.exe" manually (administrator)
    type "echo %PROCESSOR_ARCHITECTURE%" and hit enter, which returns me
    "AMD64"
    type "java -version" and hit enter, which returns me:
    "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    type "reg query "HKLM\SOFTWARE\7-zip"" returns me:
    HKEY_LOCAL_MACHINE\SOFTWARE\7-zip
    Path REG_SZ C:\Program Files\7-Zip\
    i wrote two functions to execute an command
    1) simply calls exec and reads errin and stdout from the process started:
    public static String execute(String command) {
              String result = "";
              try {
                   // Execute a command
                   Process child = Runtime.getRuntime().exec(command);
                   // Read from an input stream
                   InputStream in = child.getInputStream();
                   int c;
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
                   in = child.getErrorStream();
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
              } catch (IOException e) {
              return result;
         }the second function allows me to send multiple commands to the cmd
    public static String exec(String[] commands) {
              String line;
              String result = "";
              OutputStream stdin = null;
              InputStream stderr = null;
              InputStream stdout = null;
              // launch EXE and grab stdin/stdout and stderr
              try {
                   Process process;
                   process = Runtime.getRuntime().exec("cmd.exe");
                   stdin = process.getOutputStream();
                   stderr = process.getErrorStream();
                   stdout = process.getInputStream();
                   // "write" the parms into stdin
                   for (int i = 0; i < commands.length; i++) {
                        line = commands[i] + "\n";
                        stdin.write(line.getBytes());
                        stdin.flush();
                   stdin.close();
                   // clean up if any output in stdout
                   BufferedReader brCleanUp = new BufferedReader(
                             new InputStreamReader(stdout));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += line + "\n";
                   brCleanUp.close();
                   // clean up if any output in stderr
                   brCleanUp = new BufferedReader(new InputStreamReader(stderr));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += "ERR: " + line + "\n";
                   brCleanUp.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return result;
         }so i try to execute the commands from above (yes, i am using \\ and \" in java)
    (1) "echo %PROCESSOR_ARCHITECTURE%"
    (2) "java -version"
    (3) "reg query "HKLM\SOFTWARE\7-zip""
    the first function returns me (note that ALL results are different from the stuff above!):
    (1) "" <-- empty ?!
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    the second function returns me:
    (1) x86 <-- huh? i have AMD64
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    horray! in this version the java version is correct! processor architecture is not empty but totally incorrect and the reg query is still err.
    any help is wellcome
    note: i only put stuff here, which returns me strange behaviour, most things are working correct with my functions (using the Runtime.getRuntime().exec(command); code)
    note2: "reg query "HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0" /t REG_SZ" IS working, so why are "some" queries result in ERR, while they are working if typed by hand in cmd.exe?

    ok, i exported a jar file and execute it from cmd:
    java -jar myjar.jar
    now the output is:
    (1) "" if called by version 1, possible to retrieve by version 2 (no clue why!)
    (2) "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    (3) C:\Program Files\7-Zip\
    so all three problems are gone! (but its a hard way, as i need both functions and parse a lot of text... :/ )
    thanks for the tip, that eclipse changes variables (i really did not knew this one...)

  • Report S_ALR_87013542 strange behaviour

    Hi All,
    Report S_ALR_87013542 - Actual/Comm/Total/Plan in COAr crcy -  is showing up cross signs in some of the columns.When the cross sign (like any other column value) is clicked the line item detail are sown correctly.
    Has anybody encountered this kind of issue before ?
    I googled and searched various forums but all in vain.
    Please provide inputs to correct this strange behaviour of Report S_ALR_87013542. Thanks!
    Regards
    Dev

    Hello Dev,
    Did you execute report RKACOR04 for the affected object number and checked if this still happens ?
    Suresh Jayanthi.

  • Strange behaviour of Removal of Alpha for Info object in Quality system

    Strange behaviour of Removal of Alpha for Info object in Quality system as compared to Development system.
    Hi,
    The data for an info object Key in the DSO was 00000000000000000000000000123. I removed Alpha for the info object and data was corrected to 123 in the DSO in development system.
    Now, when i transported the info object without alpha to quality and loaded data into DSO, the data is still the same with leading zeros.
    I dont want to write routine to remove leading zeros, as I have values as 0. If i write routine, all zeros will be removed and this will be blank.
    Both development and quality have same patches applied and are on same level.
    Why is this strange behaviour in quality system...
    Any inputs?? please suggest.
    Thanks.
    Lavanya

    Hi,
      Did you drop and reload the data after changing the conversion?
    Regards,
    Raghavendra.

Maybe you are looking for