[Geoserver-devel] [jira] (GEOS-6677) Excel exports using querystring parameter PropertyName fails

Björn Harrtell created an issue

GeoServer / BugGEOS-6677

Excel exports using querystring parameter PropertyName fails

Issue Type:

BugBug

Affects Versions:

2.5.2

Assignee:

Andrea Aime

Components:

Excel

Created:

17/Sep/14 1:57 AM

Fix Versions:

2.2

Priority:

MajorMajor

Reporter:

Björn Harrtell

If issuing GET requests to export a featuretype to excel format with only selected propertynames like this:

request=GetFeature&version=1.1.0&typeName=<typename>&PropertyName=<propertyname>&outputFormat=excel2007

The result is an exception with the following stacktrace:

java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
at net.opengis.wfs.impl.QueryTypeImpl.eSet(QueryTypeImpl.java:441)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1081)
at org.geotools.xml.EMFUtils.set(EMFUtils.java:69)
at org.geotools.xml.EMFUtils.set(EMFUtils.java:333)
at org.geoserver.wfs.kvp.GetFeatureKvpRequestReader.querySet(GetFeatureKvpRequestReader.java:475)
at org.geoserver.wfs.kvp.GetFeatureKvpRequestReader.read(GetFeatureKvpRequestReader.java:278)

If multiple comma separated propertynames is supplied I get another exception:

java.lang.IllegalArgumentException: The workbook already contains a sheet of this name
at org.apache.poi.xssf.usermodel.XSSFWorkbook.createSheet(XSSFWorkbook.java:619)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:585)
at org.geoserver.wfs.response.ExcelOutputFormat.write(ExcelOutputFormat.java:96)
at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:190)

Both requests worked fine at GeoServer 2.2

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo