We are in the process of upgrading from Tapestry 4.0.2 to Tapestry 4.1.5. I've run into several porting issues along the way, but the most problematic is:
ERROR HiveMindExpressionCompiler - Error generating OGNL getter for expression We use some OGNL expressions in our application that are probably more complex than is typical. It seems that 4.0.2 with OGNL 2.6.9 allowed these more complex OGNL expressions, but _apparently_ OGNL 2.7.2 has regressed in this regard. Here are some examples of the OGNL expressions we have in our application that are causing problems with the latest Tapestry, OGNL libraries: <binding name="queryParameters" value="ognl:[EMAIL PROTECTED]@class, @[EMAIL PROTECTED]() .addEqFilter('photoType',@[EMAIL PROTECTED]) .addScopeFilter(getUserScope()) .addConCategoryFilter(components.categoryRetriever_UserPhoto.pageCategory) .setSortBy('publishDate desc') }" /> <binding name="sortingCriteria" value="ognl:{ #{'label':'Latest', 'criterion':'publishDate desc','default':true}, #{'label':'Title', 'criterion':'title asc','default':false}, #{'label':'Most Popular', 'criterion':'counter.viewCounts.total desc','default':false}, #{'label':'Most Commented', 'criterion':'counter.commentCounts.total desc','default':false}, #{'label':'Highest Rated', 'criterion':'counter.ratingSummary.ratingAvgScore desc','default':false} }"/> So, these expressions succeed in Tapestry 4.0.2 + OGNL 2.6.9, but fail with Tapestry 4.1.5 + OGNL 2.7.2. Is this a known issue? Here is an abbreviated stack trace: ERROR HiveMindExpressionCompiler - Error generating OGNL getter for expression { @[EMAIL PROTECTED], @[EMAIL PROTECTED]().addEqFilter("galleryType", @[EMAIL PROTECTED]).addScopeFilter(getEditorScope()).addConCategoryFilter(components.categoryRetriever_EditorPhotoGallery.pageCategory).setSortBy("publishDate desc") } with root [EMAIL PROTECTED] and body: { return ((com.wmg.cdp.domain.filter.QueryFilter)((com.wmg.cdp.domain.filter.QueryFilter)((com.wmg.cdp.domain.filter.QueryFilter)java.util.Arrays.asList( new Object[] { ($w) (com.wmg.cdp.domain.photo.PhotoGallery.class), ($w) (com.wmg.cdp.domain.filter.QueryFilter#getInstance()).addEqFilter("galleryType", com.wmg.cdp.domain.common.GalleryType.PHOTO_GALLERY)).addScopeFilter((($SectionPage_0)$2).getEditorScope())).addConCategoryFilter(((com.wmg.cdp.controller.components.contentmanager.category.PageCategoryRetriever)(($SectionPage_0)$2).getComponents().get("categoryRetriever_EditorPhotoGallery")).getPageCategory()).setSortBy("publishDate desc"))});} org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTList_11ab9f3e5a1: [source error] syntax error near "_GALLERY)).addScopeF" at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:171) at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:414) 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_11ab9f3e4e0.getCompiledExpression($ExpressionCache_11ab9f3e4e0.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 $GenericListComponent_39.getQueryParameters($GenericListComponent_39.java) at com.wmg.cdp.controller.components.GenericListComponent.getEntityCount(GenericListComponent.java:157) at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:851) at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1414) at ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:60) at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:147) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2210) at ognl.ASTProperty.getValueBody(ASTProperty.java:114) ... 149 more Caused by: compile error: syntax error near "_GALLERY)).addScopeF" at javassist.compiler.Parser.parseArrayInitializer(Parser.java:676) at javassist.compiler.Parser.parseNew(Parser.java:1284) -- View this message in context: http://www.nabble.com/Tapestry-4.1.5---OGNL-2.7.2-bug--tp18098278p18098278.html Sent from the Tapestry - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]