1 Reply Latest reply on Oct 7, 2011 9:43 AM by leo li

    ConcurrentModificationException Error when deploying the struts1.3.5 application on Jboss 7

    leo li Newbie

      Dear all,

      Please help us to reslove this problem.  And the application are working fine in the Websphere Appolication 7, and we want to migrate them to Jboss7.

       

      We have some user define taglib which is a  sub class of the "NestedIterateTag" (org.apache.struts.taglib.nested.logic.NestedIterateTag) in a struts1.3.5  application on Jboss 7.

       

      The jsp page are working fine on our first click in the page, but it will faild when we click the page again.

       

      The error are following:

      Servlet.service() for servlet action threw exception: java.util.ConcurrentModificationException

      at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372) [:1.6.0_13]

          at java.util.AbstractList$Itr.next(AbstractList.java:343) [:1.6.0_13]

          at org.apache.struts.taglib.logic.IterateTag.doAfterBody(IterateTag.java:377) [struts-taglib-1.3.5.jar:]

          at org.apache.struts.taglib.nested.logic.NestedIterateTag.doAfterBody(NestedIterateTag.java:124) [struts-taglib-1.3.5.jar:]

          at .******..****.taglib.dataset.RowTemplateTag.doAfterBody(RowTemplateTag.java:52) [classes:]

          at org.apache.jsp.fw.jsp.acl.manageFunctionLeaf_jsp._jspService(manageFunctionLeaf_jsp.java:765)

          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:541) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:479) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:407) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:99) [struts-core-1.3.5.jar:]

          at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:82) [struts-core-1.3.5.jar:]

          at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:51) [struts-core-1.3.5.jar:]

          at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48) [struts-core-1.3.5.jar:]

          at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [commons-chain-1.1.jar:]

          at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) [commons-chain-1.1.jar:]

          at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [commons-chain-1.1.jar:]

          at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280) [struts-core-1.3.5.jar:]

          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858) [struts-core-1.3.5.jar:]

          at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446) [struts-core-1.3.5.jar:]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at crown.fw.filter.authorization.AccessControlFilter.checkAccessPermissions(AccessControlFilter.java:285) [classes:]

          at crown.fw.filter.authorization.AccessControlFilter.doFilter(AccessControlFilter.java:187) [classes:]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]

          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.1.Final]

          at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]

        • 1. Re: ConcurrentModificationException Error when deploying the struts1.3.5 application on Jboss 7
          leo li Newbie

          Here is our Customizing taglib structure:

           

          public class RowTemplateTag extends NestedIterateTag {

                ......

                 protected int intRowCount;   // At the frist time of the tag invoking ,the intRowCount init number is "0" , but when we access to the page at the secound time it cannot be reset, still kept the last number, eg. the last have 5 row, so the intRowCount=4;

           

                 public int getIntRowCount() {

                    return intRowCount;

                 }

           

                 public void set(int i) {

                   intRowCount = i;

                 }

           

                public final  int doAfterBody() throws JspException {

                     int i = super.doAfterBody();

                        .....

                     intRowCount++;

                      .....

                    return i;

                }

           

                public final int doEndTag() throws JspException {

                   .....

                   

                   return super.doEndTag();

                }

           

                 public int doStartTag() throws JspException {

                       .....

                      return super.doStartTag();

                 }

           

                 public void release() {

                     intRowCount=0;// After I add the manually release for it ,it's working fine. In the Websphere 7 , we no need to release this manually,it might be some different between application server, but I still want know about the reason, please help.

                     super.release();

                  }

          }