You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2008-10-24 13:10:43

jrmrolland
Member
8 posts

jrmrolland said:

Error exporting postgis table to shapfile

Tags: [PostgreSQL]

hi,

when i run my job, i have this message :

Starting job PG_TO_SHP at 14:04 24/10/2008.
[trace] connecting to socket on port 4801
[trace] 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
[trace] disconnected
Job PG_TO_SHP ended at 14:04 24/10/2008. [exit code=1]

i need some helps to resolve this error.

Regards,
Jérôme Rolland


Jérôme Rolland

Offline

#2 2008-10-27 08:09:13

Fxp
Member
193 posts

Fxp said:

Re: Error exporting postgis table to shapfile

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

Offline

#3 2008-10-27 11:00:42

jrmrolland
Member
8 posts

jrmrolland said:

Re: Error exporting postgis table to shapfile

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


Jérôme Rolland

Offline

#4 2008-10-27 11:22:21

jrmrolland
Member
8 posts

jrmrolland said:

Re: Error exporting postgis table to shapfile

Hi francois,

wink  All the screenshots now :






regards,


Jérôme Rolland

Offline

#5 2008-10-27 13:46:54

mcoudert
Member
55 posts

mcoudert said:

Re: Error exporting postgis table to shapfile

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! wink

Cheers,
Mathieu

Offline

#6 2008-10-27 14:56:42

jrmrolland
Member
8 posts

jrmrolland said:

Re: Error exporting postgis table to shapfile

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 ?


wink I am impatient to test the 1.3.0 release...

regards,


Jérôme Rolland

Offline

#7 2008-10-28 11:24:38

Fxp
Member
193 posts

Fxp said:

Re: Error exporting postgis table to shapfile

Hello,

jrmrolland wrote:

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 hmm. 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.

jrmrolland wrote:

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.


jrmrolland wrote:

wink I am impatient to test the 1.3.0 release...

regards,

Go online http://spatialdataintegrator.org

Cheers.
Francois

Offline

#8 2008-10-28 14:39:07

jrmrolland
Member
8 posts

jrmrolland said:

Re: Error exporting postgis table to shapfile

Hi francois,


smile i had downloaded the new version,
and indeed version 1.3.0 brings the solution to the points evoked previously.

smile smile smile smile

regards,


Jérôme Rolland

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy