[Solved] Error setting null for parameter #6 with JdbcType OTHER…

Environmental Science:

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

When mybatis inserts a null value, you need to specify a jdbctype because mybatis cannot convert

Solution:

In the insert statement, add JDBC type

For example:

#{name,jdbcType=VARCHAR}

Similar Posts: