cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[Solved] SAP DBTech JDBC: Cannot convert SQL type VARCHAR to Java type java.sql.Clob.

Former Member
0 Likes
2,332

Hello,

I have an issue with getting records from a table wiith CLOB columns. I am using spring boot to access HANA using JPA query. Some of the clob column values can be null.

When doing any retrieval like findAll(), i get the error:

Wed Mar 04 12:14:01.840 PST 2020 [scheduling-1:::::] [o.h.e.jdbc.spi.SqlExceptionHelper: WARN ][] [] - SQL Error: -11214, SQLState: 07006
Wed Mar 04 12:14:01.840 PST 2020 [scheduling-1:::::] [o.h.e.jdbc.spi.SqlExceptionHelper: ERROR][] [] - SAP DBTech JDBC: Cannot convert SQL type VARCHAR to Java type java.sql.Clob.

Can anyone help me ?

Edit: I was able to figure it out. The issue is pretty interesting. The column apparently was a VARCHAR column previously which was altered to a CLOB column. Turns out, we should never do that. The right way is to create a temp column, move the contents from this col to the temp and drop the previous column (edited)

Accepted Solutions (0)

Answers (0)