Tapestry
  1. Tapestry
  2. TAPESTRY-1871

Null date displayed in a Grid raises error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.0.7
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      Debian Lenny
      Jetty 5.1.10?
      Sun JDK 1.5
      AMD 64-bit

      Description

      I upgraded to 5.0.6, and since then, if I try to display a Grid that
      contains a Date column whose value is NULL, I receive the following
      exception:

      org.apache.tapestry.ioc.internal.util.TapestryException
      Cannot format given Object as a Date
      location
      classpath:org/apache/tapestry/corelib/pages/PropertyDisplayBlocks.tml, line 8, column 66
      3 <t:block id="enum">
      4 $

      {convertedEnumValue}

      5 </t:block>
      6
      7 <t:block id="date">
      8 <t:output value="context.propertyValue" format="dateFormat"/>
      9 </t:block>
      10
      11 </div>

      • java.lang.IllegalArgumentException
        Cannot format given Object as a Date

      Stack trace

      • java.text.DateFormat.format(DateFormat.java:279)
      • java.text.Format.format(Format.java:133)
      • org.apache.tapestry.corelib.components.Output.beginRender(Output.java:67)
      • org.apache.tapestry.corelib.components.Output.beginRender(Output.java)
      • org.apache.tapestry.internal.structure.ComponentPageElementImpl$10$1.run(ComponentPageElementImpl.java:345)
      • org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923)
      • org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:69)
      • org.apache.tapestry.internal.structure.ComponentPageElementImpl$10.render(ComponentPageElementImpl.java:349)
      • org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:58)
      • org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:40)
      • org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:71)
      • org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:81)
      • org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:72)
      • org.apache.tapestry.services.TapestryModule
        $13.service(TapestryModule.java:1108)
      • com.homeed.services.AppModule
        $1.service(AppModule.java:82)
      • org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
      • org.apache.tapestry.services.TapestryModule
        $2.service(TapestryModule.java:688)
      • org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:84)
      • org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:97)
      • org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:88)
      • org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
      • org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:110)
      • org.apache.tapestry.services.TapestryModule
        $12.service(TapestryModule.java:1086)
      • org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135)
      • org.mortbay.jetty.servlet.WebApplicationHandler
        $CachedChain.doFilter(WebApplicationHandler.java:821)
      • org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
      • org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
      • org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
      • org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
      • org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
      • org.mortbay.http.HttpServer.service(HttpServer.java:909)
      • org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
      • org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
      • org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
      • org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
      • org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
      • org.mortbay.util.ThreadPool
        $PoolThread.run(ThreadPool.java:534)

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development