on ‎2020 Mar 04 8:40 PM
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)
Request clarification before answering.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.