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

When resource responds with 404 custom error page rendering fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC3
    • 1.5-RC4
    • wicket
    • None

    Description

      I have a webapp where the 404 error page is rendered by wicket. The home page contains an image with a dynamic resource. When the resource responds with 404, wicket throws the following exception:

      org.apache.wicket.DefaultExceptionMapper - Unexpected error occurred
      org.apache.wicket.request.handler.ComponentNotFoundException: Could not find component 'foo' on page 'class wicket.NotFoundPage
      at org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:167)
      at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:81)
      at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:142)
      at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:715)
      at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
      at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
      at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)

      "foo" is the id of the dynamic image on the HomePage, NotFoundPage is the 404 page. It seems wicket is mixing up the component hierarchy and the markup in this case.

      Attachments

        1. wicket-3599.patch
          0.9 kB
          Martin Tzvetanov Grigorov
        2. wicket-404-page.zip
          6 kB
          Attila Király

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              akiraly Attila Király
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: