java.io.IOException: Current fid index is null, next must be called before write()

Google Groups | Jared Erickson | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: [GeoScript] Unable to export layer to shapefile

    Google Groups | 4 years ago | Jared Erickson
    java.io.IOException: Current fid index is null, next must be called before write()

    Root Cause Analysis

    1. java.io.IOException

      Current fid index is null, next must be called before write()

      at org.geotools.data.shapefile.indexed.IndexedFidWriter.write()
    2. org.geotools.data
      FeatureStore$addFeatures.call
      1. org.geotools.data.shapefile.indexed.IndexedFidWriter.write(IndexedFidWriter.java:252)
      2. org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.java:101)
      3. org.geotools.data.shapefile.ShapefileFeatureWriter.close(ShapefileFeatureWriter.java:231)
      4. org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.close(IndexedShapefileFeatureWriter.java:109)
      5. org.geotools.data.InProcessLockingManager$1.close(InProcessLockingManager.java:350)
      6. org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.java:329)
      7. org.geotools.data.directory.DirectoryFeatureStore.addFeatures(DirectoryFeatureStore.java:104)
      8. org.geotools.data.FeatureStore$addFeatures.call(Unknown Source)
      8 frames
    3. geoscript.workspace
      Workspace$add.call
      1. geoscript.workspace.Workspace.add(Workspace.groovy:152)
      2. geoscript.workspace.Workspace.add(Workspace.groovy)
      3. geoscript.workspace.Workspace$add$0.callCurrent(Unknown Source)
      4. geoscript.workspace.Workspace.add(Workspace.groovy:127)
      5. geoscript.workspace.Workspace$add.call(Unknown Source)
      5 frames
    4. Unknown
      exportPostgisToShapefile.run
      1. exportPostgisToShapefile.run(exportPostgisToShapefile.groovy:38)
      1 frame