Five Stars

Exception in component tOracleSCD Invalid argument(s) in call: Use setNull for user-defined types and REF types

Hello,

 

Note: I'm using ojdbc7 (Oracle 12c) 

 

I reading an Oracle Blob (as byte[]), and when trying to write a null value through  tOracleSCD I'm getting this error:

 

Starting job Stg1Led_Norma at 19:07 30/06/2017.
[statistics] connecting to socket on port 3370
[statistics] connected
Exception in component tOracleSCD_1
java.sql.SQLException: Invalid argument(s) in call: Use setNull(int parameterIndex, int sqlType, String typeName) for user-defined types and REF types
at oracle.jdbc.driver.OraclePreparedStatement.setNullCritical(OraclePreparedStatement.java:5937)
at oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:5818)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setNull(OraclePreparedStatementWrapper.java:1292)
at dw_dileg.stg1led_norma_0_1.Stg1Led_Norma.tOracleInput_3Process(Stg1Led_Norma.java:8375)
at dw_dileg.stg1led_norma_0_1.Stg1Led_Norma.tOracleInput_1Process(Stg1Led_Norma.java:1890)
at dw_dileg.stg1led_norma_0_1.Stg1Led_Norma.tOracleRow_2Process(Stg1Led_Norma.java:9858)
at dw_dileg.stg1led_norma_0_1.Stg1Led_Norma.tOracleRow_1Process(Stg1Led_Norma.java:9669)
at dw_dileg.stg1led_norma_0_1.Stg1Led_Norma.runJobInTOS(Stg1Led_Norma.java:10602)
at dw_dileg.stg1led_norma_0_1.Stg1Led_Norma.main(Stg1Led_Norma.java:10212)
[statistics] disconnected
Job Stg1Led_Norma ended at 19:08 30/06/2017. [exit code=1]

 

The failing java code is :

if (NovosOrigemSCD.TEXTOATUALIZADO == null) {
insertionStatement_tOracleSCD_1
.setNull(
15,
java.sql.Types.ARRAY);
} else {
insertionStatement_tOracleSCD_1
.setBytes(
15,
NovosOrigemSCD.TEXTOATUALIZADO);
}

 

How can I change the code to use java.sql.Types.BLOB and setBlob instead setBytes?

 

Thanks,

Flavio.

 

 

FLAVIO LUIZ VANI
  • Data Integration
Tags (4)
3 REPLIES
Moderator

Re: Exception in component tOracleSCD Invalid argument(s) in call: Use setNull for user-defined types and REF types

Hi,

Could you please post your component tOracleSCD setting screenshot here? In this way, we can get more information from your attachment.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Exception in component tOracleSCD Invalid argument(s) in call: Use setNull for user-defined types and REF types

Hi,

Hope this image can help:details.png

 

 

 

FLAVIO LUIZ VANI
Five Stars

Re: Exception in component tOracleSCD Invalid argument(s) in call: Use setNull for user-defined types and REF types

Hi,

Any clues?

Thanks,
Flávio.
FLAVIO LUIZ VANI