Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#15370 closed defect (worksforme)

JOSM cannot open shapefile: java.io.IOException: Dbf has extra record

Reported by: anonymous Owned by: Don-vip
Priority: normal Milestone:
Component: Plugin opendata Version:
Keywords: template_report shapefile Cc:

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Try to open shapefile v_mdg_accesos.shp from http://geoweb.montevideo.gub.uy/geonetwork/srv/es/metadata.show?uuid=7b33c155-0199-4fca-848e-95d18056a616 (the download is available as a zip)

What is the expected result?

JOSM loads shapefile as new layer

What happens instead?

2017-09-29 00:07:02.821 GRAVE: java.lang.RuntimeException: java.io.IOException: Dbf has extra record. Causa: java.io.IOException: Dbf has extra record
java.lang.RuntimeException: java.io.IOException: Dbf has extra record
        at org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.hasNext(ContentFeatureCollection.java:146)
        at org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpReader.parse(ShpReader.java:224)
        at org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpReader.parseDataSet(ShpReader.java:76)
        at org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpImporter.parseDataSet(ShpImporter.java:29)
        at org.openstreetmap.josm.gui.io.importexport.OsmImporter.loadLayer(OsmImporter.java:121)
        at org.openstreetmap.josm.gui.io.importexport.OsmImporter.importData(OsmImporter.java:98)
        at org.openstreetmap.josm.plugins.opendata.core.io.AbstractImporter.importData(AbstractImporter.java:55)
        at org.openstreetmap.josm.gui.io.importexport.FileImporter.importDataHandleExceptions(FileImporter.java:95)
        at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.importData(OpenFileAction.java:359)
        at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:312)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Dbf has extra record
        at org.geotools.data.shapefile.ShapefileFeatureReader.filesHaveMore(ShapefileFeatureReader.java:170)
        at org.geotools.data.shapefile.ShapefileFeatureReader.hasNext(ShapefileFeatureReader.java:179)
        at org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.hasNext(ContentFeatureCollection.java:143)
        ... 16 more

Please provide any additional information below. Attach a screenshot if possible.

This operation worked well in june (with both JOSM and shapefile in june version), and the current JOSM 12712 also can open the june version of the shapefile.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-09-02 14:47:18 +0200 (Sat, 02 Sep 2017)
Build-Date:2017-09-02 20:53:16
Revision:12712
Relative:URL: ^/trunk

Identification: JOSM/1.5 (12712 es) Linux openSUSE Tumbleweed
Memory Usage: 1143 MB / 3543 MB (790 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-8-jre:el paquete openjdk-8-jre no está instalado

Plugins:
+ Create_grid_of_ways (32699)
+ ElevationProfile (33551)
+ FixAddresses (33182)
+ HouseNumberTaggingTool (33160)
+ ImproveOsm (116)
+ ImproveWay (12)
+ PicLayer (33385)
+ apache-commons (33517)
+ conflation (0.5.5)
+ contourmerge (1030)
+ dataimport (33581)
+ editgpx (33004)
+ ejml (32680)
+ geotools (33380)
+ graphview (33004)
+ imagery_offset_db (33547)
+ jts (32699)
+ junctionchecking (33397)
+ lakewalker (33161)
+ log4j (32699)
+ measurement (33088)
+ merge-overlap (33436)
+ michigan_left (33004)
+ opendata (33553)
+ pbf (33568)
+ pdfimport (33579)
+ public_transport (33166)
+ reverter (33572)
+ routing (33004)
+ turnlanes (33294)
+ turnrestrictions (33537)
+ undelete (33480)
+ utilsplugin2 (33579)

Tagging presets:
+ http://somewhere.dk/email/josm/source.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Quick-highways&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Noname&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/BesideTheRoad_Speed&zip=1

Last errors/warnings:
- E: java.lang.RuntimeException: java.io.IOException: Dbf has extra record. Causa: java.io.IOException: Dbf has extra record
- E: org.openstreetmap.josm.io.IllegalDataException: java.io.IOException: java.lang.RuntimeException: java.io.IOException: Dbf has extra record. Causa: java.io.IOException: java.lang.RuntimeException: java.io.IOException: Dbf has extra record. Causa: java.lang.RuntimeException: java.io.IOException: Dbf has extra record. Causa: java.io.IOException: Dbf has extra record
- E: Error - <html>No se pudo leer el archivo "v_mdg_accesos.shp".<br>El error es:<br>java.io.IOException: java.lang.RuntimeException: java.io.IOException: Dbf has extra record</html>

Change History (4)

comment:1 by Don-vip, 8 years ago

Component: Plugin shapetoolsPlugin opendata
Description: modified (diff)
Keywords: shapefile added
Owner: changed from team to Don-vip

by Don-vip, 8 years ago

Attachment: v_mdg_accesos.zip added

comment:2 by Don-vip, 8 years ago

Resolution: worksforme
Status: newclosed

I've tried and it works fine with the attached file. Probably your download was corrupted, please try again.

comment:3 by anonymous, 8 years ago

Thanks. Please accept my appologies for the time wasted.

The problem was solved with today's version of the shp.
The older zip was downloaded ok, but the files in seems not, especially the .shx which is small (100 bytes vs 2.8 MB)

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.