Skip to content
Advertisement

How to set large string as param without getting ORA-01460: unimplemented or unreasonable conversion error?

In spring-boot using namedParameterJdbcTemplate (Oracle db version 12 and odbc8 driver 12.2)

I am getting the following error while executing a SELECT query bound with a parameter larger than 4000 character whereas update queries working fine.

ORA-01460: unimplemented or unreasonable conversion requested

The unit test I am trying to execute;

Is there any way to set this large param via MapSqlParameterSource?

Advertisement

Answer

I am @ahmet-orhan ‘s colleague, we’ve found a solution.

Thanks @kfinity for your suggestion, It is working for insert and update but we are still getting this error when we set clob or blob as “paremeter” in select statements.

If using a driver that supports JDBC4.0, the right solution is create a DefaultLobHandler and set streamAsLob or createTemporaryLob to true.

We prefer streamAsLob but to be honest we have no idea which one is better.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement