Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4973

AbstractRequestLogger - infinite ArrayIndexOutOfBoundsException when requestWindow size is 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.3.0
    • 6.5.0
    • wicket

    Description

      On our production-system we discovered an issue:
      We saw this stacktrace in our logs (at the end of every request):

      13-01-13 16:59:33 ERROR - RequestCycle - Exception occurred during onEndRequest
      java.lang.ArrayIndexOutOfBoundsException: -1
      at org.apache.wicket.protocol.http.AbstractRequestLogger.hasBufferRolledOver(AbstractRequestLogger.java:185)
      at org.apache.wicket.protocol.http.AbstractRequestLogger.resizeBuffer(AbstractRequestLogger.java:448)
      at org.apache.wicket.protocol.http.AbstractRequestLogger.addRequest(AbstractRequestLogger.java:339)
      at org.apache.wicket.protocol.http.CobraRequestLogger.addRequest(CobraRequestLogger.java:40)
      at org.apache.wicket.protocol.http.AbstractRequestLogger.requestTime(AbstractRequestLogger.java:246)
      at org.apache.wicket.Application$2.onEndRequest(Application.java:1640)
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$2.notify(RequestCycleListenerCollection.java:85)
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$2.notify(RequestCycleListenerCollection.java:81)
      at org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:144)
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onEndRequest(RequestCycleListenerCollection.java:80)
      at org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:596)
      at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:558)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:285)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at nl.topicus.cobra.hibernate.CloseTransactionAfterViewFilter.doFilterInternal(CloseTransactionAfterViewFilter.java:65)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)

      Apparently our requestWindow array was initialized with size 0. Problem is, when trying to resize it to a larger size, an ArrayIndexOutOfBoundsException occurs, so resizing fails (and because of that it tries to resize it on every request...)

      The problem disappears (and sometimes returns) when restarting the application.

      Attachments

        Issue Links

          Activity

            People

              papegaaij Emond Papegaaij
              michiel.korthuis@topicus.nl Michiel Korthuis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: