1 Reply Latest reply on Jun 26, 2003 1:08 AM by jonlee

    java.util.ConcurrentModificationException

    wahart27613

      I get the following error using JBoss-2.4.8_Tomcat-4.0.4

      Does anyone have a clue on what might be causing this?

      ----- ERROR WRITTEN BELOW THIS LINE-----

      [INFO,STDOUT] 3642225 [HttpProcessor[8080][2]] ERROR org.jboss.web.localhost.Engine - ApplicationDispatcher[/rlms] Servlet.service() for servlet jsp threw
      exception
      java.util.ConcurrentModificationException
      at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
      at java.util.AbstractList$Itr.next(AbstractList.java:421)
      at org.apache.struts.taglib.logic.IterateTag.doAfterBody(IterateTag.java:420)
      at org.apache.jsp.createLabKitBody$jsp._jspService(createLabKitBody$jsp.java:1120)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
      at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:118)
      at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:161)
      at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:703)
      at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:818)
      at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:467)
      at org.apache.jsp.rlmsLayout$jsp._jspService(rlmsLayout$jsp.java:155)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:

        • 1. Re: java.util.ConcurrentModificationException
          jonlee

          I don't know the specific source of the problem as you'd need to trap it at the tag/servlet level. It looks like it is Struts related. The iterator used for accessing/consuming a collection is throwing an exception because the source collection is being modified before the iterator is finished with the collection.

          For example:
          List list = new ArrayList(Arrays.asList(args));
          Iterator i = list.iterator();
          while(i.hasNext())
          {
          System.out.println(i.next());
          list.add("Add");
          }

          This example throws this type of exception. I'm sure you will be able to recognise it when you see it. Otherwise, if it is embedded in the Struts tag, you may want to check for any Strut bug fixes/bug reports.