Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

PostGIS to shapefile

Hello,
I am testdriving SDI and performed these simple steps:
- Start SDI
- Create a Job
- Create a sPostgisInput
- Create a sShapefileOutput
Define the sPostgisInput by hand, assigning a repository schema to a valid postgresql connection -> table adressen
leave the shapefileoutput unaltered
I connect the sPostgisInput with the sShapefileOutput with a row -> main
Now I run the job. The output is this:
Starting job PostgisToShape at 15:25 16/09/2009.
16-sep-2009 15:25:53 org.geotools.data.shapefile.dbf.DbaseFileHeader addColumn
WARNING: FieldName gbastraatnr is longer than 10 characters, truncating to gbastraatn
16-sep-2009 15:25:53 org.geotools.data.shapefile.ShapefileDataStore createSchema
WARNING: PRJ file not generated for null CoordinateReferenceSystem
16-sep-2009 15:25:53 org.geotools.data.shapefile.dbf.DbaseFileHeader addColumn
WARNING: FieldName gbastraatnr is longer than 10 characters, truncating to gbastraatn
16-sep-2009 15:25:53 org.geotools.arcsde.ArcSDEDataStoreFactory
WARNING: The ESRI ArcSDE Java API seems to not be on your classpath. Please verify that all needed jars are. ArcSDE data stores will not be available.
16-sep-2009 15:25:53 org.geotools.data.db2.DB2DataStoreFactory isAvailable
INFO: DB2 driver found: false
Source CRS is: PROJCS],
TOWGS84,
AUTHORITY],
PRIMEM],
UNIT,
AXIS,
AXIS,
AUTHORITY],
PROJECTION],
PARAMETER,
PARAMETER,
PARAMETER,
PARAMETER,
PARAMETER,
UNIT,
AXIS,
AXIS,
AUTHORITY]
Exception in component sShapefileOutput_1_SO
java.lang.NullPointerException
at org.geotools.data.shapefile.ShapefileFeatureWriter.write(ShapefileFeatureWriter.java:348)
at org.geotools.data.InProcessLockingManager$1.write(InProcessLockingManager.java:331)
at ogg.postgistoshape_0_1.PostgisToShape.sPostgisInput_1_PGProcess(PostgisToShape.java:1806)
at ogg.postgistoshape_0_1.PostgisToShape.runJobInTOS(PostgisToShape.java:1994)
at ogg.postgistoshape_0_1.PostgisToShape.main(PostgisToShape.java:1908)
java.lang.NullPointerException
at org.geotools.data.shapefile.ShapefileFeatureWriter.write(ShapefileFeatureWriter.java:348)
at org.geotools.data.InProcessLockingManager$1.write(InProcessLockingManager.java:331)
at ogg.postgistoshape_0_1.PostgisToShape.sPostgisInput_1_PGProcess(PostgisToShape.java:1806)
at ogg.postgistoshape_0_1.PostgisToShape.runJobInTOS(PostgisToShape.java:1994)
at ogg.postgistoshape_0_1.PostgisToShape.main(PostgisToShape.java:1908)
16-sep-2009 15:25:56 org.geotools.data.jdbc.QueryData finalize
SEVERE: There's code leaving readers, writers or iterators unclosed (you got an unclosed QueryData object, which is usually held by a reader or a writer).
Call reader/writer.close() or FeatureCollection.close(iterator) after using them to ensure they do not hold state such as JDCB connections.
QueryData was open against feature type: adressen
Job PostgisToShape ended at 15:25 16/09/2009.
Where do I look?
This is no rocket science. I would gladly be informed on how this can be done easily and what the errors mean.

Labels (3)
2 Replies
Anonymous
Not applicable
Author

Hello, did you check that shapefile output schema is correct ?
If you turn on statistics, does it fail on first row ?
Ciao.
Francois
Anonymous
Not applicable
Author

OK postGIS and Postgresql seem to be working again. I have connected to the server and can see the postgis database. I went through the water data tutorial fine with PostgreSQL working fine until the last part 'Export Shapefiles from PostGIS'. I get the error mentioned in the beginning of this post by Tsnake and I can't install the patch as described earlier.
Anything else I can try?..