This is a very simple expression, but I always get an error in the log, even though the output is calculated correctly:

    <component id="net" type="Insert">
<binding name="value" value="ognl:budget - timeBilled - itemsBilled"/>
        <binding name="format" value="ognl:priceFormat"/>
    </component>

I've tried it with various combinations of brackets and operators (eg. "ognl:(budget - (timeBilled + itemsBilled))" ) but I always get a similar error. Each of the 3 properties are just primitive doubles computed at render time.

Bug? It's easy enough to make it a property instead (and make the error go away), but I keep running into this and it's annoying.

Thanks,

J


2007-07-19 00:00:41,732 ERROR HiveMindExpressionCompiler.java - Error generating OGNL getter for expression (budget - timeBilled) - itemsBilled with root [EMAIL PROTECTED]/ projectAccounts] and body: { return ($w) (((($ProjectAccounts_42)$2).getBudget()d - (($ProjectAccounts_42)$2).getTimeBilled()dd) - (($ProjectAccounts_42) $2).getItemsBilled()d);} org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTSubtract_113dbbf5047: [source error] ) is missing at org.apache.tapestry.enhance.ClassFabImpl.addMethod (ClassFabImpl.java:278) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpr ession(HiveMindExpressionCompiler.java:172)
        at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
        at ognl.Ognl.compileExpression(Ognl.java:141)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse (ExpressionCacheImpl.java:152) at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpress ion(ExpressionCacheImpl.java:115) at $ExpressionCache_113dbbf4f91.getCompiledExpression ($ExpressionCache_113dbbf4f91.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 $Insert_13.getValue($Insert_13.java)
at org.apache.tapestry.components.Insert.renderComponent(Insert.java: 48)
        ...
Caused by: javassist.CannotCompileException: [source error] ) is missing
        at javassist.CtBehavior.setBody(CtBehavior.java:347)
        at javassist.CtBehavior.setBody(CtBehavior.java:316)
at org.apache.tapestry.enhance.ClassFabImpl.addMethod (ClassFabImpl.java:272)
        ... 93 more
Caused by: compile error: ) is missing
        at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1247)
        at javassist.compiler.Parser.parsePostfix(Parser.java:1029)
        at javassist.compiler.Parser.parseCast(Parser.java:920)
        ...


--
Julian Wood
Web, E-Mail, and Middleware Services
University of Calgary Information Technologies,
2500 University Drive, Calgary, Alberta, Canada T2N 1N4
(403) 220-5868

Reply via email to