Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7
-
None
-
Tapestry 4.1.2 snapshot from 4-24, OGNL 2.7 snapshot from 4-25, WinXP, Firefox 2
Description
Failsafe does NOT catch this, you get the error page.
.html:
<span jwcid="@Insert" value="ognl:printDelivery ? '' : 'javascript:deliverySelected(' + currentDelivery.carrier + ',' + currentDeliveryId + ')'" />
.java:
public class Delivery
{
private String application;
public String getApplication()
{ return application; }public void setApplication(String val)
{ application = val; }public boolean isCarrier()
{ return false; }}
public Long getCurrentDeliveryId()
{ return 1L; }public Delivery getCurrentDelivery()
{ Delivery del = new Delivery(); del.setApplication("blah"); return del; }public boolean isPrintDelivery()
{ return getCurrentDelivery().getApplication().equals("PrintWithWiden"); }The stack is as follows:
org.apache.tapestry.BindingException: Unable to parse OGNL expression 'printDelivery ? '' : 'javascript:deliverySelected(' + currentDelivery.carrier + ',' + currentDeliveryId + ')'': Unable to add method java.lang.String ref2(ognl.OgnlContext, java.lang.Object) to class ognl.ASTTest907103Accessor: [source error] syntax error near "d(") + (.getCurrentD" [context:/WEB-INF/app/DirectorAccount.html, line 9]
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_47.getValue($Insert_47.java)
at org.apache.tapestry.components.Insert.renderComponent(Insert.java:48)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:41)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.ElseBean.renderComponent(ElseBean.java:47)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:41)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:41)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:41)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.Any.renderComponent(Any.java:47)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.html.Body.renderComponent(Body.java:38)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.html.Shell.renderComponent(Shell.java:64)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:525)
at org.apache.tapestry.components.ElseBean.renderComponent(ElseBean.java:47)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
at collective.ui.components.CollectiveComponent.renderComponent(CollectiveComponent.java:70)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
at org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:184)
at org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:712)
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_1122968fe55.renderResponse($ResponseRenderer_1122968fe55.java)
at org.apache.tapestry.engine.PageService.service(PageService.java:68)
at $IEngineService_1122968fee8.service($IEngineService_1122968fee8.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_1122968fec5.service($WebRequestServicer_1122968fec5.java)
at org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:54)
at $WebRequestServicerFilter_1122968fec7.service($WebRequestServicerFilter_1122968fec7.java)
at $WebRequestServicer_1122968fec9.service($WebRequestServicer_1122968fec9.java)
at $WebRequestServicer_1122968fec1.service($WebRequestServicer_1122968fec1.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
at $ServletRequestServicer_1122968fea3.service($ServletRequestServicer_1122968fea3.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_1122968fe9f.service($ServletRequestServicerFilter_1122968fe9f.java)
at $ServletRequestServicer_1122968fea5.service($ServletRequestServicer_1122968fea5.java)
at collective.ui.custom.HibernateFilter.service(HibernateFilter.java:37)
at $ServletRequestServicerFilter_1122968fe9d.service($ServletRequestServicerFilter_1122968fe9d.java)
at $ServletRequestServicer_1122968fea5.service($ServletRequestServicer_1122968fea5.java)
at collective.ui.custom.LuceneIndexFilter.service(LuceneIndexFilter.java:24)
at $ServletRequestServicerFilter_1122968fe9b.service($ServletRequestServicerFilter_1122968fe9b.java)
at $ServletRequestServicer_1122968fea5.service($ServletRequestServicer_1122968fea5.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_1122968fe99.service($ServletRequestServicerFilter_1122968fe99.java)
at $ServletRequestServicer_1122968fea5.service($ServletRequestServicer_1122968fea5.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_1122968fea1.service($ServletRequestServicerFilter_1122968fea1.java)
at $ServletRequestServicer_1122968fea5.service($ServletRequestServicer_1122968fea5.java)
at $ServletRequestServicer_1122968fe92.service($ServletRequestServicer_1122968fe92.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 'printDelivery ? '' : 'javascript:deliverySelected(' + currentDelivery.carrier + ',' + currentDeliveryId + ')'': Unable to add method java.lang.String ref2(ognl.OgnlContext, java.lang.Object) to class ognl.ASTTest907103Accessor: [source error] syntax error near "d(") + (.getCurrentD"
at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:133)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:91)
at $ExpressionCache_1122968ffc5.getCompiledExpression($ExpressionCache_1122968ffc5.java)
at org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:122)
... 115 more
Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.String ref2(ognl.OgnlContext, java.lang.Object) to class ognl.ASTTest907103Accessor: [source error] syntax error near "d(") + (.getCurrentD"
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.generateGetter(HiveMindExpressionCompiler.java:313)
at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:150)
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)
... 118 more
Caused by: javassist.CannotCompileException: [source error] syntax error near "d(") + (.getCurrentD"
at javassist.CtBehavior.setBody(CtBehavior.java:347)
at javassist.CtBehavior.setBody(CtBehavior.java:316)
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272)
... 124 more
Caused by: compile error: syntax error near "d(") + (.getCurrentD"
at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1255)
at javassist.compiler.Parser.parsePostfix(Parser.java:1029)
at javassist.compiler.Parser.parseUnaryExpr(Parser.java:887)
at javassist.compiler.Parser.parseBinaryExpr(Parser.java:774)
at javassist.compiler.Parser.parseConditionalExpr(Parser.java:718)
at javassist.compiler.Parser.parseExpression(Parser.java:698)
at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1243)
at javassist.compiler.Parser.parsePostfix(Parser.java:1029)
at javassist.compiler.Parser.parseCast(Parser.java:920)
at javassist.compiler.Parser.parseUnaryExpr(Parser.java:885)
at javassist.compiler.Parser.binaryExpr2(Parser.java:808)
at javassist.compiler.Parser.parseBinaryExpr(Parser.java:781)
at javassist.compiler.Parser.parseConditionalExpr(Parser.java:718)
at javassist.compiler.Parser.parseExpression(Parser.java:698)
at javassist.compiler.Parser.parseReturn(Parser.java:506)
at javassist.compiler.Parser.parseStatement(Parser.java:268)
at javassist.compiler.Parser.parseBlock(Parser.java:288)
at javassist.compiler.Parser.parseStatement(Parser.java:242)
at javassist.compiler.Javac.compileBody(Javac.java:203)
at javassist.CtBehavior.setBody(CtBehavior.java:341)
... 126 more