Sorry I couldn't reply earlier. This is the statement at line 116:
(BTW, I created a new maven project using the quickstart archetype for
5.4-beta-10 and didn't modify anything in the code except that:
1. I commented an event handler in the *Index.java* file
2. Removed all the content in *Index.tml* except the basic tags (i.e.
html) since all the static content is displayed in the *Layout.tml* file
because I'm still testing. I tend to move forward bit by bit with tapestry
so when I weird exception is thrown, I can at least guess what exactly did
I do wrong.
/**
> * This is a service definition, the service will be named
> "TimingFilter". The interface,
> * RequestFilter, is used within the RequestHandler service pipeline,
> which is built from the
> * RequestHandler service configuration. Tapestry IoC is responsible
> for passing in an
> * appropriate Logger instance. Requests for static resources are
> handled at a higher level, so
> * this filter will only be invoked for Tapestry related requests.
> * <p/>
> * <p/>
> * Service builder methods are useful when the implementation is
> inline as an inner class
> * (as here) or require some other kind of special initialization. In
> most cases,
> * use the static bind() method instead.
> * <p/>
> * <p/>
> * If this method was named "build", then the service id would be
> taken from the
> * service interface and would be "RequestFilter". Since Tapestry
> already defines
> * a service named "RequestFilter" we use an explicit service id that
> we can reference
> * inside the contribution method.
> */
> public RequestFilter buildTimingFilter(final Logger log)
> {
> return new RequestFilter()
> {
> public boolean service(Request request, Response response,
> RequestHandler handler)
> throws IOException
> {
> long startTime = System.currentTimeMillis();
> try
> {
> // The responsibility of a filter is to invoke the
> corresponding method
> // in the handler. When you chain multiple filters
> together, each filter
> // received a handler that is a bridge to the next
> filter.
> return handle
>
> r.service(request, response);
> //Line 116 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> } finally
> {
> long elapsed = System.currentTimeMillis() - startTime;
> log.info(String.format("Request time: %d ms",
> elapsed));
> }
> }
> };
> }
*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana
On Mon, Jun 9, 2014 at 10:17 AM, Geoff Callender <
[email protected]> wrote:
> What's it doing at AppModule.java:116?
>
> On 9 Jun 2014, at 5:09 pm, Muhammad Gelbana <[email protected]> wrote:
>
> > I'm trying to use a complicated bootstrap template that has numerous
> dependencies. So its possible that I'm missing one. I've put my asssets in
> META-INF/assets folders under my resources directory (i.e. source folder
> for TML files.)
> >
> > Now I'm facing this exception and many more (The full console output is
> attached). For instance consider the following stacktrace. First I see a
> warning with the message "/lte/img/avatar2.png" then a strange exception
> that I can't make anything out of. I checked that the file
> "/lte/img/avatar2.png" exists in the mentioned path and it is. So how can I
> resolve/trace this ?
> >
> > 2014-06-09 08:58:21.913:WARN::/lte/img/avatar2.png
> > java.lang.NullPointerException: Unable to delegate method invocation to
> property 'response' of <Proxy for
> RequestGlobals(org.apache.tapestry5.services.RequestGlobals)>, because the
> property is null.
> > at $Response_4c546f5b4e8.readProperty(Unknown Source)
> > at $Response_4c546f5b4e8.setStatus(Unknown Source)
> > at $Response_4c546f5b424.setStatus(Unknown Source)
> > at
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.renderException(DefaultRequestExceptionHandler.java:241)
> > at
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:144)
> > at
> $RequestExceptionHandler_4c546f5b441.handleRequestException(Unknown Source)
> > at
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
> > at $RequestHandler_4c546f5b443.service(Unknown Source)
> > at
> org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:847)
> > at $RequestHandler_4c546f5b443.service(Unknown Source)
> > at
> org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:837)
> > at $RequestHandler_4c546f5b443.service(Unknown Source)
> > at
> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)
> > at $RequestHandler_4c546f5b443.service(Unknown Source)
> > at
> com.sc.ip.portal.lte.services.AppModule$1.service(AppModule.java:116)
> > at $RequestFilter_4c546f5b43d.service(Unknown Source)
> > at $RequestHandler_4c546f5b443.service(Unknown Source)
> > at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
> > at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
> > at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> > at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
> > at $RequestHandler_4c546f5b443.service(Unknown Source)
> > at $RequestHandler_4c546f5b437.service(Unknown Source)
> > at
> org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:250)
> > at
> org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)
> > at $HttpServletRequestHandler_4c546f5b439.service(Unknown Source)
> > at
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> > at $HttpServletRequestFilter_4c546f5b434.service(Unknown Source)
> > at $HttpServletRequestHandler_4c546f5b439.service(Unknown Source)
> > at
> org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:797)
> > at $HttpServletRequestHandler_4c546f5b439.service(Unknown Source)
> > at $HttpServletRequestHandler_4c546f5b433.service(Unknown Source)
> > at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:166)
> > at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
> > at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
> > 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:766)
> > at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
> > 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:928)
> > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
> > 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:410)
> > at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> > ---------------------
> > Muhammad Gelbana
> > http://www.linkedin.com/in/mgelbana
> > <full-exception.txt>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
>
>