容器的并发错误

在对Map集合进行操作的过程中出现以下错误。

错误的原因 : 当方法检测到对象的并发修改,但不允许这种修改时,抛出此异常。

        例如:一边对集合进行迭代,一边将集合中的某个值移出。

java.util.ConcurrentModificationException
 java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)
 java.util.HashMap$KeyIterator.next(HashMap.java:823)
 org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:366)
 com.digione.club.operation.PackOperation.PackReplace(PackOperation.java:40)
 com.digione.club.web.action.DigioneAction.pack(DigioneAction.java:185)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
 org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
 org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
 org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 com.digione.club.util.MyFilter.doFilter(MyFilter.java:26)

posted @ 2008-09-26 14:55  枣阳人在深圳  阅读(530)  评论(0编辑  收藏  举报