Error attempting to get column ‘xxx’ from result set. Cause: java.sql.sqlexception: unable to convert to internal representation. Error resolution during Oracle database query

Overall error log details:

Org.springframework.jdbc.uncategorized sqlexception: error attempting to get column ‘xxx’ from result set. Cause: java.sql.sqlexception: unable to convert to internal representation
; uncategorized SQLException; SQL state [99999]; error code [17059]; Cannot convert to internal representation; Nested exception is java.sql.sqlexception: cannot convert to internal representation

There are many errors that can lead to this problem. Let me say that I made the error because I used the in the Lombok plug-in  @ Builder   This annotation

The first solution is to kill this annotation. When assigning an object, you can directly xxx.setxxx;

The second solution is to add these two annotations @ allargsconstructor on Lombok    @ NoArgsConstructor   Add a construction method that does not participate in all parameters,

Simply put, @ builder is added to mybatis to query without parameters   This annotation results in the absence of a parameterless structure, resulting in an error.

 

Summary, problems

Solution 1: directly kill the @ builder annotation on the entity class

Solution 2: add @ allargsconstructor @ noargsconstructor to the entity class   annotation



Similar Posts: