CONCURRENT UPDATE EXCEPTION

Hi All,
We are getting a CUE only for a particular user, i.e when this user logs in , it loads his pending orders and then when we try to checkout the order we get the below error. This is happening only for a particular user account, when we enabled debug on OrderRepository we found that during handleMoveToOrderCommit operation, some how an update query is fired(before processOrder chain is executed) which increments the version number - this query cannot be seen in the log(query where the version number became 578). Thus , when processOrder chain is executed it throws Concurrent Update Exception.
Any inputs regarding this is highly appreciated.
UPDATE dcspp_order
SET version=?,state=?,submitted_date=?
WHERE order_id=? AND version=?
-- Parameters --
p[1] = {pd: version} 578 (java.lang.Integer)
p[2] = {pd: state} SUBMITTED (java.lang.String)
p[3] = {pd: submittedDate} 2011-07-19 23:23:55.744 (java.sql.Timestamp)
p[4] = {pd} o9820006 (java.lang.String)
p[5] = {pd} 577 (java.lang.Integer)
[--SQLUpdate--]
2011-07-19 23:24:02,609 INFO [nucleusNamespace.atg.commerce.order.OrderRepository] DEBUG updateItem(order:o9820006) (CONCURRENT UPDATE EXCEPTION: no rows found for version=577)
2011-07-19 23:24:02,609 INFO [nucleusNamespace.atg.commerce.order.OrderRepository] DEBUG removeCurrentProperties(order:o9820006)
2011-07-19 23:24:02,610 INFO [nucleusNamespace.atg.commerce.order.OrderRepository] DEBUG setPropertyValue(order:o9820006.submittedDate,12/31/1969 18:00:00)
2011-07-19 23:24:02,611 ERROR [nucleusNamespace.atg.commerce.order.ShoppingCartModifier]
java.lang.RuntimeException: CONTAINER:atg.repository.RepositoryException; SOURCE:org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e3c8d2:c32f:4e26092b:3b367 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e3c8d2:c32f:4e26092b:3b367 status: ActionStatus.ABORT_ONLY >)
at atg.adapter.gsa.GSAItemDescriptor.loadProperty(GSAItemDescriptor.java:5464)
at atg.adapter.gsa.GSAItem.getPersistentPropertyValue(GSAItem.java:1078)
at atg.adapter.gsa.GSAItem.getPropertyValue(GSAItem.java:971)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:2088)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:1968)
at atg.adapter.gsa.GSAItem.getItemTransactionState(GSAItem.java:1954)
at atg.adapter.gsa.GSAItem.getItemTransactionStateUnchecked(GSAItem.java:2143)
at atg.adapter.gsa.GSAItem.setPropertyValue(GSAItem.java:1332)
at atg.adapter.gsa.GSAPropertyDescriptor.setPropertyValue(GSAPropertyDescriptor.java:407)
at atg.adapter.gsa.DatePropertyDescriptor.setPropertyValue(DatePropertyDescriptor.java:149)
at atg.repository.RepositoryItemImpl.setPropertyValue(RepositoryItemImpl.java:223)
at atg.adapter.gsa.GSAItem.setPropertyValue(GSAItem.java:1308)
Edited by: user4180179 on Jul 19, 2011 10:19 PM
Edited by: user4180179 on Jul 19, 2011 11:12 PM

Yes, I had a look at it. In fact we are getting this error running on a single instance with simple caching mode. The strange part is that it happens only for a particular user profile. Setting item-cache-timeout to session timeout as mentioned in the link would not help in our case since we are getting the error in a normal flow which hardly takes 5 min.
After debgging OrderRepository, I can see that somehow the dcspp_order table gets updated when we click "Purchase"(and this query cannot be seen in the log - we can see all the other queries in the log) BEFORE the processOrder pipeline is executed from handleMoveToCommitOrder.

Similar Messages

  • ERROR: could not serialize access due to concurrent update

    Hi.
    I use ejb+glassfish+postgres in my project.
    The project is a web application for finansial data transfering.
    I have three DBs, long global transactions, serializable isolation level, container-managed transaction.
    When i test the project with concurent threads, i get an exception: "ERROR: could not serialize access due to
    concurrent update"
    I read that when you get suck kind of error, your program must rollback current transaction and then reply this transaction.
    what do i need to do to complete this transaction? :
    1) rollback and reply transaction
    2) maybe, the are other ways to reply transaction (for example: glassfish configurations, ....)
    Edited by: 856539 on 04.05.2011 8:10

    If your DAO is nicely separated from your service layer as it should be then the solution I suggested above works and doesn't require you to change many classes because you can catch the expection in the DAO layer and do the retry in the DAO layer. That's where the solution belongs too because it's only applicable for your current database solution (Postgres). i.e If you change your database solution you need to change your DAO anyway, but only your DAO. If you put the solution in your service layer (or client layer) then you need to change those layers when you change your database solution which defeats the purpose of the separation.
    If you still want the interceptor approach, you need to check if the transaction has been marked for rollback back, then you need to join the transaction with EM.join and from there you attempt to close and discard the joined transaction before starting another one to invoke the retry operation on. Bear in mind that you only do the rety when the transaction was marked for roll back because of that specific exception. Needless to say that this doesn't seem to be a clean way to handle your transactions (if you can get it to work that is).

  • ORA-00235: controlfile fixed table inconsistent due to concurrent update

    Hi,
    While our system is loading lot of data, we are getting failures during level 0 RMAN backup with following error:
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 07/16/2004 00:10:35
    ORA-00235: controlfile fixed table inconsistent due to concurrent update
    Per Oracle rep suggestions, we have already increased our redo log files (we have 12 groups with 1 file each) to 1GB each file. THe log_checkpoint_interval is also set to 87382. (OS block size 4k)
    This is on Oracle 9.2.0.5 system on Windows 2000 AS clustered system.
    During normal loading operation per statspack report the redo size is 1-2.5MB/second. This may be causing checkpoints every second.
    Any suggestions to reduce contention of control file during RMAN level 0 backups?
    Thanks
    Satish

    One of the major guideline to adapt the best possible your database when RMAN is used is to configure the database as a Shared Server.
    Your database is working as a Shared or Dedicated Server ?
    Joel Pérez
    http://otn.oracle.com/experts

  • TS1702 I have downloaded app updates except my Tom Tom navigation. I'm getting the error on my i phone 'Cannot connect to the i tunes store. Wi fi is working fine.

    I have downloaded app updates except my Tom Tom navigation. I'm getting the error on my i phone 'Cannot connect to the i tunes store. Wi fi is working fine.
    Any ideas?

    Same here on my lpad2. Can access the web just fine from browsers but cannot install new apps or updates in appl store.  Seeing a few others reporting same issue tonight so likely an apple server issue and staff will notice it in network monitors and fix it...sometime this weekend.
    Rob

  • [svn] 1043: Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management

    Revision: 1043
    Author: [email protected]
    Date: 2008-03-31 15:22:13 -0700 (Mon, 31 Mar 2008)
    Log Message:
    Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management
    QA: Yes
    Doc: No
    Details:
    Make the 'subscriptions' set in MessageClient/RemoteMessageClient concurrent modification safe.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-184
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/RemoteMess ageClient.java

  • [svn] 1044: Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management

    Revision: 1044
    Author: [email protected]
    Date: 2008-03-31 15:23:07 -0700 (Mon, 31 Mar 2008)
    Log Message:
    Bug: LCDS-184 - Concurrent modification exception thrown during remote subscription management
    QA: Yes
    Doc: No
    Details:
    Make the 'subscriptions' set in MessageClient/RemoteMessageClient concurrent modification safe.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-184
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/MessageClient.java

  • Interesting observation when doing concurrent updates using JE

    Hi,
    I had some interesting results when i tested JE against C version.
    In JE, when 2 thread are updating same record on a page; the performance is same as the core version; as expected.
    But when 2 threads are updating 2 different records on the same page; the performance of JE was almost still the same as the previous case. I expected major performance upgrade due to record-level locking(so concurrent updates to different records on same page should have been very fast); but it was not so.
    Can anyone explain why?
    I am using DB Env with transactions and locking ON. Record size is very small.
    Thanks.

    Hi,
    In JE, when 2 thread are updating same record on a pageJE is NOT a page based system, so I'm not sure what you mean here.
    Are you getting Lock conflicts on either system?
    What * performance* are you measuring?
    You haven't provided much detail about what you are trying to accomplish.
    Ron

  • How to validate and import csv file to mysql? (Concurrent update)

    Hi
    I have a csv file with various columns of data which need to be validated and display in a jsp page. After the validation, the data needs to be imported into mysql DB.
    May I ask how can I retrieve those data, validate them and import them row by row to DB?
    Also, the program needs to handle concurrent update of DB. i.e. user A can import data through jsp page while user B can upload the csv file to insert into table.
    Thanks

    techissue2008 wrote:
    May I ask how can I retrieve those dataGoogle on "jsp file upload". I highly recommend you the Apache Commons FileUpload API.
    validate them Just write Java logic accordingly. You may find the java.lang.String API useful.
    and import them row by row to DB? You can use the JDBC API for this. There is a JDBC tutorial here at Sun.com. Google can find it.
    Also, the program needs to handle concurrent update of DB. i.e. user A can import data through jsp page while user B can upload the csv file to insert into table. Just write threadsafe code.

  • Concurrent updates - How to prevent?

    Issue:
    We have a courses table that contain courses and the number of seats allocated for each course. We also have registrations table which contains the registrations for each course. There should not be more registrations than the number of seats allocated for each course.  However, some of the courses has more registrations than the number of seats allocated for the course. We think it probably happened when 2 users clicked the submit button at the same time.
    CREATE TABLE courses
         course_id INT PRIMARY KEY,
         seats_allocated INT
    CREATE TABLE registrations
        student_id INT,
        course_id INT
    CREATE PROCEDURE signup
       v_student_id INT,
       v_course_id INT
    AS
    v_seats_available INT;
    BEGIN
    SELECT (seats_allocated- rg_total) INTO v_seats_available FROM courses crse LEFT OUTER JOIN
         SELECT course_id, COUNT(*) AS rg_total FROM registrations GROUP BY course_id
    ) r ON r.course_id = crse.course_id
    WHERE course_id = v_course_id;
    -- do Some other tasks here
    IF(v_seats_available > 0) THEN
            INSERT INTO registrations (course_id, student_id) VALUES(v_course_id, v_student_id);
    ELSE
             -- Throws exception here
    END IF
    -- do some other tasks here
    END;
    How do we guarantee the number of registrations will not exceed the number of seats allocated for the course? Would change the query to get the total seats available into a SELECT FOR UPDATE query fix this problem? (is it the best way to fix this problem)?

    Believe other options will work either by modifying model or working around in other flow. 
    Here just focus on minimum change to make it work.
    Update table courses first (and then select count to compare) do works (but means one more sql needed on top of the following process and added little more cost on performance).
    If only using FOR UPDATE in the some-modified OP's original select (sort of work around to make it work), it do lock out other sessions.  But it proves (should be clearer in debug mood with commit included in the loop, or add sleep(60) in the loop to make sure session 2 open the cursor and hang there before session 1 commit) that it is still possible the concurrent running two sessions can both insert into registrations table successfully (because the opened cursor in session 2 will use the before image-read consistent data at time of cursor opening rather than the image/data at time of session 1 commit).  Correct me if the below logic flow and the rationale are wrong.
    --in session 1
    SQL> select * from registrations ;
    no rows selected
    SQL> declare
      2    cursor c is select t1.course_id, t1.seats_allocated, sum(decode(t2.student_id, null, 0, 1)) over () total_reg
      3             from courses t1
      4             left join registrations t2
      5             on t1.course_id = t2.course_id
      6             where t1.course_id=1 for update ;
      7
      8  begin
      9
    10  for c1 in c loop
    11    dbms_output.put_line ('loop_count='||c%rowcount ) ;
    12    dbms_output.put_line ('course_id='||c1.course_id ) ;
    13    dbms_output.put_line ('seats_allocated='||c1.seats_allocated ) ;
    14    dbms_output.put_line ('total_registered='||c1.total_reg) ;
    15    insert into registrations values (100, 1) ;
    16    exit ;
    17  end loop ;
    18  --commit ;
    19  --rollback ;
    20  end ;
    21  /
    loop_count=1
    course_id=1
    seats_allocated=1
    total_registered=0
    PL/SQL procedure successfully completed.
    --in session 2
    SQL> declare
      2    cursor c is select t1.course_id, t1.seats_allocated, sum(decode(t2.student_id, null, 0, 1)) over () total_reg
      3             from courses t1
      4             left join registrations t2
      5             on t1.course_id = t2.course_id
      6             where t1.course_id=1 for update ;
      7
      8  begin
      9
    10  for c1 in c loop
    11    dbms_output.put_line ('loop_count='||c%rowcount ) ;
    12    dbms_output.put_line ('course_id='||c1.course_id ) ;
    13    dbms_output.put_line ('seats_allocated='||c1.seats_allocated ) ;
    14    dbms_output.put_line ('total_registered='||c1.total_reg) ;
    15    insert into registrations values (100, 1) ;
    16    exit ;
    17  end loop ;
    18  --commit ;
    19  --rollback ;
    20  end ;
    21  /
    --hanging
    --in session 1
    SQL> commit ;
    Commit complete.
    SQL> select * from registrations ;
    STUDENT_ID  COURSE_ID
           100          1
    --in session 2 (lock released after session 1 commit but do not see the insert by session 1 --total_registered=0)
    loop_count=1
    course_id=1
    seats_allocated=1
    total_registered=0
    PL/SQL procedure successfully completed.
    Elapsed: 00:02:37.52
    SQL> select * from registrations ;
    STUDENT_ID  COURSE_ID
           100          1
           100          1
    Elapsed: 00:00:00.03
    SQL> commit ;
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> select * from registrations ;
    STUDENT_ID  COURSE_ID
           100          1
           100          1
    Elapsed: 00:00:00.01
    SQL>

  • Issue in concurrent update of the same attribute

    Hi All,
    We have a requirement to populate an attribute on user profile from target resource process form during reconciliation. This attribute can hold the multiple values separated by '|' (pipe). A user can have multiple account on this target resource. Now we are facing the issue where if the user's multiple account is updated and during reconciliation when they are trying to update the user form (concurrently...almost at the same time..) via different recon events (and hence process task on recon update received), only last update came into effect. Lets say if two recon event R1 and R2 created for a user and trying to copy the value ATTRVAL1 and ATTRVAL2 on user profile attribute attr1. In ideal scenerio the value of attr1 should be ATTRVAL1|ATTRVAL2, but in our case the value we received is either ATTRVAL1 or ATTRVAL2 (depending on the last update). The process task to update the value on user profile is successfully completed. It seems till the time last one capture the value, it stale the first update usr_rowver field that used in profile update.
    Please let me know if you ever face this issue and how to deal with this. There is no caching enabled in OIM (under config file)

    Hi,
    Can you just tell me which type of Recon you are using is it GTC or any other recon?
    What is target resource from which recon is happening?
    Just check the metadata.xml whehter it gives you option to make attribute as multivalued or not. IF it is there then you just define your attribute as multivalued and proceed..
    Regards
    Alabhya Goel

  • ABAP API, SP06 Patch 3:  Main record update exception: BSEI_MSG_OutOfMemory

    Hi all,
    When attempting to call the IF_MDM_CORE_SERVICES->UPDATE method, I receive the following exception:
    Server return code 0x80010000: BSEI_MSG_OutOfMemory.
    I'm attempting to update a field in the main record that points to a flat lookup table.  When calling the update I'm passing the following parameter values:
    IV_OBJECT_TYPE_CODE = 'Catalog'.  //Name of our main table record
    IS_PARAMETER-CODE = <The field code>.
    IS_PARAMETER-VALUE = <Reference to the mdm internal id in the flat lookup table>
    Has anyone encountered the same exception?  If so, what did you do to correct the issue?
    Thanks in advance for any assistance you can offer.
    Best regards,
    James Browning

    Andreas,
    I forgot to mention the OS information in the last email.  Our MDM server installation is running on Windows 2003 server.
    I searched the console logs and had our Basis group searched the OS logs but nothing was found at the times the exception occurred.
    Regards,
    --jtb

  • Database adapter update exception

    I have written BPEL process that polls view for data and sends the data to another database. Till this point it is working good. Then I created partner link to update status of column of base table(XYZ_TABLE) using operation UPDATE has total 90 columns (not view) as UNDER_PROCESS. I did mappings to primary coloum and status of XYZ_TABLE. When i run the process it is throwing below error. Please help resolve this error.
    Exception Description: java.sql.BatchUpdateException: ORA-01401: inserted value
    too large for column
    Process1_1.0.jar/update_status_code.wsdl [ update_status_code_ptt::update(QtmCmger
    tRfqExtnCollection) ] - Could not invoke operation 'update' against the 'Databas
    e Adapter' due to:
    ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    unknown failed. Descriptor name: [unknown].
    Caused by Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 0409
    30)): oracle.toplink.exceptions.DatabaseException
    Exception Description: java.sql.BatchUpdateException: ORA-01401: inserted value
    too large for column
    Internal Exception: java.sql.BatchUpdateException: ORA-01401: inserted value too
    large for column
    Error Code: 1401.
    Message was edited by:
    user514348

    Hi there,
    if you have 90 columns it is very likely that one of these is being passed a value that is too large.
    Unfortunately the inserted value too large for column exception never tells you which column it is, so it is not fun.
    But you can turn on logging to see the exact sql, and the bind values for each column. That should give you a clue.
    To turn on logging go to your bpel console, manage bpel domain -> logging, and set either or both of these two for all dbadapter logging.
    "...activation" DEBUG (inbound polling receive)
    "...ws" DEBUG (outbound insert/select/update invoke)
    Thanks
    Steve

  • JTable - dynamic update exception

    Hi,
    My application displays a JTable based on an extended TableModel.
    The TableModel observes an external source for changes, and updates the internal table data representation accordingly after which it calls
    SwingUtilities.invokeLater( new Runnable()
       public void run()
          fireTableDataChanged()
    })JTable then makes successive calls of TableModel.getValueAt() to repaint the table.
    The problem is that the external source can add/delete rows from the table which JTable is making these calls. Eventually of course I get an exception because getValueAt() runs out of rows in the internal representation.
    Making each TableModel method synchronized doesn't solve the problem because JTable will only lock the TableModel for the duration of the getValueAt() call, allowing the external source to update it in between times.
    I suppose what really needs to happen is a lock on the table model which JTable is updating its view.
    What approaches are other people using to solve this issue?
    Thank you for reading, Dave

    Hi Gweedo,
    Thanks for your response. I agree that as small a change event as possible should be sent.
    Here's a sketch of what I have:
    class MyTableModel extends AbstractTableModel
       usual TableModel methods
       public synchronized Object getValueAt( int row, int col )
       public synchronized void notifyCreate( Record[] records )
          updateInternalModel();
       public synchronized void notifyUpdate( Record[] records )
          updateInternalModel();
       public synchronized void notifyDelete( int[] recordIds )
          updateInternalModel();
    }The create/update/delete methods are called by a short-lived thread. The Record data originates from a CORBA server object, and my GUI application caches it based on the create/update/delete messages. When the server data changes my cache gets CORBA messages like the above, and the cache forwards these to interested objects within the GUI app, one of which is my table. The table does indeed suck the data out of the cache, based on the identity information in the record lists.
    Given this, no matter how small I make the fire...Event grain, I don't really see any way to completely overcome my problem, given that notifyUpdate messages may occur in rapid succession. Unless I can know when the JTable has finished updating itself as a result of a fireTableDataChanged() event there doesn't seem to be any way to avoid the overlap between model and view updates.
    Would you agree? If not would it be possible to post some code to show what you did??

  • UnitOfWork / Update / EXCEPTION [TOPLINK-6004]

    Hello!
    I have an ItemObject which contains ItemLines (ValueHolder, Master-Detail).
    I can update the (standard)Item-Objekt attributes, but how can i set the Itemlines-Object? Should i register the Itemlines-ValueHolder in the UnitOfWork? If this is a ValueHolder-Interface, should i read the collection from the database?
    I get the following exception:
    EXCEPTION [TOPLINK-6004] (TopLink - 9.0.3.2 (Build 429)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: The object [linzag.imds.wdb.bo.model.bean.KnowledgeBranch@50], of class [class linzag.imds.wdb.bo.model.bean.KnowledgeBranch], with identity hashcode (System.identityHashCode()) [80],is not from this UnitOfWork object space, but the parent session's. The object was never registered in this UnitOfWork,but read from the parent session and related to an object registered in the UnitOfWork. Ensure that you are correctly registering your objects. If you are still having problems, you can use the UnitOfWork.validateObjectSpace() method to help debug where the error occurred. For more information, see the manual or FAQ.
    regards
    Harald.

    Harald,
    The simplest solution is to read in and register the ItemObject with a UnitOfWork (TX). Then the traversal of the indirect (ValueHolder) relationship will result in the collection of ItemLine objects automatically being registered.
    At this point you can add, modify, or remove an ItemLine and the UnitOfWork.commit() will capture the change.
    NOTE 1: If you want removal of an ItemLine from the collection to result in its deletion from the database make sure the 1:M relationship is marked as privately owned.
    NOTE 2: For collection relationships such as this you do not need to use a ValueHolder for indirection. TopLink also support transparent indirection of collection relationships.
    Doug

  • Concurrent modification exception. What is causing this?

    Here is my the pasrt of code causing the exception I have put a line comment ti indicate the line where it occurs. In addition I would like to know the cause of this eception as its a first for me.
    Here is the full exception ....
    Exception in thread "AWT-EventQueue-0" java.util.ConcurrentModificationException
            at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:3
    72)
            at java.util.AbstractList$Itr.next(AbstractList.java:343)
            at Contact.modifyExisting(Contact.java:432)
            at Phonebook1.actionPerformed(Phonebook1.java:236)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
    95)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
            at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
            at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicR
    ootPaneUI.java:191)
            at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
            at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
            at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
            at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:2
    16)
            at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.
    java:2926)
            at javax.swing.JComponent.processKeyBindings(JComponent.java:2918)
            at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
            at java.awt.Component.processEvent(Component.java:5815)
            at java.awt.Container.processEvent(Container.java:2058)
            at java.awt.Component.dispatchEventImpl(Component.java:4410)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.ja
    va:1848)
            at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboard
    FocusManager.java:697)
            at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeybo
    ardFocusManager.java:962)
            at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeybo
    ardFocusManager.java:834)
            at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFoc
    usManager.java:661)
            at java.awt.Component.dispatchEventImpl(Component.java:4282)
            at java.awt.Container.dispatchEventImpl(Container.java:2116)
            at java.awt.Window.dispatchEventImpl(Window.java:2429)
            at java.awt.Component.dispatchEvent(Component.java:4240)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:273)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:183)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:173)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)and the code.......
    if(modifiedWork.length()>0)
                             try
                                  modifiedWorkNum = Integer.parseInt(modifiedWork);
                             } //////// THIS IS LINE 372
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        }Thanks in advance...

    Would you mind looking at my modifyExisting method I apologise as it is long. I have icluded a line comment on line 432.
    public void modifyExisting()
         {// Start of modifyExisting()
              int count = 0;
              int count1 = 0;
              int count2 = 0;
              int modifiedCellNum, modifiedWorkNum, modifiedHomeNum = 0;
              boolean validModify = true;
              boolean found = false;
              String currentHome = "";
              String currentWork = "";
              String currentCell = "";
              if(phoneList.size() > 0)
                   String nameOfContactToEdit = JOptionPane.showInputDialog(null,"Please enter the name of the contact you wish to edit details for or press cancel to exit");
                   if(nameOfContactToEdit == null)
                        finish();
                   if(nameOfContactToEdit.trim().length()<= 0)
                        JOptionPane.showMessageDialog(null,"You have entered an invalid name. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                        modifyExisting();
                        validModify = false;
                        return;
                   String surnameOfContactToEdit = JOptionPane.showInputDialog(null,"Please enter the the surname for "+nameOfContactToEdit+" if one exists or press cancel to exit.");
                   if(surnameOfContactToEdit == null)
                        finish();
                   for(Person m: phoneList)
                        m = phoneList.get(count);
                        if((m.name).equals(nameOfContactToEdit.trim().toUpperCase())&&(m.surname).equals(surnameOfContactToEdit.trim().toUpperCase()))
                             currentHome = m.home;
                             currentWork = m.work;
                             currentCell = m.cell;
                             found = true;
                        count ++;
                   if(found == true)
                        String modifiedName = JOptionPane.showInputDialog("Please enter the new name for contact or press cancel to keep it as "+nameOfContactToEdit+".");
                        if(modifiedName == null)
                             modifiedName = nameOfContactToEdit;
                        if(modifiedName.trim().length()<= 0)
                             JOptionPane.showMessageDialog(null,"You have entered an invalid name. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             return;
                        if(modifiedName.trim().length()>10)
                             JOptionPane.showMessageDialog(null,"You may not enter a new name longer than 10 characters long. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             modifyExisting();
                             return;
                        String modifiedSurname = JOptionPane.showInputDialog("Please enter the new surname for contact or press cancel to keep it as "+surnameOfContactToEdit+".");
                        if(modifiedSurname == null)
                             modifiedSurname = surnameOfContactToEdit;
                        if(modifiedSurname.trim().length()>10)
                             JOptionPane.showMessageDialog(null,"You may not enter a surname longer than 10 characters long. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             modifyExisting();
                             return;
                        String modifiedHome = JOptionPane.showInputDialog("Please enter a new home number for "+modifiedName+" or press cancel to keep it as is.");
                        if(modifiedHome == null)
                             modifiedHome = currentHome;
                        if(modifiedHome.length()>0)
                             try
                                  modifiedHomeNum = Integer.parseInt(modifiedHome);
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        if(modifiedHome.length() > 10)
                             JOptionPane.showMessageDialog(null,"You may not enter a number longer than 10 characters long. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        String modifiedWork = JOptionPane.showInputDialog("Please enter a new home number for "+modifiedName+" or press cancel to keep it as is.");
                        if(modifiedHome == null)
                             modifiedWork = currentWork;
                        if(modifiedWork.length()>0)
                             try
                                  modifiedWorkNum = Integer.parseInt(modifiedWork);
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        if(modifiedWork.length() > 10)
                             JOptionPane.showMessageDialog(null,"You may not enter a number longer than 10 characters long. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        String modifiedCell = JOptionPane.showInputDialog("Please enter a new home number for "+modifiedName+" or press cancel to keep it as is.");
                        if(modifiedCell == null)
                             modifiedCell = currentCell;
                        if(modifiedCell.length()>0)
                             try
                                  modifiedCellNum = Integer.parseInt(modifiedCell);
                             catch(Exception e)
                                  JOptionPane.showMessageDialog(null,"You may only enter numbers for a valid phone number to try again press the modify nutton again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  return;
                        if(modifiedCell.length() > 10)
                             JOptionPane.showMessageDialog(null,"You may not enter a number longer than 10 characters long. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        if((modifiedHome.length() <= 0) && (modifiedWork.length() <= 0) && (modifiedCell.length() <= 0))
                             JOptionPane.showMessageDialog(null,"The contact must have at least one number to be included in the phonebook. Please press modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
                             validModify = false;
                             return;
                        for(Person z: phoneList)
                             z = phoneList.get(count1);
                             if((z.name).equals(modifiedName.trim().toUpperCase()) && (z.surname).equals(modifiedSurname.trim().toUpperCase()))
                                  JOptionPane.showMessageDialog(null,"You may not enter duplicate contacts. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
                                  validModify = false;
                                  modifyExisting();
                                  return;
                             count1 ++;
                        if(validModify == true)
                             for(Person contactToMod: phoneList)/////////////////////////////////////////////////////// line 432
                                  contactToMod = phoneList.get(count2);
                                  if((contactToMod.name.equals(nameOfContactToEdit.trim().toUpperCase())) && (contactToMod.surname.equals(surnameOfContactToEdit.trim().toUpperCase())))
                                       try
                                            contactToMod.setName(modifiedName.trim().toUpperCase());
                                            contactToMod.setSurname(modifiedSurname.trim().toUpperCase());
                                            contactToMod.setHome(modifiedHome);
                                            contactToMod.setWork(modifiedWork);
                                            contactToMod.setCell(modifiedCell);
                                            phoneList.add(contactToMod);
                                            JOptionPane.showMessageDialog(null,"Updated contact succesfully.","Information",JOptionPane.INFORMATION_MESSAGE);
                                       catch(Exception e)
                                            JOptionPane.showMessageDialog(null,"The contact was not updated. If probelm persists please contact system administrator.","Error",JOptionPane.ERROR_MESSAGE);
                                  count2 ++;
                   else
                        JOptionPane.showMessageDialog(null,"No contact with that name and surname exists. Please press the modify button to try again.","Error",JOptionPane.ERROR_MESSAGE);
              else
                   JOptionPane.showMessageDialog(null,"The phone list is empty and there are no contacts to modify.","Information Message",JOptionPane.INFORMATION_MESSAGE);
         }// End of modifyExisting()Edited by: Yucca on May 6, 2008 8:12 PM

Maybe you are looking for

  • How to compare date with thr current date

    Hi, I have an inout string which is in date format(dd/mm/yyyy hh:mm:ss) . what i need to do is comparing this date string with the current date. if my input string is less than current date , then display error message.. how to do this? regards

  • OAM 11g R2- Pointing it to differnt DB

    Hi Guys, We are trying to point the oam 11g r2 to a different db, These are the following steps we are trying to follow 1. created a new schema 2.Export the current data 3.Import the current data into new DB 4.Create a new data source 5.Change the da

  • Cystal Reports to Business Objects

    I have couple of reports designed in crystal reports and trying to import them into BO xi.  But these two are in different locations.  Having problem importing them.  BO is on Soalris, Cystal is running on Windows.  Can any body help?  You might need

  • Photoshop Help | Tools

    This question was posted in response to the following article: http://helpx.adobe.com/photoshop/using/tools.html

  • Oops. I just pressed something and can't see my pen points anymore. please help!!!!

    A lot of times when I work in illustor I press some key command and my pen points become invisible, I can't see them along the line. If I randomly select the line, a point will show that I selected. but not others. It is crucial for me to figure this