|
Issue Type:
|
Bug
|
Affects Versions:
|
2.2
|
Assignee:
|
Andrea Aime
|
Components:
|
WMS
|
Created:
|
12/Nov/12 9:15 PM
|
Description:
|
I have recently installed 2.2 and I am testing this on our dev. server.
For 1 of our map layers we have overidden the content.ftl file to produce
a special feature output. This output was working fine with our previous
Geoserver 2.1.1. I now use exactly the same content.ftl with the new
Geoserver 2.2 but see the following exception in the geoserver.log:
2012-11-07 17:52:22,447 ERROR [freemarker.runtime] - Template
processing error: “Expected number, sequence, or string. features
evaluated instead to
org.geoserver.template.DirectTemplateFeatureCollectionFactory$TemplateFeatureCollection
on line 15, column 34 in content.ftl.”
Expected number, sequence, or string. features evaluated instead to
org.geoserver.template.DirectTemplateFeatureCollectionFactory$TemplateFeatureCollection
on line 15, column 34 in content.ftl.
The problematic instruction:
==> ${features[0].LOCATION.value} [on line 15, column 32 in content.ftl]
Andrea Aime replied to my post on the Dev list as follows:
"Hmm… the change that broke size support is http://jira.codehaus.org/browse/GEOS-4531,
in which Niels Charlier (cc’ed) made it possible to support GetFeatureInfo over
complex features too (app schema support).
In this change the code was modified to only support TemplateCollectionModel instead
of TemplateSequenceModel, the former can only be iterated over but cannot respond
to size().
This look like a regression indeed, while I know that app-schema collections have troubles
returning their size (mostly due to the fact they are extremely slow at doing that)
simple feature collections should not have been affected."
So fix seems to be to bring back support for TemplateSequenceModel
so things like ${features[0].LOCATION.value} and features?size still
work
Thanks,
Andrew Walsh
|
Environment:
|
Sun-Solaris-9
Java 1.6.0_17
Oracle-SDE
Geoserver 2.2
|
Fix Versions:
|
2.2.1
|
Project:
|
GeoServer
|
Priority:
|
Major
|
Reporter:
|
Andrew Walsh
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa).
For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)