Tapestry
  1. Tapestry
  2. TAPESTRY-1345

Exception generated when a page does not have a template is confusing: "No root element has been defined."

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.6
    • Component/s: tapestry-core
    • Labels:
      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development