Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

ConcurrentModificationException while using iterator in PreResultListener.beforeResult(..) method.

Florian Beckmann

2008-11-25


Author LoginPost Reply
Hi all,

I'm new to struts2 (using since 2 weeks) and any help with the following
problem would be appreciated.

Based on the code of DebuggingInterceptor (
http://www.koders.com/java/fidE2D023ADB255C18F527B41456AA4BAAE2BDE3F43.aspx?s=xml#L45 )
I wrote an interceptor which collects statistical data.
Like in the interceptor above the ActionContext's ValueStack is traversed in
an anonymous PreResultListener. When iterating through the collection (debug
says its of type collection com.opensymphony.xwork2.util.CompoundRoot, with
name valueStack[com.opensymphony.xwork2.util.CompoundRoot]) I get a
java.util.ConcurrentModificationException.
Since I have no fields in my interceptor (holding NO state) and I'm not
modifying the Collection/Iterator it must happen in another thread running at
the same time, right? Any Ideas when/how this could happen?

regards
Florian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.