Cause: java.sql.SQLDataException: Cannot determine value type from string Error handling and cause analysis.

error message

Record an error message encountered today.
[Party building] Environment: non-production, ip: 172.17.63.5
system exception
Error attempting to get column 'resourceColumn' from result set. Cause: java.sql.SQLDataException: Cannot determine value type from string 'Party building news'
; Cannot determine value type from string 'Party Building News'; nested exception is java.sql.SQLDataException: Cannot determine value type from string 'Party Building News'

insert image description here

solution

Add no-argument and full-argument construction methods in the corresponding entity class

@NoArgsConstructor
@AllArgsConstructor

Reason: lack of no-argument constructor
SQL uses objects to receive return values, corresponding to the lack of no-argument constructor in JAVA Bean.

If you create a parameter-less constructor with incomplete parameters, lombok's @Data, the default no-argument constructor will be invalid, and you still need to join manually

It's over, sprinkle flowers, and leave a message if you have any questions.

Guess you like

Origin blog.csdn.net/luck_sheng/article/details/129667538