Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-78

Appending strings in ternary causes failsafe error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7
    • 2.7
    • ExpressionCompiler
    • None
    • Tapestry 4.1.2 snapshot from 5-16, OGNL 2.7 snapshot from 5-13, WinXP, Firefox 2

    Description

      Failsafe catches this and the page renders fine.

      .html:

      <span jwcid="@Insert" value="ognl:useXTileLink ? 'javascript:toggle(' + currentFeature.id + ');' : ''" />

      .java:

      public class Feature

      {

      public Long getId()

      { return 1L; }

      }

      public boolean isUseXTileLink()

      { return true; }

      public Feature getCurrentFeature()

      { return new Feature(); }

      Stack rendered to console:

      07-05-16 15:03:00 ERROR (HiveMindExpressionCompiler.java:226) - Error generating OGNL statements for expression useXTileLink ? ("javascript:toggle(" + currentFeature.id + ");") : "" with root $DirectorAccount_29@3c1[DirectorAccount]

      java.lang.VerifyError: (class: ognl/ASTTest1813852092/0Accessor, method: ref1 signature: (Lognl/OgnlContext;Ljava/lang/Object;)Ljava/lang/Long Wrong return type in function

      at java.lang.Class.getDeclaredConstructors0(Native Method)

      at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

      at java.lang.Class.getConstructor0(Unknown Source)

      at java.lang.Class.newInstance0(Unknown Source)

      at java.lang.Class.newInstance(Unknown Source)

      at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:222)

      at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:388)

      at ognl.Ognl.compileExpression(Ognl.java:123)

      at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:129)

      at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:91)

      at $ExpressionCache_112967c308c.getCompiledExpression($ExpressionCache_112967c308c.java)

      at org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:122)

      at org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:113)

      at org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)

      at $Insert_47.getValue($Insert_47.java)

      at org.apache.tapestry.components.Insert.renderComponent(Insert.java:48)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.ElseBean.renderComponent(ElseBean.java:47)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

      at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

      at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.Any.renderComponent(Any.java:47)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.html.Body.renderComponent(Body.java:38)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.html.Shell.renderComponent(Shell.java:124)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

      at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:537)

      at org.apache.tapestry.components.ElseBean.renderComponent(ElseBean.java:47)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

      at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)

      at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:107)

      at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:182)

      at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:237)

      at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:397)

      at org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse(DefaultResponseBuilder.java:158)

      at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(ResponseRendererImpl.java:33)

      at $ResponseRenderer_112967c2f1c.renderResponse($ResponseRenderer_112967c2f1c.java)

      at org.apache.tapestry.engine.PageService.service(PageService.java:68)

      at $IEngineService_112967c2faf.service($IEngineService_112967c2faf.java)

      at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)

      at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:246)

      at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)

      at $WebRequestServicer_112967c2f8c.service($WebRequestServicer_112967c2f8c.java)

      at org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:54)

      at $WebRequestServicerFilter_112967c2f8e.service($WebRequestServicerFilter_112967c2f8e.java)

      at $WebRequestServicer_112967c2f90.service($WebRequestServicer_112967c2f90.java)

      at $WebRequestServicer_112967c2f88.service($WebRequestServicer_112967c2f88.java)

      at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)

      at $ServletRequestServicer_112967c2f6a.service($ServletRequestServicer_112967c2f6a.java)

      at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)

      at $ServletRequestServicerFilter_112967c2f66.service($ServletRequestServicerFilter_112967c2f66.java)

      at $ServletRequestServicer_112967c2f6c.service($ServletRequestServicer_112967c2f6c.java)

      at collective.ui.custom.HibernateFilter.service(HibernateFilter.java:37)

      at $ServletRequestServicerFilter_112967c2f64.service($ServletRequestServicerFilter_112967c2f64.java)

      at $ServletRequestServicer_112967c2f6c.service($ServletRequestServicer_112967c2f6c.java)

      at collective.ui.custom.LuceneIndexFilter.service(LuceneIndexFilter.java:24)

      at $ServletRequestServicerFilter_112967c2f62.service($ServletRequestServicerFilter_112967c2f62.java)

      at $ServletRequestServicer_112967c2f6c.service($ServletRequestServicer_112967c2f6c.java)

      at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)

      at $ServletRequestServicerFilter_112967c2f60.service($ServletRequestServicerFilter_112967c2f60.java)

      at $ServletRequestServicer_112967c2f6c.service($ServletRequestServicer_112967c2f6c.java)

      at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)

      at $ServletRequestServicerFilter_112967c2f68.service($ServletRequestServicerFilter_112967c2f68.java)

      at $ServletRequestServicer_112967c2f6c.service($ServletRequestServicer_112967c2f6c.java)

      at $ServletRequestServicer_112967c2f59.service($ServletRequestServicer_112967c2f59.java)

      at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)

      at collective.ui.CollectiveApplicationServlet.doService(CollectiveApplicationServlet.java:71)

      at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:104)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)

      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:832)

      at collective.servlet.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:32)

      at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823)

      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)

      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:556)

      at org.mortbay.http.HttpContext.handle(HttpContext.java:1563)

      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:623)

      at org.mortbay.http.HttpContext.handle(HttpContext.java:1515)

      at org.mortbay.http.HttpServer.service(HttpServer.java:956)

      at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)

      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)

      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)

      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)

      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)

      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            dotteben Ben Dotte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: