Fix freemarker crash when iterating over a simple list
------------------------------------------------------
Key: NXP-3765
URL: http://jira.nuxeo.org/browse/NXP-3765
Project: Nuxeo Enterprise Platform
Issue Type: Bug
Affects Versions: 5.2 GA
Reporter: Anahide Tchertchian
Assignee: Anahide Tchertchian
Fix For: 5.2.1
When iterating over a list coming from directories (simple array list in xsd),
iterating over its value throws:
Caused by: org.nuxeo.ecm.platform.rendering.api.RenderingException:
freemarker.template.TemplateModelException: java.lang.IllegalArgumentException:
Object is not an array, it is java.util.ArrayList
at
org.nuxeo.ecm.platform.rendering.fm.FreemarkerEngine.render(FreemarkerEngine.java:161)
at
org.nuxeo.ecm.webengine.model.impl.AbstractWebContext.render(AbstractWebContext.java:505)
... 40 more
Caused by: freemarker.template.TemplateModelException:
java.lang.IllegalArgumentException: Object is not an array, it is
java.util.ArrayList
at
org.nuxeo.ecm.platform.rendering.fm.adapters.PropertyWrapper.wrap(PropertyWrapper.java:89)
at
org.nuxeo.ecm.platform.rendering.fm.adapters.ComplexPropertyTemplate.get(ComplexPropertyTemplate.java:83)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:76)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.Environment$1.render(Environment.java:233)
at
org.nuxeo.ecm.platform.rendering.fm.extensions.BlockDirective.execute(BlockDirective.java:62)
at freemarker.core.Environment.visit(Environment.java:261)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.Environment$1.render(Environment.java:233)
at
org.nuxeo.theme.webengine.fm.extensions.ThemeDirective.execute(ThemeDirective.java:108)
at freemarker.core.Environment.visit(Environment.java:261)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.Environment.process(Environment.java:188)
at
org.nuxeo.ecm.platform.rendering.fm.FreemarkerEngine.render(FreemarkerEngine.java:158)
... 41 more
Caused by: java.lang.IllegalArgumentException: Object is not an array, it is
java.util.ArrayList
at freemarker.ext.beans.ArrayModel.<init>(ArrayModel.java:105)
at
org.nuxeo.ecm.platform.rendering.fm.adapters.PropertyWrapper.wrap(PropertyWrapper.java:81)
... 62 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets