Why is this table trigger not firing when insert/update from servlet?

Hi!
I have this servlet that parses XML and stores values into Oracle tables. I have created a table trigger so that when one table is updated, a trigger is fired and the current system date is store in another table's field.
I have tested the trigger in Toad and it works, that is, if I update the table that the trigger is set to, the SYSDATE is stored as intended.
Here is the trigger's code:
DECLARE
tmpVar NUMBER;
NAME: transaction_time
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 9/14/2007 1. Created this trigger.
NOTES:
Automatically available Auto Replace Keywords:
Object Name: transaction_time
Sysdate: 9/14/2007
Date and Time: 9/14/2007, 8:00:42 AM, and 9/14/2007 8:00:42 AM
Username: (set in TOAD Options, Proc Templates)
Table Name: MS_RESLIMITS (set in the "New PL/SQL Object" dialog)
Trigger Options: (set in the "New PL/SQL Object" dialog)
BEGIN
tmpVar := 0;
UPDATE MS_Misc SET mi_lastrun = SYSDATE;
EXCEPTION
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END transaction_time;
Now, when the table is updated by the servlet, the trigger does not fire. And here is the code from the servlet:
--- <start of code> ---
boolean recordExists =
this.isRecordPresent("MS_ResLimits", "rl_compcode",
compCode, url);
Connection rlConn = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
rlConn = DriverManager.getConnection(url, dbUser,
dbPwd);
Statement stmt = rlConn.createStatement();
PreparedStatement xmlUpdate = null;
if (recordExists) {
xmlUpdate =
rlConn.prepareStatement("UPDATE MS_ResLimits SET rl_compcode = ?, rl_maxreslimit= ? WHERE rl_compcode =?");
xmlUpdate.setString(1, compCode);
xmlUpdate.setString(2, maximumReservationDate);
xmlUpdate.setString(3, compCode);
} else {
xmlUpdate =
rlConn.prepareStatement("INSERT INTO MS_ResLimits VALUES(?,?)");
xmlUpdate.setString(1, compCode);
xmlUpdate.setString(2, maximumReservationDate);
} //end-if-else
int n = xmlUpdate.executeUpdate();
rlConn.commit();
} catch (Exception ex) {
out.println(ex.toString() +
"-> error inserting Max Reservation Date<br>");
} finally {
if (rlConn != null) {
rlConn.close();
} //end-try-catch-finally
--- <end of code> ---
What causes the trigger to fire? the commit? My understanding is that executeUpdates are in autocommit mode by default, or am I mistaken? Do I have to programmatically send something to the DB so that the trigger fires?
BTW, I'm using JDeveloper 10.1.3.3.0. The project is being compiled with Java 1.5.0_06. The servlet is running in OCJ4 standalone. DB is 10g (don't know the release version).
...and, for some reason this message is not keeping format from my edit window to the post...
Thx!
Message was edited by:
delphosbean
Message was edited by:
delphosbean
Message was edited by:
delphosbean

You are supposed to be able to preserve you formatting using the <pre></pre> tags but I can't get this to work either<br>
<br>
Patrick.

Similar Messages

  • Table Header not Recurring - when Generate PDF from HTML with tables

    Hello,  It is not working as expected...and I'm not sure if the functionality is supported.  Want to create PDF from html document. The html document contains a html table that typically contains a large number of rows.  To make reading easier the html table used thead and tbody elements, and their children, so that when the table extends across pages when printed the header element recurs on each page.  However, the header element is not recurring in the generated PDF document (it only occurs in the first row of the table).  Just wondering if you have tried or used this functionality (created PDF from html with table with headers and the PDF included the table with recurring table header.  And if so, did you do anything special to make it work.  Thanks for any insight.

    If there's a problem with that package, I suggest you speak to the developer of that package and ask them to investigate.  It's not an Oracle supplied package so you are wrong to look for help here.

  • Why does my icloud email not change when i update my appleID? and how can I change it??..so frustrating

    I updated my email because I changed my name, and now i cant sign into icloud and it still wants the password for my old email. any ideas?

    Also, it's important to follow the steps in Change your Apple ID  when changing your ID. You're supposed to sign out of all of your accounts then change the name of the Apple ID then sign in using the email address. Because find my iPhone is a thief's worst nightmare the password will only be accepted for iCloud if the account is still called that current name. So if you changed the name of the account without changing the Apple iD you'll need to change the name back (on Appleid.apple.com) then sign out in Settings>iCloud, then change the name back using the desired email (on applied.apple.com) then sign in using the preferred email in Settings>iCloud.
    Cheers

  • WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION

    We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
    opening Copy Quote for this Form Personalization written.
    For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
    trigger-event: when-new-item-instance
    Trigger-object:copy_group
    condition:when copy_group='ALL'
    Action: showing message.
    The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
    Just I am thinking this overriding by Item level trigger of form.
    Please kindly help me quickly .What I need to do?
    How can I make trigger to Fire?
    Please kindly give solution.....Its very urgent Requirement.pls help me.
    Regards,
    Basavaraj

    Please kindly help me quickly .What I need to do?
    > Please kindly give solution.....Its very urgent Requirement.pls help me.
    Kindly log a SR for urgent issues.
    Thanks,
    Hussein

  • WHEN-NEW-ITEM-INSTANCE TRIGGER NOT FIRING IN FORM PERSONLIZATION(R12 UPGRAD

    We are upgrading to R12, when-new-item-instance trigger written for radio group not firing. using USO-821 Order Administrator Responsibility the function order capture.After clicking on actions push button
    opening Copy Quote for this Form Personalization written.
    For Radio Group Copy-Group when-new-item-instance trigger written but this trigger not firing,but In 11i Instance its Firing.
    trigger-event: when-new-item-instance
    Trigger-object:copy_group
    condition:when copy_group='ALL'
    Action: showing message.
    The same when-new-instance trigger written in form item level and trigger execution hierarchy properties 'OVERRIDE'.
    Just I am thinking this overriding by Item level trigger of form.
    Please kindly help me quickly .What I need to do?
    How can I make trigger to Fire?
    Please kindly give solution.....Its very urgent Requirement.pls help me.
    Regards,
    Basavaraj

    Please kindly help me quickly .What I need to do?
    > Please kindly give solution.....Its very urgent Requirement.pls help me.
    Kindly log a SR for urgent issues.
    Thanks,
    Hussein

  • Why does this site have online chat when you can never actually chat - always "not available"?  I was trying to get a simple question answered without calling and being on hold for 10 minutes?

    Why does this site have online chat when you can never actually chat - always "not available"?  I was trying to get a simple question answered without calling and being on hold for 10 minutes?

        Hello flabucki,
    Help is just a post away for you my friend! I can help with your questions right here. May I ask what question do you have? Both myself and the community would love to assist in any way that we can.
    Thank you…
    ArnettH_VZW
    Follow us on Twitter @VZWSupport

  • Key-enter trigger not firing

    hi friends,
    i have a trigger on key enter, but it is not firing when i press the enter key,
    why it is not working. i want the trigger to be fired only if the user press Enter key
    thanks
    Kris

    Hi Kris,
    I would suggest you try searching this forum for "KEY-ENTER". You shall be able to find out why it does not fire
    regards,
    teo

  • Which trigger gets fired when a filed (item) get populated

    Hi,
    Which (item level) trigger gets fired when a filed (item) get populated with data
    Thank you

    Thanks for the responce. But....please read the following and try to understand the probelm.
    I have a screen in Oracle Forms.
    For example the screen is EMP and I have a LOV on item: EMPNO
    After selecting an EMPNO from the LOV, I click on a button and the button's trigger (WHEN-BUTTON-PRESSED)
    populates the remaining items with data related to the EMPNO in the EMPNO item which I selected from the LOV.
    Here is the request: I want the items get populated when I select the EMPNO from the LOV.
    I copied the code from WHEN-BUTTON-PRESSED (which is populating the data into other fields) to the triggers you mentioned
    (pre-text-item, when-new-item-instance, when-validate-item, post-text-item)
    But they are not working (the data is not populating when I select EMPNO from LOV)
    I am a DBA not a developer, but I have to do this. So please help me and let me know how to do this.
    I hope you understand the request.
    Thank you

  • Why does the mail not work when i updated my 5s to iOs 8?

    why does the mail not work when i updated my 5s to iOs 8?

    Thank you for the reply. But can you tell me what this configuration is about and how I should do this?

  • Why is my message textbox not empty when i try to write a new message

    Hi all i am having this problem,
    why is my message textbox not empty when I try to write a new message. How to get rid of those text in the new message.

    I have this same problem.
    Everytime I start a brand new text it has an old message already in the text box

  • Why "stop download video" feature not show when playing video

    why "stop download video" feature not show when playing video,, i hope you can give me Solution for this problem because when i using 3g internet, it downlaod the video Quickly ,,, so it consume the Balance

    Do you have Flash installed?   Check HD > Library > Internet Plug-Ins
    If the Flash Player app is not in the Internet Plug-ins folder, download and install from here.
    When you post for help, please state which OS X is installed.
    If you aren't sure, click About this Mac from your Apple menu 
    Troubleshooting advice can depend on that information.

  • ORA-26563: renaming this table is not allowed

    Hi ,
    We have included structure in SAP standard table. When I tried to adjust table using SE14, system gives error message 'ORA-26563: renaming this table is not allowed'.
    Could you please guide me to resolve above issue.
    Regards,
    Naren

    Hi,
    Is this link Re: Urgent! - Problem during Conversion of SAP datadictionary table... helps you?
    Vinod

  • When I enable imatch on my iPhone 4s it takes approximately 30 minutes before other data fills 13.2gb of usable data. This problem does not occur when I manually sync music to my phone. Is this a common bug, and if so; is there a fix?

    When I enable imatch on my iPhone 4s it takes approximately 30 minutes before other data fills 13.2gb of usable data on the phone. This problem does not occur when I manually sync music to my phone only when I access imatch. Is this a common bug, and if so; is there a fix?

    yes it is. you can sign out of itunes account then sign back in. use http://support.apple.com/kb/ht1311 to sign out.

  • Hello, my email is connected to Lotus Notes. When I updated my iPad to iOS 6, it REQUIRED that I have a password for the iPad or else my email wouldn't work or synchronize with Lotus Notes (on my work laptop). This is really frustrating, please help.

    Hello, my email is connected to Lotus Notes. When I updated my iPad to iOS 6, it REQUIRED that I have a password for the iPad or else my email wouldn't work or synchronize with Lotus Notes (on my work laptop). This is really frustrating, because I cannot disable the password under General<Passcode. Thanks!

    This would almost certainly be a setting that is being enforced by your company. You'll need to talk to them about this.
    Regards.

  • WHY DOES IT SAY BATTERY NOT CHARGING WHEN I TRY TO CHARGE MY IPAD??

    WHY DOES IT SAY BATTERY NOT CHARGING WHEN I TRY TO CHARGE MY IPAD ???

    How are you trying to charge it, via a computer or the wall plug ? If a computer, then a lot of computers (especially older ones) generally do not provide enough power to their USB ports to charge the iPad at a sufficient rate - it may still be charging slowly, and should be a bit quicker if the iPad's screen is off (if you leave it for a while and then disconnect it from your computer you may find that it's battery percentage has gone up). The wall charger is usually the most efficient way to charge the iPad.
    If the wall charger then have you tried a reset to see if it charges after the iPad has restarted ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    If that doesn't work then have you tried a different charger and/or cable ? Do you know anybody else with an iPad so that you can try their charger and cable and they can try yours ?
    And for info typing in capitals is considered SHOUTING.

Maybe you are looking for

  • Can't install or uninstall iTunes

    Background: A few weeks ago my computer locked up at the "Welcome" screen. Took it to a local place for service. They were able to say it was a Windows problem. They explained that there was a possiblity that computer would have to be reformatted, an

  • Podcast Jumping - but only on iPhones/iPods

    Ok, so I have an odd problem with my podcast. (One I produce, not one I listen to.) My podcast will literally stop in the middle, and jump to another episode. If you go back, it will resume the show, but then it will jump again just a few minutes lat

  • BW Upgrade Issues

    Hi Gurus,                 I need some clarification about BW upgrade to 2004s. My questions are as follows:- 1. We have to upload all the deltas from R/3 to BW. Do we have to do any other thing or just run the delta load infopackages? How to delete t

  • How to middle text in a text area?

    Can someone tell me how to middle the text (vertically) on a JTextArea? It always starts at the top. Thanks to all in advance sridhar

  • I cannot activate facetime on my iphone4

    i need facetime to work.  i just bought this.. apple wont help...