Wicket
  1. Wicket
  2. WICKET-1376

Using AbstractAjaxTimerBehavior and mounting that page gives exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None

      Description

      AbstractAjaxTimerBehavior renders a table every 3 seconds.
      A DataView is used to populate the table.
      I have tried mountBookmarkablePage(), QueryStringUrlCodingStrategy and MixedParamUrlCodingStrategy.

      Root cause:

      java.lang.IllegalStateException: URL fragment has unmatched key/value pair: amp
      at org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:174)
      at org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:76)
      at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:475)
      at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:175)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
      at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:613)

        Activity

        Hide
        Igor Vaynberg added a comment -

        ajax request target now supports repainting of the page - if the page is the same

        Show
        Igor Vaynberg added a comment - ajax request target now supports repainting of the page - if the page is the same
        Hide
        Alex Jacoby added a comment -

        Yesterday I upgraded to 1.3-snapshot from 27 April and I'm still seeing it.

        Show
        Alex Jacoby added a comment - Yesterday I upgraded to 1.3-snapshot from 27 April and I'm still seeing it.
        Hide
        Alex Jacoby added a comment -

        I just got this error for the first time last night on my app, which has been in production for a couple of weeks now. It's not using ajax self-updating behavior, though the page in question does have an ajax auto-complete text field on it.

        The stack trace appears to be virtually identical, so I won't repost it. However, I thought the request log might be useful: you can see how & in the request param gets translated into the url: the page is mounted at "/student", but on a later request it's translated to "/student/amp".

        [09/Apr/2008:21:22:05 -0400] "GET /SummerProgram/student?wicket:interface=:2:regForm:bizAddressBorder:institutionName::IActivePageBehaviorListener:1:&wicket:ignoreIfNotActive=true&q=N&random=0.14365558698773384 HTTP/1.1" 200 1 "http://www.icpsr.umich.edu/SummerProgram/student?" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13"

        [09/Apr/2008:21:22:05 -0400] "GET /SummerProgram/student/amp;wicket:ignoreIfNotActive/true/random/0.14365558698773384/q/N/ HTTP/1.1" 200 8473 "http://www.icpsr.umich.edu/SummerProgram/student?" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13"

        [09/Apr/2008:21:22:05 -0400] "GET /SummerProgram/student/amp;wicket:ignoreIfNotActive/true/random/0.14365558698773384/q/js/safe_onload.js HTTP/1.1" 200 8473 "http://www.icpsr.umich.edu/SummerProgram/student/amp;wicket:ignoreIfNotActive/true/random/0.14365558698773384/q/N/" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13"

        This is on wicket 1.3.1.

        Show
        Alex Jacoby added a comment - I just got this error for the first time last night on my app, which has been in production for a couple of weeks now. It's not using ajax self-updating behavior, though the page in question does have an ajax auto-complete text field on it. The stack trace appears to be virtually identical, so I won't repost it. However, I thought the request log might be useful: you can see how & in the request param gets translated into the url: the page is mounted at "/student", but on a later request it's translated to "/student/amp". [09/Apr/2008:21:22:05 -0400] "GET /SummerProgram/student?wicket:interface=:2:regForm:bizAddressBorder:institutionName::IActivePageBehaviorListener:1:&wicket:ignoreIfNotActive=true&q=N&random=0.14365558698773384 HTTP/1.1" 200 1 "http://www.icpsr.umich.edu/SummerProgram/student?" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13" [09/Apr/2008:21:22:05 -0400] "GET /SummerProgram/student/amp;wicket:ignoreIfNotActive/true/random/0.14365558698773384/q/N/ HTTP/1.1" 200 8473 "http://www.icpsr.umich.edu/SummerProgram/student?" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13" [09/Apr/2008:21:22:05 -0400] "GET /SummerProgram/student/amp;wicket:ignoreIfNotActive/true/random/0.14365558698773384/q/js/safe_onload.js HTTP/1.1" 200 8473 "http://www.icpsr.umich.edu/SummerProgram/student/amp;wicket:ignoreIfNotActive/true/random/0.14365558698773384/q/N/" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13" This is on wicket 1.3.1.
        Hide
        Johan Compagner added a comment -

        yeah self updating page doesn't make much sense.
        If you do that we could just send a redirect to that page so that it refreshes the complete page..

        Show
        Johan Compagner added a comment - yeah self updating page doesn't make much sense. If you do that we could just send a redirect to that page so that it refreshes the complete page..
        Hide
        Gerolf Seitz added a comment -

        i couldn't reproduce the illegalargumentexception with the clock example.
        however, adding a page to the ajaxrequesttarget doesn't work anyways.

        we could check whether the component is a page and then instead of
        adding the page to the target, add it's children (via addChildren).
        but this probably fails in most situations, as all children would have to
        have called .setOutputMarkupId(true).
        but maybe we can add check and just ignore those?

        Show
        Gerolf Seitz added a comment - i couldn't reproduce the illegalargumentexception with the clock example. however, adding a page to the ajaxrequesttarget doesn't work anyways. we could check whether the component is a page and then instead of adding the page to the target, add it's children (via addChildren). but this probably fails in most situations, as all children would have to have called .setOutputMarkupId(true). but maybe we can add check and just ignore those?
        Hide
        Oliver Krohne added a comment -

        Hi,

        I can not extract a test case from my project but I could reproduce it
        with the clock example from:
        http://wicketstuff.org/wicket13/ajax/clock.1

        I changed in ClockPage.java

        //clock.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));
        this.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5)));

        In the wicket application i mounted;
        mountBookmarkablePage("/clock", ClockPage.class);

        I seems to be an issue if the entire page has the AjaxSelfUpdatingTimerBehavior .

        Show
        Oliver Krohne added a comment - Hi, I can not extract a test case from my project but I could reproduce it with the clock example from: http://wicketstuff.org/wicket13/ajax/clock.1 I changed in ClockPage.java //clock.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); this.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); In the wicket application i mounted; mountBookmarkablePage("/clock", ClockPage.class); I seems to be an issue if the entire page has the AjaxSelfUpdatingTimerBehavior .
        Hide
        Johan Compagner added a comment -

        do you have a testcase?

        Show
        Johan Compagner added a comment - do you have a testcase?

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Oliver Krohne
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development