You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by #Cyrille37# <cy...@gmail.com> on 2007/09/05 09:45:11 UTC

[Tap4.1.2-Ognl2.7]OGNL error

Hello

I come on a strange stuff. An ognl expression is well working but I see 
a Hivemind exception in log.

In a html file I affect a value to a property :
<span jwcid="@Any" 
value="ognl:currentlocaleCode=page.engine.locale.language"/>

The property is defined in the specification page :
<property name="currentlocaleCode" />

The result works: if I display the value of "currentlocaleCode" I well 
get the current locale language code
<span jwcid="@Insert" value="ognl:currentlocaleCode" />

So all stuffs seems ok. But while I'm looking at log (in Eclipse 
console) I can see that the expression evaluation throw a exception :

22953 [http-8080-2] ERROR 
org.apache.tapestry.services.impl.HiveMindExpressionCompiler  - Error 
generating OGNL statements for expression currentlocaleCode = 
page.engine.locale.language with root 
$LocaleSelectionFlags_36@41a0cda2[Home/$Util$LocaleSelectionFlags]
org.apache.hivemind.ApplicationRuntimeException: Unable to add method 
void set(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class 
$ASTAssign_11491e63e30: [source error] ; is missing
   at 
org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
   at 
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:214) 

   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.getCompiledExpression(ExpressionCacheImpl.java:115) 

   at 
$ExpressionCache_11491e63db9.getCompiledExpression($ExpressionCache_11491e63db9.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.AbstractComponent.renderInformalParameters(AbstractComponent.java:290) 

   at org.apache.tapestry.components.Any.renderComponent(Any.java:38)

Any Idea ?
Why the page and property value are well render without a exception page ?

In a previous post Marcus Schulte told me that "The OGNL 
Expression-Compiler falls back from the new, byte-code
generating mode to the old, interpreting mode when an error occurs." and 
to try with Ognl v2.7.
But I'm using Tap4.1.2 which already comes with ognl 2.7.

Cyrille

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org