Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7
-
None
-
latest tapestry 4.1.2 and ognl 2.7
Description
I get an exception in case of the following simple page:
package test;
import org.apache.tapestry.IComponent;
import org.apache.tapestry.annotations.InitialValue;
public abstract class Home extends BasePage
{
public static class A
{
public A(IComponent component)
{
}
}
@InitialValue("new test.Home$A(#root)")
public abstract A getA();
}
The stack trace:
2007.06.11. 7:59:09 org.apache.tapestry.services.impl.HiveMindExpressionCompiler compileExpression
SEVERE: Error generating OGNL getter for expression new test.Home$A(#root) with root $Home_0@3c1[Home] and body:
{ return new test.Home$A(($Home_0)(($Home_0)$2)(($Home_0)$2));}org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTCtor_113195d121d: [source error] fatal
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:172)
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_113195d1213.getCompiledExpression($ExpressionCache_113195d1213.java)
at org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134)
at org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125)
at org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84)
at $Home_0.finishLoad($Home_0.java)
at org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:410)
at org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:641)
at $IPageLoader_113195d1182.loadPage($IPageLoader_113195d1182.java)
at $IPageLoader_113195d1183.loadPage($IPageLoader_113195d1183.java)
at org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:119)
at $IPageSource_113195d10dd.getPage($IPageSource_113195d10dd.java)
at $IPageSource_113195d10dc.getPage($IPageSource_113195d10dc.java)
at org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239)
at org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)
at org.apache.tapestry.engine.HomeService.service(HomeService.java:66)
at $IEngineService_113195d116e.service($IEngineService_113195d116e.java)
at org.apache.tapestry.services.impl.EngineServiceInnerProxy.service(EngineServiceInnerProxy.java:77)
at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:237)
at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
at $WebRequestServicer_113195d1142.service($WebRequestServicer_113195d1142.java)
at $WebRequestServicer_113195d1141.service($WebRequestServicer_113195d1141.java)
at $WebRequestServicer_113195d113e.service($WebRequestServicer_113195d113e.java)
at $WebRequestServicer_113195d113d.service($WebRequestServicer_113195d113d.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
at $ServletRequestServicer_113195d1124.service($ServletRequestServicer_113195d1124.java)
at $ServletRequestServicer_113195d1123.service($ServletRequestServicer_113195d1123.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_113195d1120.service($ServletRequestServicerFilter_113195d1120.java)
at $ServletRequestServicerFilter_113195d111f.service($ServletRequestServicerFilter_113195d111f.java)
at $ServletRequestServicer_113195d1125.service($ServletRequestServicer_113195d1125.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_113195d111e.service($ServletRequestServicerFilter_113195d111e.java)
at $ServletRequestServicerFilter_113195d111d.service($ServletRequestServicerFilter_113195d111d.java)
at $ServletRequestServicer_113195d1125.service($ServletRequestServicer_113195d1125.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_113195d1122.service($ServletRequestServicerFilter_113195d1122.java)
at $ServletRequestServicerFilter_113195d1121.service($ServletRequestServicerFilter_113195d1121.java)
at $ServletRequestServicer_113195d1125.service($ServletRequestServicer_113195d1125.java)
at $ServletRequestServicer_113195d10fb.service($ServletRequestServicer_113195d10fb.java)
at $ServletRequestServicer_113195d10fa.service($ServletRequestServicer_113195d10fa.java)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:619)
Caused by: javassist.CannotCompileException: [source error] fatal
at javassist.CtBehavior.setBody(CtBehavior.java:347)
at javassist.CtBehavior.setBody(CtBehavior.java:316)
at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272)
... 80 more
Caused by: compile error: fatal
at javassist.compiler.TypeChecker.fatal(TypeChecker.java:107)
at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:679)
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.atMethodArgs(JvstTypeChecker.java:220)
at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:702)
at javassist.compiler.TypeChecker.atNewExpr(TypeChecker.java:148)
at javassist.compiler.ast.NewExpr.accept(NewExpr.java:72)
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)
... 82 more