org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='pwd', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #7 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #7 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: ERROR, parser: syntax error at or near "?" at character 518
时间: 2023-09-28 14:06:05 浏览: 547
这是一个 MyBatis 的异常,其中包含了一个 TypeException。异常信息显示设置了一个无效的参数。可能是因为该参数在映射时没有设置正确的 jdbcType,导致 MyBatis 无法将该参数传递给数据库。另外,异常信息中还包含了一个语法错误,可能是 SQL 语句中的问题。建议检查 SQL 语句中的参数是否正确设置,并且检查语法是否正确。
相关问题
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping:
org.mybatis.spring.MyBatisSystemException是MyBatis框架中的一个异常类,通常是由于MyBatis执行SQL语句时出现了异常导致的。在这个异常信息中,还包含了一个嵌套的异常org.apache.ibatis.type.TypeException,它是由于MyBatis在设置参数映射时出现了异常导致的。具体来说,这个异常信息中的错误提示是"Error setting non null for parameter #2 with JdbcType null",意思是在设置第二个参数时出现了错误,因为JdbcType为null。这个错误通常是由于MyBatis无法正确地将Java对象映射到数据库中的数据类型导致的。解决这个问题的方法是检查MyBatis语句中的参数映射是否正确,特别是检查JdbcType是否正确设置。此外,还可以尝试将MyBatis语句中的注释去掉,因为有时注释会影响参数映射的正确性。
"org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='ew.paramNameValuePairs.MPGENVAL3', mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #3 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111"
这是一个MyBatis的异常,其中嵌套了一个TypeException异常。错误原因是在参数映射中设置参数时出现了问题,具体是在设置参数ew.paramNameValuePairs.MPGENVAL3时出现了错误。可能的原因是在设置参数时出现了空值(null)。
阅读全文
相关推荐







