Wicket
  1. Wicket
  2. WICKET-928

Exception when clicking two times rapidly on the "next" button in a wizard

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3.0-beta2, 1.3.0-beta3
    • Fix Version/s: 1.3.5
    • Component/s: wicket-extensions
    • Labels:
      None

      Description

      On a tree steps wizard, the first step contains two fields without any validation. The second one contains only one field that must be an integer. The last step will display the data entered in the two first steps.
      When I am on the first step, and I click two times rapidly on the "next" button, it throws an exception.
      Here is the stack trace :

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

      WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form, page = test.www.factory.TestPage, path = 0:wizard:form.Form, isVisible = true, isVersioned = false]] threw an exception

      Root cause:

      java.lang.NullPointerException
      at org.apache.wicket.util.convert.converters.AbstractConverter.parse(AbstractConverter.java:50)
      at org.apache.wicket.util.convert.converters.AbstractNumberConverter.parse(AbstractNumberConverter.java:71)
      at org.apache.wicket.util.convert.converters.IntegerConverter.convertToObject(IntegerConverter.java:44)
      at org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1159)
      at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1027)
      at org.apache.wicket.markup.html.form.Form$15.validate(Form.java:1671)
      at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:160)
      at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:403)
      at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
      at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
      at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:390)
      at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:368)
      at org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1004)
      at org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1667)
      at org.apache.wicket.markup.html.form.Form.validate(Form.java:1658)
      at org.apache.wicket.markup.html.form.Form.process(Form.java:811)
      at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:783)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:186)
      at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)
      at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:144)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
      at java.lang.Thread.run(Thread.java:595)

      Complete stack:

      org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = form, page = test.www.factory.TestPage, path = 0:wizard:form.Form, isVisible = true, isVersioned = false]] threw an exception
      at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:197)
      at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)

      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:186)
      at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
      at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1032)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:261)

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

      The first click on "next" seems to make the wizard go into the second step but the second click sends a request from the first step, which is not correct with the actual state of the wizard...
      Am I clear?

      Please find enclosed a sample of code to reproduce the bug.

      1. Apache.tar.gz
        3.43 MB
        Joël Vimenet

        Activity

        Hide
        Joël Vimenet added a comment -

        Code to reproduce the bug

        Show
        Joël Vimenet added a comment - Code to reproduce the bug
        Hide
        Eelco Hillenius added a comment -

        bulk set issues to next version. I only did a quick check (and filtered some out for 1.3.1), but we can always bump em again.

        Show
        Eelco Hillenius added a comment - bulk set issues to next version. I only did a quick check (and filtered some out for 1.3.1), but we can always bump em again.
        Hide
        Igor Vaynberg added a comment -

        could not reproduce with latest 1.3.x

        Show
        Igor Vaynberg added a comment - could not reproduce with latest 1.3.x

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Joël Vimenet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development