planetfederal / geoserver-exts

Other
31 stars 40 forks source link

Importer GDB results in No data to import #59

Open jodygarnett opened 10 years ago

jodygarnett commented 10 years ago

Encountered testing opengeo-importer-gdb with a simple locations.gdb consisting of points.

CentOS

The following two steps allowed locations.gdb/gdb to be successfully imported.

  1. Be sure to check file permissions of tomcat:tomcat. Without permission we get a generic "No data to import" message.
  2. Be sure to open locations.gdb/gdb (opening locations.gdb will use the directory datastore, attempting to process each file contained in the directory)

    Windows

    • [ ] Windows 2008 Server - OPEN

This issue is unresolved - sanity check steps for testing:

  1. Check permissions: should be SYSTEM as Tomcat runs as SYSTEM.
  2. Double check appropriate permissions by looking at GEOSERVER_DATA_DIRECTORY (located at C:\ProgramData\Boundless\OpenGeo\geoserver)
  3. Check path to gdb file: C:\ProgramData\Boundless\OpenGeo\geoserver\data\locations.gdb\gdb
jodygarnett commented 10 years ago

Okay here is the cause on windows:

Caused by: java.lang.NullPointerException: Could not acquire data access 'gdb'
    at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:561)

This is curious as I did not expect ResourcePool to be used here at all, we are trying to use GDBDataStoreFactory directly from GDBFileFormat. No catalog should be involved ...

Okay I do not think this exception was caused by my test - going to clear the logs and try again.

jodygarnett commented 10 years ago

Turning on verbose logging - and I have some evidence that our windows environment is not set up correctly. We are looking for [importer.gdb] logs which were added to help cover this scenario:

2014-07-08 16:21:34,169 WARN [importer.gdb] - Check OGR Envrionment: FileGDB not supported:
 [ARCGEN, AVCBin, AVCE00, AeronavFAA, BNA, CSV, DGN, DXF, EDIGEO, ESRI Shapefile, GML,
 GMT, GPSBabel, GPSTrackMaker, GPX, GeoJSON, GeoRSS, Geoconcept, Geomedia, HTF, Idrisi,
 KML, MSSQLSpatial, MapInfo File, Memory, ODBC, OpenAir, PCIDSK, PDS, PGDump, PGeo, REC,
 S57, SDTS, SEGUKOOA, SEGY, SUA, SVG, TIGER, UK .NTF, VFK, VRT, XPlane]
jodygarnett commented 10 years ago

Code links useful in debugging:

1) Check environment: https://github.com/boundlessgeo/geoserver-exts/blob/master/importer-gdb/src/main/java/org/geoserver/importer/gdb/GDBDataStoreFactory.java#L92

This will only output a single warning into the logs so you may have to hunt for it. You can reproduce a similar check by checking ogrinfo --formats for the "FileGDB" driver.

2) Confirm "gdb" file: https://github.com/boundlessgeo/geoserver-exts/blob/master/importer-gdb/src/main/java/org/geoserver/importer/gdb/GDBFileFormat.java#L85

mweisman commented 10 years ago

Looks like the issue was missing gridshift csv files. I'll get those added to the windows installer and we should be good to go.