Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7
-
None
-
Tapestry 4.1.2 snapshot from 5-1, OGNL 2.7 snapshot from 4-30, WinXP, Firefox 2
Description
Failsafe does NOT catch this. For some reason I can only reproduce it on a component, not a page.
page template:
<span jwcid="@BrokenComponent" count="1" />
BrokenComponent.html:
<span jwcid="@Insert" value="ognl:messages.format('ShowAllCount', count)" />
BrokenComponent.java:
@ComponentClass
public abstract class BrokenComponent extends BaseComponent
{ @Parameter(required = true) public abstract int getCount(); }BrokenComponent.properties:
ShowAllCount=SHOW ALL (
{0})
Stack:
org.apache.tapestry.BindingException: Unable to parse OGNL expression 'messages.format('ShowAllCount', count)': Unable to add method java.lang.Object[] ref2(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class ognl.ASTChain14721465Accessor: [source error] toArray(void,java.lang.Class) not found in ognl.OgnlOps [context:/WEB-INF/app/BrokenComponent.html, line 1]
at org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
at org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:113)
at org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
at $Insert_48.getValue($Insert_48.java)
at org.apache.tapestry.components.Insert.renderComponent(Insert.java:48)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
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:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:96)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
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:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:39)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
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:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.Any.renderComponent(Any.java:47)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.html.Body.renderComponent(Body.java:38)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.html.Shell.renderComponent(Shell.java:64)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
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:713)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:526)
at org.apache.tapestry.components.ElseBean.renderComponent(ElseBean.java:47)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:713)
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:713)
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:713)
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_1124e4dfd18.renderResponse($ResponseRenderer_1124e4dfd18.java)
at org.apache.tapestry.engine.PageService.service(PageService.java:68)
at $IEngineService_1124e4dfdab.service($IEngineService_1124e4dfdab.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_1124e4dfd88.service($WebRequestServicer_1124e4dfd88.java)
at org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:54)
at $WebRequestServicerFilter_1124e4dfd8a.service($WebRequestServicerFilter_1124e4dfd8a.java)
at $WebRequestServicer_1124e4dfd8c.service($WebRequestServicer_1124e4dfd8c.java)
at $WebRequestServicer_1124e4dfd84.service($WebRequestServicer_1124e4dfd84.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
at $ServletRequestServicer_1124e4dfd66.service($ServletRequestServicer_1124e4dfd66.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_1124e4dfd62.service($ServletRequestServicerFilter_1124e4dfd62.java)
at $ServletRequestServicer_1124e4dfd68.service($ServletRequestServicer_1124e4dfd68.java)
at collective.ui.custom.HibernateFilter.service(HibernateFilter.java:37)
at $ServletRequestServicerFilter_1124e4dfd60.service($ServletRequestServicerFilter_1124e4dfd60.java)
at $ServletRequestServicer_1124e4dfd68.service($ServletRequestServicer_1124e4dfd68.java)
at collective.ui.custom.LuceneIndexFilter.service(LuceneIndexFilter.java:24)
at $ServletRequestServicerFilter_1124e4dfd5e.service($ServletRequestServicerFilter_1124e4dfd5e.java)
at $ServletRequestServicer_1124e4dfd68.service($ServletRequestServicer_1124e4dfd68.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_1124e4dfd5c.service($ServletRequestServicerFilter_1124e4dfd5c.java)
at $ServletRequestServicer_1124e4dfd68.service($ServletRequestServicer_1124e4dfd68.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_1124e4dfd64.service($ServletRequestServicerFilter_1124e4dfd64.java)
at $ServletRequestServicer_1124e4dfd68.service($ServletRequestServicer_1124e4dfd68.java)
at $ServletRequestServicer_1124e4dfd55.service($ServletRequestServicer_1124e4dfd55.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)
Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to parse OGNL expression 'messages.format('ShowAllCount', count)': Unable to add method java.lang.Object[] ref2(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class ognl.ASTChain14721465Accessor: [source error] toArray(void,java.lang.Class) not found in ognl.OgnlOps
at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:133)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:91)
at $ExpressionCache_1124e4dfe86.getCompiledExpression($ExpressionCache_1124e4dfe86.java)
at org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:122)
... 118 more
Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object[] ref2(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class ognl.ASTChain14721465Accessor: [source error] toArray(void,java.lang.Class) not found in ognl.OgnlOps
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.createLocalReferences(HiveMindExpressionCompiler.java:368)
at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.generateSetter(HiveMindExpressionCompiler.java:404)
at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:176)
at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:387)
at ognl.Ognl.compileExpression(Ognl.java:123)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:129)
... 121 more
Caused by: javassist.CannotCompileException: [source error] toArray(void,java.lang.Class) not found in ognl.OgnlOps
at javassist.CtBehavior.setBody(CtBehavior.java:347)
at javassist.CtBehavior.setBody(CtBehavior.java:316)
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272)
... 127 more
Caused by: compile error: toArray(void,java.lang.Class) not found in ognl.OgnlOps
at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:716)
at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:681)
at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156)
at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45)
at javassist.compiler.TypeChecker.atCastExpr(TypeChecker.java:546)
at javassist.compiler.JvstTypeChecker.atCastExpr(JvstTypeChecker.java:103)
at javassist.compiler.ast.CastExpr.accept(CastExpr.java:54)
at javassist.compiler.JvstTypeChecker.atCastToWrapper(JvstTypeChecker.java:125)
at javassist.compiler.JvstTypeChecker.atCastExpr(JvstTypeChecker.java:97)
at javassist.compiler.ast.CastExpr.accept(CastExpr.java:54)
at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:235)
at javassist.compiler.CodeGen.compileExpr(CodeGen.java:222)
at javassist.compiler.CodeGen.atReturnStmnt2(CodeGen.java:591)
at javassist.compiler.JvstCodeGen.atReturnStmnt(JvstCodeGen.java:424)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:356)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344)
at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49)
at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:285)
at javassist.compiler.Javac.compileBody(Javac.java:212)
at javassist.CtBehavior.setBody(CtBehavior.java:341)
... 129 more