You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Julian Wood <wo...@ucalgary.ca> on 2007/07/19 02:10:58 UTC

[4.1.2] OGNL bug?

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 $ProjectAccounts_42@278847a1[ProjectDetails/ 
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


Re: [4.1.2] OGNL bug?

Posted by Julian Wood <wo...@ucalgary.ca>.
http://jira.opensymphony.com/browse/OGNL-110

J

On 18-Jul-07, at 7:21 PM, Jesse Kuhnert wrote:

> Ah yes - please do file it.  (with as much of the details/types /  
> etc as
> possible)
>
> http://jira.opensymphony.com/browse/OGNL
>
> You should be sure to try 2.7.1-SNAPSHOT before filling just to  
> save any
> time though.  (but please do file it if it happens there as well,  
> now that
> the struts people are going to be using it I'm really crapping myself)
>
> On 7/18/07, Julian Wood <wo...@ucalgary.ca> wrote:
>>
>> 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 $ProjectAccounts_42@278847a1[ProjectDetails/
>> 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.compileE 
>> xpr
>> 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.getCompiledExpr 
>> ess
>> 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


Re: [4.1.2] OGNL bug?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Ah yes - please do file it.  (with as much of the details/types / etc as
possible)

http://jira.opensymphony.com/browse/OGNL

You should be sure to try 2.7.1-SNAPSHOT before filling just to save any
time though.  (but please do file it if it happens there as well, now that
the struts people are going to be using it I'm really crapping myself)

On 7/18/07, Julian Wood <wo...@ucalgary.ca> wrote:
>
> 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 $ProjectAccounts_42@278847a1[ProjectDetails/
> 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
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com