1, the database field of the original type is the date type, because of the data reason, the field is changed to a string type, resulting in MyBatis reported Java.lang.illegalargumentexception,
Because the database changes I don't know, so this question has been checked for a long time
2, the solution process
The first thought was SQL, but the MyBatis assembled statements were put into plsql without errors
Next locate the database replacement is not the same, the result found a field with the same name, the original database type is date, after the database is changed, the field type is string
After the execution of SQL, the returned data is inconsistent with the defined data type, resulting in an error
3. Solution
Modify the defined object's field type to string
4. Conclusion
After you have written your code, it is a good idea to keep the data consistent when you migrate it, or to check the impact on existing code after making changes.
Mybatis java.lang.IllegalArgumentException:uncategorized SQLException for SQL []; SQL state [NULL]