Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-823

ConcurrentModificationException in HTMLDescriptionReceiver

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.1.1
    • Framework
    • None

    Description

      From the mailing list:

      This apparently resulted from HTMLDescriptionReceiver touching a previously uncached expression when calling ExpressionCache.getCompiledExpression().

      The easy solution looks like the right one: modify line 345 of HTMLDescriptionReceiver.java from this:

      Iterator i = values.iterator();

      ...to this:

      Iterator i = new ArrayList(values).iterator();

      Then the reporter will only print expressions that were cached at the time the report was started, ignoring any new additions to the caches during the report.

      Cheers,

      Paul

      ------------------------------------------------------------------------------------------------

      On Dec 27, 2005, at 10:48 AM, Jan Normann Nielsen wrote:

      Hello

      I hereby present a nasty stack trace I just received from Tapestry 4.0-rc2. Seems to be a concurrency issue, so it is hard (if not impossible) to reproduce. Should this be files as an issue?

      Best wishes,
      Jan

      18:44:10,707 WARN [jetty] WARNING: Exception for /tapestry-test/app?page=DialogPageIframe&service=external&sp=SJzYPopWCUU
      org.apache.hivemind.ApplicationRuntimeException [classpath:/org/apache/tapestry/pages/Exception.page, line 22, column 65]
      at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:64)
      at $ExceptionPresenter_1086d518509.presentException($ExceptionPresenter_1086d518509.java)
      at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
      at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
      at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
      at $WebRequestServicer_1086d518563.service($WebRequestServicer_1086d518563.java)
      at $WebRequestServicer_1086d51855f.service($WebRequestServicer_1086d51855f.java)
      at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
      at $ServletRequestServicer_1086d518543.service($ServletRequestServicer_1086d518543.java)
      at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
      at $ServletRequestServicerFilter_1086d51853f.service($ServletRequestServicerFilter_1086d51853f.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
      at $ServletRequestServicerFilter_1086d51853d.service($ServletRequestServicerFilter_1086d51853d.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      at $ServletRequestServicerFilter_1086d518541.service($ServletRequestServicerFilter_1086d518541.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at $ServletRequestServicer_1086d518537.service($ServletRequestServicer_1086d518537.java)
      at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
      at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
      Caused by: org.apache.hivemind.ApplicationRuntimeException [classpath:/org/apache/tapestry/pages/Exception.page, line 22, column 65]
      at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:380)
      at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:71)
      at $ResponseRenderer_1086d518519.renderResponse($ResponseRenderer_1086d518519.java)
      at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:46)
      ... 39 more
      Caused by: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
      at java.util.HashMap$KeyIterator.next(HashMap.java:818)
      at org.apache.tapestry.describe.HTMLDescriptionReceiver.collection(HTMLDescriptionReceiver.java:361)
      at org.apache.tapestry.event.ReportStatusEvent.collection(ReportStatusEvent.java:52)
      at org.apache.tapestry.services.impl.ExpressionCacheImpl.reportStatus(ExpressionCacheImpl.java:49)
      at org.apache.tapestry.describe.ReportStatusHubImpl.fireReportStatus(ReportStatusHubImpl.java:67)
      at $ReportStatusHub_1086d518577.fireReportStatus($ReportStatusHub_1086d518577.java)
      at org.apache.tapestry.html.RequestDisplay$2.render(RequestDisplay.java:130)
      at org.apache.tapestry.components.Delegator.renderComponent(Delegator.java:44)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
      at org.apache.tapestry.html.Shell.renderComponent(Shell.java:114)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
      at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:366)
      ... 42 more
      getRootCause():
      org.apache.hivemind.ApplicationRuntimeException [classpath:/org/apache/tapestry/pages/Exception.page, line 22, column 65]
      at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:380)
      at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:71)
      at $ResponseRenderer_1086d518519.renderResponse($ResponseRenderer_1086d518519.java)
      at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:46)
      at $ExceptionPresenter_1086d518509.presentException($ExceptionPresenter_1086d518509.java)
      at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
      at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
      at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
      at $WebRequestServicer_1086d518563.service($WebRequestServicer_1086d518563.java)
      at $WebRequestServicer_1086d51855f.service($WebRequestServicer_1086d51855f.java)
      at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
      at $ServletRequestServicer_1086d518543.service($ServletRequestServicer_1086d518543.java)
      at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
      at $ServletRequestServicerFilter_1086d51853f.service($ServletRequestServicerFilter_1086d51853f.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
      at $ServletRequestServicerFilter_1086d51853d.service($ServletRequestServicerFilter_1086d51853d.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      at $ServletRequestServicerFilter_1086d518541.service($ServletRequestServicerFilter_1086d518541.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at $ServletRequestServicer_1086d518537.service($ServletRequestServicer_1086d518537.java)
      at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
      at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
      Caused by: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
      at java.util.HashMap$KeyIterator.next(HashMap.java:818)
      at org.apache.tapestry.describe.HTMLDescriptionReceiver.collection(HTMLDescriptionReceiver.java:361)
      at org.apache.tapestry.event.ReportStatusEvent.collection(ReportStatusEvent.java:52)
      at org.apache.tapestry.services.impl.ExpressionCacheImpl.reportStatus(ExpressionCacheImpl.java:49)
      at org.apache.tapestry.describe.ReportStatusHubImpl.fireReportStatus(ReportStatusHubImpl.java:67)
      at $ReportStatusHub_1086d518577.fireReportStatus($ReportStatusHub_1086d518577.java)
      at org.apache.tapestry.html.RequestDisplay$2.render(RequestDisplay.java:130)
      at org.apache.tapestry.components.Delegator.renderComponent(Delegator.java:44)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
      at org.apache.tapestry.html.Shell.renderComponent(Shell.java:114)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
      at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:366)
      ... 42 more
      getRootCause():
      java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
      at java.util.HashMap$KeyIterator.next(HashMap.java:818)
      at org.apache.tapestry.describe.HTMLDescriptionReceiver.collection(HTMLDescriptionReceiver.java:361)
      at org.apache.tapestry.event.ReportStatusEvent.collection(ReportStatusEvent.java:52)
      at org.apache.tapestry.services.impl.ExpressionCacheImpl.reportStatus(ExpressionCacheImpl.java:49)
      at org.apache.tapestry.describe.ReportStatusHubImpl.fireReportStatus(ReportStatusHubImpl.java:67)
      at $ReportStatusHub_1086d518577.fireReportStatus($ReportStatusHub_1086d518577.java)
      at org.apache.tapestry.html.RequestDisplay$2.render(RequestDisplay.java:130)
      at org.apache.tapestry.components.Delegator.renderComponent(Delegator.java:44)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
      at org.apache.tapestry.html.Shell.renderComponent(Shell.java:114)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
      at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
      at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:366)
      at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:71)
      at $ResponseRenderer_1086d518519.renderResponse($ResponseRenderer_1086d518519.java)
      at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:46)
      at $ExceptionPresenter_1086d518509.presentException($ExceptionPresenter_1086d518509.java)
      at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
      at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
      at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
      at $WebRequestServicer_1086d518563.service($WebRequestServicer_1086d518563.java)
      at $WebRequestServicer_1086d51855f.service($WebRequestServicer_1086d51855f.java)
      at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
      at $ServletRequestServicer_1086d518543.service($ServletRequestServicer_1086d518543.java)
      at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
      at $ServletRequestServicerFilter_1086d51853f.service($ServletRequestServicerFilter_1086d51853f.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
      at $ServletRequestServicerFilter_1086d51853d.service($ServletRequestServicerFilter_1086d51853d.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
      at $ServletRequestServicerFilter_1086d518541.service($ServletRequestServicerFilter_1086d518541.java)
      at $ServletRequestServicer_1086d518545.service($ServletRequestServicer_1086d518545.java)
      at $ServletRequestServicer_1086d518537.service($ServletRequestServicer_1086d518537.java)
      at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
      at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
      at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
      at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)

      Attachments

        Activity

          People

            Unassigned Unassigned
            melquiades Paul Cantrell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: