akvo / akvo-flow

A data collection and monitoring tool that works anywhere.
http://akvo.org/products/akvoflow/
GNU Affero General Public License v3.0
65 stars 31 forks source link

Exception while trying to generate geoshapes #3904

Closed muloem closed 2 years ago

muloem commented 2 years ago

Context

Data exports are failing in some instances. Investigating shows that the following exception is thrown when the export fails.

java.lang.IllegalArgumentException: The maximum length of cell contents (text) is 32,767 characters
    at org.apache.poi.xssf.streaming.SXSSFCell.setCellValue(SXSSFCell.java:325)
    at org.waterforpeople.mapping.dataexport.GraphicalSurveySummaryExporter.createCell(GraphicalSurveySummaryExporter.java:2067)
    at org.waterforpeople.mapping.dataexport.GraphicalSurveySummaryExporter.createCell(GraphicalSurveySummaryExporter.java:2043)
    at org.waterforpeople.mapping.dataexport.GraphicalSurveySummaryExporter.writeAnswer(GraphicalSurveySummaryExporter.java:913)
    at org.waterforpeople.mapping.dataexport.GraphicalSurveySummaryExporter.writeInstanceDataSplit(GraphicalSurveySummaryExporter.java:665)
    at org.waterforpeople.mapping.dataexport.GraphicalSurveySummaryExporter.fetchAndWriteRawData(GraphicalSurveySummaryExporter.java:536)
    at org.waterforpeople.mapping.dataexport.GraphicalSurveySummaryExporter.export(GraphicalSurveySummaryExporter.java:248)

Problem or idea

Exception is thrown because of an attempt to export a geoshape that is too large to fit within the excel sheet.

Solution or next step

Decision is to: