Cannot download layers from maps view

Bug #1395784 reported by Daniele Viganò
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Platform
Fix Committed
Medium
Daniele Viganò

Bug Description

The layers download from a map doesn't work (http://oq-platform/maps/23/download). An error is triggered by geoserver:

24 Nov 15:48:17 WARN [batchdownload.shp] - Error while writing featuretype 'ghec_viewer_measure' to shapefile.
java.io.IOException: Current fid index is null, next must be called before write()
        at org.geotools.data.shapefile.fid.IndexedFidWriter.write(IndexedFidWriter.java:253)
        at org.geotools.data.shapefile.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.java:95)
        at org.geotools.data.shapefile.ShapefileFeatureWriter.close(ShapefileFeatureWriter.java:220)
        at org.geotools.data.shapefile.IndexedShapefileFeatureWriter.close(IndexedShapefileFeatureWriter.java:103)
        at org.geotools.data.InProcessLockingManager$1.close(InProcessLockingManager.java:350)
        at org.geonode.process.batchdownload.shp.ShapeZipWriter.writeCollectionToShapefile(ShapeZipWriter.java:254)
        at org.geonode.process.batchdownload.shp.ShapeZipWriter.doWrite(ShapeZipWriter.java:184)
        at org.geonode.process.batchdownload.shp.ShapeZipWriter.write(ShapeZipWriter.java:125)
        at org.geonode.process.batchdownload.BatchDownload.zipVectorLayer(BatchDownload.java:294)
        at org.geonode.process.batchdownload.BatchDownload.zipLayer(BatchDownload.java:262)
        at org.geonode.process.batchdownload.BatchDownload.zipLayers(BatchDownload.java:232)
        at org.geonode.process.batchdownload.BatchDownload.buildZippFile(BatchDownload.java:129)
        at org.geonode.process.batchdownload.BatchDownload.executeInternal(BatchDownload.java:78)
        at org.geonode.process.control.AsyncProcess.execute(AsyncProcess.java:62)
        at org.geotools.process.ProgressTask$Synchronizer.innerRun(ProgressTask.java:302)
        at org.geotools.process.ProgressTask.run(ProgressTask.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:701)

This is the returned value in browser inspector:

{"process":{"id":7,"status":"FAILED","progress":0,"reasonForFailure":"java.io.IOException: Current fid index is null, next must be called before write()"}}

Revision history for this message
Daniele Viganò (daniele-vigano) wrote :

This feature works with icebox generated maps. We need to check if the problem is related to our layers.

Revision history for this message
Daniele Viganò (daniele-vigano) wrote :

Some experiments

- Created a new map with one of our layers
- Download -> NOT WORKING

- Exported one layer as SHP (from layer app)
- Uploaded the saved SHP using the layer upload form
- Created a map with this new layer
- Download -> WORKS

There's something wrong in our layers...

Revision history for this message
Daniele Viganò (daniele-vigano) wrote :

Looks related to the "the_geom" column position in the table: https://groups.google.com/forum/#!msg/geoscript/8XQQClbSt9E/ThgV1j5DtxkJ

fid | the_geom | ... | ... | ... WORKS
fid | ... | ... | ... | the_geom DOES NOT WORK

In our DB, after the installation we have the_geom as last column (looks a Django problem)

Changed in oq-platform:
assignee: nobody → Daniele Viganò (daniele-vigano)
status: Confirmed → Triaged
Revision history for this message
Daniele Viganò (daniele-vigano) wrote :
Changed in oq-platform:
status: Triaged → In Progress
Changed in oq-platform:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.