Paul, Thanks I had seen the exception javadoc. An in one of my subordinate methods I do have a logging snippet that uses an Iterator to display ALL of the contents of the ActionErrors. And I imagine that my subsequent use of the ActionErrors.add(ActionErrors) method also uses an Iterator to enumerate the ActionError objects. Is there anyway to "close" the first Iterator so that it does not cause this conflict?
Thanks again - Richard -----Original Message----- From: Paul-J Woodward [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 31, 2003 8:51 AM To: Struts Users Mailing List Subject: Re: ConcurrentModificationException on ActionErrors I don't know what is causing the exact error from your code snippet, but a ConcurrentModificationException is thrown when you try to modify a list on which you have an iterator. See here: http://java.sun.com/j2se/1.4.1/docs/api/java/util/ConcurrentModificationException.html Paul ------------------------------------------------------------ Global Equity Derivatives Technology Deutsche Bank [/] Office +44 (0)20 754 55458 Mobile +44 (0)7736 299483 Fax +44 (0)20 7547 2752 ------------------------------------------------------------ "Richard Mixon (qwest)" To: "Struts Users Mailing List" <[EMAIL PROTECTED]> <[EMAIL PROTECTED] cc: iz> Subject: ConcurrentModificationException on ActionErrors 31/12/2003 15:36 Please respond to "Struts Users Mailing List" I have a Struts action that is trying to show all of the errors that might occur from either or both of two subordinate methods. The code looks like: ... ActionErrors errors = new ActionErrors(); ActionErrors errors1 = null; ActionErrors errors2 = null; Obj1 obj1 = new Obj1(); Obj2 obj2 = new Obj2(); obj1.method1(); errors1 = obj1.getErrors(); if (!errors1.isEmpty()) { errors.add(errors1); } obj2.method2(); errors2 = obj2.getErrors(); if (!errors2.isEmpty()) { errors.add(errors1); } ... Problem is I get the ConcurrentModificationException when I try and do either of the "errors.add" methods above. Methods method1/method2 are pretty vanilla, just doing some database work and accumulating any errors in an associated ActionErrors. I've searched the archives but only found one or two references to ConcurrentModificationException and they did not involve ActionErrors. Any ideas or help is appreciated. - Richard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]