You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jim Smart (JIRA)" <ji...@apache.org> on 2010/02/15 04:55:27 UTC

[jira] Created: (TAP5-1017) npe thrown when attempting to load missing asset

npe thrown when attempting to load missing asset
------------------------------------------------

                 Key: TAP5-1017
                 URL: https://issues.apache.org/jira/browse/TAP5-1017
             Project: Tapestry 5
          Issue Type: Bug
    Affects Versions: 5.2.0
            Reporter: Jim Smart
            Priority: Minor


if i do the following:-

<img src="${context:/}this-image/is-missing.jpg"/>

and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-

2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
java.lang.NullPointerException
	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Jim Smart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833693#action_12833693 ] 

Jim Smart commented on TAP5-1017:
---------------------------------

i am defining my custom 404 page with the following web.xml fragment:-

    <filter-mapping>
        <filter-name>app</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    
    <error-page>
        <error-code>404</error-code>
        <location>/error/Http404NotFound</location>
    </error-page>

the page at /error/Http404NotFound is a tapestry class+tml page pair - it loads ok when referenced directly.

if i remove the <dispatcher> tags and the <error-page> tag, i do not get an exception in my console when a 404 is thrown by a missing asset (or similar).

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833793#action_12833793 ] 

Thiago H. de Paula Figueiredo commented on TAP5-1017:
-----------------------------------------------------

<img src="${context:/}this-image/is-missing.jpg"/> should be <img src="${context:/this-image/is-missing.jpg}"/>. Note the last curly parenthesis placement.

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Christophe Cordenier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833732#action_12833732 ] 

Christophe Cordenier commented on TAP5-1017:
--------------------------------------------

Actually, the exception is not related to asset discovery but is due to filter dispatcher strategy :

  <dispatcher>REQUEST</dispatcher>
  <dispatcher>ERROR</dispatcher>

My advice is to use a plain HTML page for Http error files.

BTW, I think this is due to PER_THREAD scope of request service. Redispatch the error page request to Tapestry filter causes a new proxy to be created, but the cleanup that is done at the end of loses the reference on the previous request instance...

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833793#action_12833793 ] 

Thiago H. de Paula Figueiredo commented on TAP5-1017:
-----------------------------------------------------

<img src="${context:/}this-image/is-missing.jpg"/> should be <img src="${context:/this-image/is-missing.jpg}"/>. Note the last curly parenthesis placement.

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Jim Smart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833958#action_12833958 ] 

Jim Smart commented on TAP5-1017:
---------------------------------

@Thiago:

> Note the last curly parenthesis placement.

thanks -- the example i gave is just a simplified test case based upon the actual usage case where the url / filepath is pulled from the db - our actual code is more akin to:-

<img src="${context:/}${image.url}"/>

...which works well - and is shorter and simpler than the other solutions we've looked at for doing the same thing.

@Christophe:-

thanks -- i realised it wasn't a problem with assets and updated my description somewhat, but i hadn't seen your existing bug. i've added a watch on TAP5-986 :)

> My advice is to use a plain HTML page for Http error files. 

we're converting an existing jsp app which serves a 404 if a requested product-page refers to a product that has since been removed from the db - to lose the dynamic content on the page in that situation and to simply serve a static page is something of a problem, as we often see a good conversion rate if we show special offers and/or related products on this page.

error pages with dynamic content are a useful tool - it would be a real shame to lose them here.

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1017) npe thrown when using custom 404 page

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

Jim Smart updated TAP5-1017:
----------------------------

    Description: 
when i have a custom 404 page, if i do the following:-

<img src="${context:/}this-image/is-missing.jpg"/>

and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-

2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
java.lang.NullPointerException
	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"


  was:
if i do the following:-

<img src="${context:/}this-image/is-missing.jpg"/>

and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-

2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
java.lang.NullPointerException
	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"


        Summary: npe thrown when using custom 404 page  (was: npe thrown when attempting to load missing asset)

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Jim Smart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833958#action_12833958 ] 

Jim Smart commented on TAP5-1017:
---------------------------------

@Thiago:

> Note the last curly parenthesis placement.

thanks -- the example i gave is just a simplified test case based upon the actual usage case where the url / filepath is pulled from the db - our actual code is more akin to:-

<img src="${context:/}${image.url}"/>

...which works well - and is shorter and simpler than the other solutions we've looked at for doing the same thing.

@Christophe:-

