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

Error exporting postgis table to shapfile

hi,
when i run my job, i have this message :
Starting job PG_TO_SHP at 14:04 24/10/2008.
connecting to socket on port 4801
connected
Exception in component sShapefileOutput_1_SO
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.add(Unknown Source)
at org.geotools.feature.DefaultFeatureTypeFactory.add(DefaultFeatureTypeFactory.java:43)
at org.geotools.feature.FeatureTypeBuilder.addType(FeatureTypeBuilder.java:392)
at testpg.pg_to_shp.PG_TO_SHP.sPostgisInput_1_PGProcess(PG_TO_SHP.java:410)
at testpg.pg_to_shp.PG_TO_SHP$1.run(PG_TO_SHP.java:1174)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.add(Unknown Source)
at org.geotools.feature.DefaultFeatureTypeFactory.add(DefaultFeatureTypeFactory.java:43)
at org.geotools.feature.FeatureTypeBuilder.addType(FeatureTypeBuilder.java:392)
at testpg.pg_to_shp.PG_TO_SHP.sPostgisInput_1_PGProcess(PG_TO_SHP.java:410)
at testpg.pg_to_shp.PG_TO_SHP$1.run(PG_TO_SHP.java:1174)
1391 milliseconds
disconnected
Job PG_TO_SHP ended at 14:04 24/10/2008.
i need some helps to resolve this error.
Regards,
Jérôme Rolland

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi Jérôme, hum still quite hard to figure out what's wrong with only this message.
Could you make a first test: connect your postgres input component to a tLogRow component and see what happens ? tLogRow output everything in the run job console. If that's ok, then it's a problem on the output one.
HTH.
Francois
Anonymous
Not applicable
Author

Hi francois,
Like you preconize i tested with tLogRow, it's ok
two screenshot with no errors and a third with errors

regards,
Jérôme
Anonymous
Not applicable
Author

Hi francois,
0683p000009MA9p.png All the screenshots now :



regards,
Anonymous
Not applicable
Author

Hi Jérôme,
You can not handle Geometric objects with tPostgreSQL* components.
Indeed, you should use sPostgis* components to handle geometry columns in SDI 1.2.0.
In the new upcoming release, the 1.3.0, you will be able to use tPostgreSQL* components using the "Geometry" type for your geometry columns.
So for now, you will have to wait until 1.3.0 or to switch to sPostgis* components.
FYI, the 1.3.0 release is coming very soon! 0683p000009MA9p.png
Cheers,
Mathieu
Anonymous
Not applicable
Author

Hi Mathieu,
Thanks for your help,
indeed, if I use the sPostgisInput component in the place of tPostgresInput component,
the shapefile is created.
But for this, i must specify that my geometry field (wkb_geometry) is an object type in the place of an string type.
It is the Retrieve Shema command that initialize my geometry field like an string type, why not
like an object type ?

0683p000009MA9p.png I am impatient to test the 1.3.0 release...
regards,
Anonymous
Not applicable
Author

Hello,
But for this, i must specify that my geometry field (wkb_geometry) is an object type in the place of an string type.

Yep in SDI 1.2 **ALL** Geometry should be define as a "the_geom" column name of type "Object". Object is a generic Talend Type useful to do more or less everything :/. That's why in 1.3, we added a new Talend type called "Geometry" which has to be used for all your geometry columns.
Columns names are not important.
It is the Retrieve Shema command that initialize my geometry field like an string type, why not
like an object type ?

That point also changed in SDI 1.3 as we defined how to map a postgres geometry type to a Talend geometry type and should be supported in all metadata discovery wizard in Talend. Test and comments are welcomed. If you found any side effects on classical Talend component do not hesitate to post on the forum in order to check that this new Geometry type is not causing trouble in more generic talend process.

0683p000009MA9p.png I am impatient to test the 1.3.0 release...
regards,

Go online http://spatialdataintegrator.org
Cheers.
Francois
Anonymous
Not applicable
Author

Hi francois,

0683p000009MACn.png i had downloaded the new version,
and indeed version 1.3.0 brings the solution to the points evoked previously.
0683p000009MACn.png 0683p000009MACn.png 0683p000009MACn.png 0683p000009MACn.png
regards,