Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0
-
None
Description
Currently, it is not an error if there is no template (which happens if there's a typo in the file name), and when the page starts to render, there's nothing to generate, thus:
- java.lang.IllegalStateException
No root element has been defined.
Stack trace
o org.apache.tapestry.dom.Document.toMarkup(Document.java:89)
o org.apache.tapestry.internal.services.MarkupWriterImpl.toMarkup(MarkupWriterImpl.java:51)
o org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:49)
o org.apache.tapestry.internal.services.PageRenderDispatcher$1.renderPage(PageRenderDispatcher.java:78)
o org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(PageLinkHandlerImpl.java:89)
o org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(PageLinkHandlerImpl.java:49)
o org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:87)
o org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:1198)
o org.apache.tapestry.integration.app1.services.AppModule$1.service(AppModule.java:47)
o org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
o org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:734)
o org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:63)
o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:91)
o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:1)
o org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
o org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:104)
o org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1176)
o org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:115)
o org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
o org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
o org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
o org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
o org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:526)
o org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
o org.mortbay.http.HttpServer.service(HttpServer.java:879)
o org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
o org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
o org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
o org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
o org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331)
o org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520)
I think we should change the logic to enforce that pages must have a template of some sort.