thanks -- i realised it wasn't a problem with assets and updated my description somewhat, but i hadn't seen your existing bug. i've added a watch on TAP5-986 :)

> My advice is to use a plain HTML page for Http error files. 

we're converting an existing jsp app which serves a 404 if a requested product-page refers to a product that has since been removed from the db - to lose the dynamic content on the page in that situation and to simply serve a static page is something of a problem, as we often see a good conversion rate if we show special offers and/or related products on this page.

error pages with dynamic content are a useful tool - it would be a real shame to lose them here.

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Ulrich Stärk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ulrich Stärk resolved TAP5-1017.
--------------------------------

    Resolution: Duplicate

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Christophe Cordenier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833732#action_12833732 ] 

Christophe Cordenier commented on TAP5-1017:
--------------------------------------------

Actually, the exception is not related to asset discovery but is due to filter dispatcher strategy :

  <dispatcher>REQUEST</dispatcher>
  <dispatcher>ERROR</dispatcher>

My advice is to use a plain HTML page for Http error files.

BTW, I think this is due to PER_THREAD scope of request service. Redispatch the error page request to Tapestry filter causes a new proxy to be created, but the cleanup that is done at the end of loses the reference on the previous request instance...

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Ulrich Stärk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ulrich Stärk resolved TAP5-1017.
--------------------------------

    Resolution: Duplicate

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TAP5-1017) npe thrown when using custom 404 page

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

Jim Smart updated TAP5-1017:
----------------------------

    Description: 
when i have a custom 404 page, if i do the following:-

<img src="${context:/}this-image/is-missing.jpg"/>

and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-

2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
java.lang.NullPointerException
	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"


  was:
if i do the following:-

<img src="${context:/}this-image/is-missing.jpg"/>

and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-

2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
java.lang.NullPointerException
	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"


        Summary: npe thrown when using custom 404 page  (was: npe thrown when attempting to load missing asset)

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-1017) npe thrown when using custom 404 page

Posted by "Jim Smart (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833693#action_12833693 ] 

Jim Smart commented on TAP5-1017:
---------------------------------

i am defining my custom 404 page with the following web.xml fragment:-

    <filter-mapping>
        <filter-name>app</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    
    <error-page>
        <error-code>404</error-code>
        <location>/error/Http404NotFound</location>
    </error-page>

the page at /error/Http404NotFound is a tapestry class+tml page pair - it loads ok when referenced directly.

if i remove the <dispatcher> tags and the <error-page> tag, i do not get an exception in my console when a 404 is thrown by a missing asset (or similar).

> npe thrown when using custom 404 page
> -------------------------------------
>
>                 Key: TAP5-1017
>                 URL: https://issues.apache.org/jira/browse/TAP5-1017
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Jim Smart
>            Priority: Minor
>
> when i have a custom 404 page, if i do the following:-
> <img src="${context:/}this-image/is-missing.jpg"/>
> and the referenced image does not exist, i would expect a silent failure / 404 - instead a null pointer exception like this is thrown in my ide console:-
> 2010-02-15 03:45:10.005:WARN::/test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg
> java.lang.NullPointerException
> 	at $Request_126cfa1aad7.getSession($Request_126cfa1aad7.java)
> 	at $Request_126cfa1aaa7.getSession($Request_126cfa1aaa7.java)
> 	at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35)
> 	at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40)
> 	at $EndOfRequestEventHub_126cfa1aaaa.fire($EndOfRequestEventHub_126cfa1aaaa.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:917)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:903)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_126cfa1aac5.service($RequestHandler_126cfa1aac5.java)
> 	at $RequestHandler_126cfa1aabb.service($RequestHandler_126cfa1aabb.java)
> 	at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:239)
> 	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> 	at $HttpServletRequestFilter_126cfa1aaba.service($HttpServletRequestFilter_126cfa1aaba.java)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:856)
> 	at $HttpServletRequestHandler_126cfa1aabd.service($HttpServletRequestHandler_126cfa1aabd.java)
> 	at $HttpServletRequestHandler_126cfa1aab8.service($HttpServletRequestHandler_126cfa1aab8.java)
> 	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> 0:0:0:0:0:0:0:1%0 -  -  [15/Feb/2010:03:45:09 +0000] "GET /test/assets/ctx/86d986cfc5124bd4/this-image/is-missing.jpg HTTP/1.1" 404 1427 "http://localhost:8080/test/page/test" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.7 Safari/532.9"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.