mybatis Error querying database. Cause: org.apache.ibatis.type.TypeException: Could not set paramet

  • Post author:
  • Post category:其他


错误:

org.apache.ibatis.exceptions.PersistenceException:

### Error querying database.  Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=’userCustom.username1′, mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId=’null’, jdbcTypeName=’null’, expression=’null’}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1。

### The error may exist in mybatis/mapper/UserMapper.xml

### The error may involve mybatis.mapper.UserMapper.findUserList-Inline

### The error occurred while setting parameters

### SQL: SELECT * FROM “user” where “user”.sex=? and “user”.username1 like ‘%?%’

### Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=’userCustom.username1′, mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId=’null’, jdbcTypeName=’null’, expression=’null’}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1。

at org.apach



版权声明:本文为baidu_34906160原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。