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

NumberFormatException with UrlCompressingWebRequestProcessor in WicketTester

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0-beta3
    • 1.3.5, 1.4-RC1
    • wicket
    • None
    • Wicket 1.3.0 from Trunk
      JDK 6

    Description

      In my Application I use UrlCompressingWebRequestProcessor. Now I have a JUnit test case with WicketTester and that Application like this:

      tester.startPage(new ITestPageSource() {
      public Page getTestPage()

      { PageParameters params = new PageParameters(); params.add("0", "param"); return new MyPage(params); }

      });

      I get an Exception:

      java.lang.NumberFormatException: For input string: "testPage"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:447)
      at java.lang.Integer.parseInt(Integer.java:497)
      at org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:124)
      at org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:81)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
      at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
      at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:381)
      at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:368)
      at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:239)
      at org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:224)

      I could work around this by using WebRequestCycleProcessor for my testing-application.

      Attachments

        Issue Links

          Activity

            People

              ivaynberg Igor Vaynberg
              mindhaq RĂ¼diger Schulz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: