You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Attila Király (JIRA)" <ji...@apache.org> on 2011/04/06 15:35:05 UTC

[jira] [Created] (WICKET-3599) When resource responds with 404 custom error page rendering fails

When resource responds with 404 custom error page rendering fails
-----------------------------------------------------------------

                 Key: WICKET-3599
                 URL: https://issues.apache.org/jira/browse/WICKET-3599
             Project: Wicket
          Issue Type: Bug
          Components: wicket-core
    Affects Versions: 1.5-RC3
            Reporter: Attila Király


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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3599) When resource responds with 404 custom error page rendering fails

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3599:
------------------------------------

    Attachment: wicket-3599.patch

A patch that fixes the problem.

> When resource responds with 404 custom error page rendering fails
> -----------------------------------------------------------------
>
>                 Key: WICKET-3599
>                 URL: https://issues.apache.org/jira/browse/WICKET-3599
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Attila Király
>         Attachments: wicket-3599.patch, wicket-404-page.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3599) When resource responds with 404 custom error page rendering fails

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3599.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4
         Assignee: Martin Grigorov

Fixed with r1090625.

> When resource responds with 404 custom error page rendering fails
> -----------------------------------------------------------------
>
>                 Key: WICKET-3599
>                 URL: https://issues.apache.org/jira/browse/WICKET-3599
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Attila Király
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC4
>
>         Attachments: wicket-3599.patch, wicket-404-page.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3599) When resource responds with 404 custom error page rendering fails

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017814#comment-13017814 ] 

Martin Grigorov commented on WICKET-3599:
-----------------------------------------

The problem is in org.apache.wicket.protocol.http.servlet.ServletWebRequest.getUrl(HttpServletRequest, String)
Here javax.servlet.http.HttpServletRequest.getRequestURI() returns "/404" and javax.servlet.http.HttpServletRequest.getQueryString() returns "0-IResourceListener-foo".
I'm still not sure why the query string is preserved by the web container (Jetty).

> When resource responds with 404 custom error page rendering fails
> -----------------------------------------------------------------
>
>                 Key: WICKET-3599
>                 URL: https://issues.apache.org/jira/browse/WICKET-3599
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Attila Király
>         Attachments: wicket-404-page.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3599) When resource responds with 404 custom error page rendering fails

Posted by "Attila Király (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Király updated WICKET-3599:
----------------------------------

    Attachment: wicket-404-page.zip

Attaching example maven project. Steps to repro:
1. Compile & deploy to servlet container
2. Visit http://localhost:8080/wicket-404-page/

This should result in an exception on the server side.

I see there was a similar issue not long ago: WICKET-3551.

> When resource responds with 404 custom error page rendering fails
> -----------------------------------------------------------------
>
>                 Key: WICKET-3599
>                 URL: https://issues.apache.org/jira/browse/WICKET-3599
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Attila Király
>         Attachments: wicket-404-page.zip
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira