Exception on BLOB and CLOB data types

One Star

Exception on BLOB and CLOB data types

Hi,
We monitored the issue Copy BLOB from 1 Oracle schema to another Oracle schema.
We still have the issue.
Talend is version 2.3.1 (build 11699)
StackTrace :
Exception in component tOracleOutput_1
java.sql.SQLException: Type de colonne non valide
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:3150)
at oracle.jdbc.driver.OraclePreparedStatement.setNullInternal(OraclePreparedStatement.java:3665)
at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:3653)
at migration_sgt.t_gq_site.t_gq_site.tOracleInput_1Process(t_gq_site.java:854)
at migration_sgt.t_gq_site.t_gq_site.runJobInTOS(t_gq_site.java:1571)
at migration_sgt.t_gq_site.t_gq_site.main(t_gq_site.java:1487)

 853>                   if (row4.PHOTO == null) {
854> pstmt_tOracleOutput_1.setNull(12, java.sql.Types.OTHER);
855> } else {
856> pstmt_tOracleOutput_1.setObject(12, row4.PHOTO);
857> }

regards
Community Manager

Re: Exception on BLOB and CLOB data types

Hi
Can you show your job and the shema of Oracle ?
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Exception on BLOB and CLOB data types

Here they are.
Do you need the whole code ?
One Star

Re: Exception on BLOB and CLOB data types

Hi,
I have the same error again. Now with tos 2.4.2.
Starting job reprise_ot_vers_demande at 18:47 09/09/2008.
connecting to socket on port 3475
connected
Exception in component tOracleOutput_1
java.sql.SQLException: Type de colonne non valide: 1111
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.OracleStatement.getInternalType(OracleStatement.java:3499)
at oracle.jdbc.driver.OraclePreparedStatement.setNullCritical(OraclePreparedStatement.java:4307)
at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:4293)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setNull(OraclePreparedStatementWrapper.java:992)
at gost_2_0_2_1.reprise_ot_vers_demande_0_1.reprise_ot_vers_demande.tOracleInput_1Process(reprise_ot_vers_demande.java:8430)
at gost_2_0_2_1.reprise_ot_vers_demande_0_1.reprise_ot_vers_demande.runJobInTOS(reprise_ot_vers_demande.java:22600)
at gost_2_0_2_1.reprise_ot_vers_demande_0_1.reprise_ot_vers_demande.main(reprise_ot_vers_demande.java:22489)
213797 milliseconds
disconnected
Job reprise_ot_vers_demande ended at 18:51 09/09/2008.

						if (mapping_etat_Ok.COMMENTAIRE == null) {
pstmt_tOracleOutput_1.setNull(14,
java.sql.Types.OTHER);
} else {
pstmt_tOracleOutput_1.setObject(14,
mapping_etat_Ok.COMMENTAIRE);
}

Is there a workaround... this bug seemed to happen randomly. It looks pretty permanent now.
One Star

Re: Exception on BLOB and CLOB data types

I saw the bug was reported several times, mainly in http://talendforge.org/bugs/view.php?id=2258.
But with the latest release (3.2.0M3) the problem seems to remain.
One Star

Re: Exception on BLOB and CLOB data types

They solved the if( ... == null) part by using a BLOB instead of OTHER, but I guess in your case (and mine) setObject should be replaced by setBlob.
Six Stars

Re: Exception on BLOB and CLOB data types

I reported the bug at:
http://talendforge.org/bugs/view.php?id=16994
I also posted something related to this issue in another topic
http://www.talendforge.org/forum/viewtopic.php?id=8323
Best regards,
archenroot