One Star

org.postgis is not a valid type

Hi,
I have installed version 5.2.0 of TOS Data Integration and SDI 5.1.1 in TOS plugins repertory
I have imported my old jobs in new project in workspace of version 5.2.0.
In tPostgresInput, i run the following request 'select st_union(geom) from mytable'. In SQL builder windows, the request runs well, but i run the job (tPostgresInput+tMap+tLogRow), i have the following error message :
'org.postgis is not recognized as valid type' and 'org.postgis.PGgeometry is not recognized as valid type'.
I don't remember, but this job should run with TOS 4.1.1 and SDI 4.1.0.
Thanks for help.
Regards.
Christophe

  • SDI
9 REPLIES
One Star Fxp
One Star

Re: org.postgis is not a valid type

Hello Christophe,
I would try that
http://www.talendforge.org/forum/viewtopic.php?pid=63813#p63813
"Workaround is : Add a sGeomTxtInput (which will do nothing) but at least will load the library required for the tPostgres*."
Cheers.
Francois
One Star

Re: org.postgis is not a valid type

Hello François,

The sGeomTxtInput was already present in my job.
I have tried others solutions.
The TOS/lib/java contained only 3 files. I have copied TOS/plugins/org.talend.sdi.designer.components_4.2.0/components/sGeoInput/*.jar to TOS/lib/java. I have ran TOS application. The generation engine is OK. I have tried with CTRL+SHIFT+F3, idem.
I still have the same error message whan i run the job:
'org.postgis is not recognized as valid type' and 'org.postgis.PGgeometry is not recognized as valid type'.
I don't remember, but this job should run with TOS 4.1.1 and SDI 4.1.0.
I simply test the following request : SELECT ST_Union(geom) as emprise FROM mytable that run in SQL builder windows.
Thanks for your help.
Christophe
One Star Fxp
One Star

Re: org.postgis is not a valid type

Christophe, Are you really using tPostgreslInput ?
Testing tPostgresInput > tLogRow + sGeomTxtInput with the SQL :
SELECT ST_Union(the_geom) as emprise FROM dep67pop
works fine for me.
Francois
One Star

Re: org.postgis is not a valid type

Hi,
I'm really using tPostgreslInput.
I have done a new TOS 5.2.0 installation with SDI 5.2.0.
The engine generation is OK. I have well copied SDI content to TOS plugins directory.
I have tested with other request on others tables in others schemas.
I just copied TOS/plugins/org.talend.sdi.designer.components_4.2.0/components/sGeoInput/*.jar to TOS/lib/java and restart TOS.
Still the same error.
Perhaps a configuration problem with OS and Java engine : Windows Seven and jre6 and jre7 in c:/program files/java directory
Thanks.
Regards.
Christophe
One Star Fxp
One Star

Re: org.postgis is not a valid type

Christophe, could you provide the content of the workspace/.metadata/.log when you switch to the code tab of the job and run the job. That may help.
In your plugins/org.talend.designer.component.localprovider_xyz/tPostgresqlInput/tPostgresqlInput_java.xml, could you check that you have :

and that the lib exist.
Also check in the module view that you don't have any issues with PostGIS lib.
Thanks.
Francois
One Star

Re: org.postgis is not a valid type

Hello François,
meilleurs voeux pour 2013.
Christophe, could you provide the content of the workspace/.metadata/.log when you switch to the code tab of the job and run the job. That may help.
=> This is the message when job run and i click on continue in pop-up 'Search errors in jobs'
!ENTRY org.talend.platform.logging 1 0 2013-01-07 16:56:14.708
!MESSAGE 2013-01-07 16:56:14,708 INFO org.talend.designer.core.runprocess.Processor - Command line: C:/Program Files (x86)/Java/jre7/bin/java.exe -Xms256M -Xmx1024M -Dfile.encoding=UTF-8 -cp C:/TALEND_SDI/TOS_DI-Win32-r95165-V5.2.1/workspace/.Java/lib/dom4j-1.6.1.jar;
C:/TALEND_SDI/TOS_DI-Win32-r95165-V5.2.1/workspace/.Java/lib/jts-1.9.jar;
C:/TALEND_SDI/TOS_DI-Win32-r95165-V5.2.1/workspace/.Java/lib/org.talend.sdi.jar;
C:/TALEND_SDI/TOS_DI-Win32-r95165-V5.2.1/workspace/.Java/lib/postgresql-8.3-603.jdbc3.jar;
C:/TALEND_SDI/TOS_DI-Win32-r95165-V5.2.1/workspace/.Java/classes;
C:/TALEND_SDI/TOS_DI-Win32-r95165-V5.2.1/workspace/.Java/lib; projet_sig_pnv.test_0_1.test --context=Default --stat_port=3473 %*
---
In your plugins/org.talend.designer.component.localprovider_xyz/tPostgresqlInput/tPostgresqlInput_java.xml, could you check that you have :

and that the lib exist.
=> in this file all modules were to false. I have updated this modules to true
=> the postgis_1.4.0.jar file is in C:\TALEND_SDI\TOS_DI-Win32-r95165-V5.2.1\plugins\org.talend.sdi.designer.components_5.2.0\components\sGeoInput
In this file others modules are presents
- postgresql-8.3-603.jdbc3.jar
- org.talend.sdi.jar
- jts-1.9.jar
and all these modules exist in talend directory
Even if modules are to true in xml file, if the org.talend.sdi.jar and jts-1.9.jar are not present in lib/java directory a window message appear with 'Missing jar : org.talend.sdi.jar and jts-1.9.jar'
It's possible same issue for postgis. So, i have copied postgis_1.4.0.jar in lib/java => KO then i have copied postgis-driver-1.0.jar => KO
Also check in the module view that you don't have any issues with PostGIS lib.
=> How to have this module view ?
Thanks.
Francois
New idea ?
Thanks
Christophe
One Star Fxp
One Star

Re: org.postgis is not a valid type

Christophe, one more idea: Add tLibraryLoad and force postgis_1.4.0.jar to be loaded then create link onComponentOk to the current job. That should do it.
I suspect the issue is related the to required="true/false" parameters at some point but still can not reproduce.
Cheers.
Francois
One Star

Re: org.postgis is not a valid type

Hello François,
i added tLibraryLoad to force postgis librairy without link other component (same sGeomTxtInput to force geometry type) and it's OK the Geometry type is again loaded. But finally, just updated to true the required librairies in xml files it's OK. However, yesterday i'm sure to have tested this solution
Resume for all members :
If following error appear
'org.postgis is not recognized as valid type' and 'org.postgis.PGgeometry is not recognized as valid type'.
1 -> copied TOS/plugins/org.talend.sdi.designer.components_4.2.0/components/sGeoInput/*.jar to TOS/lib/java
2 -> edited component with error (for me tPostgresInput) => edited plugins/org.talend.designer.component.localprovider_xyz/tPostgresqlInput/tPostgresqlInput_java.xml
and in block changed 'REQUIRED' parameter value of the modules (librairies) loaded to true if value is false
=> Normally the error not appears.
3 -> if libraries (modules) changed to true are not loaded, Add tLibraryLoad and force postgis_1.4.0.jar in job without link link with others components
François, Required parameter at false, it's a bug or not ?
In any case, thank you again for solving the issue.
Christophe
One Star Fxp
One Star

Re: org.postgis is not a valid type

> François, Required parameter at false, it's a bug or not ?
Christophe, it's done on purpose in order for a regular TDI (not having the spatial extension) to not complain about missing postgis libs (because not used in TDI only). But in any case, thoses libs (even with required = false) should be added to the classpath when running the job, which does not look to be the case.
Thanks for the detailed feedback.
Francois