Error setting null for parameter #6 with JdbcType OTHER...

created at 01-08-2022 views: 92

environment

oracle database

error content

### Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #10 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: invalid column type of

When MyBatis inserts an empty value, you need to specify JdbcType, because mybatis cannot convert it

solution

In the insert statement, add jdbcType

For example:

#{name,jdbcType=VARCHAR}
created at:01-08-2022
edited at: 01-08-2022: