Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1
执行mybaits sql
<delete id="delete4BatchesByLineCi" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" separator=";">
-- update VPN_FIREWALL set is_delete = true where where LINE_CI = #{item}
delete from VPN_FIREWALL where LINE_CI = #{item, jdbcType=VARCHAR}
</foreach>
</delete>
提示错误:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException:
Could not set parameters for mapping: ParameterMapping{property='__frch_item_0', mode=IN, javaType=class java.lang.String, jdbcType=VARCHAR, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}.
Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType VARCHAR .
Try setting a different JdbcType for this parameter or a different configuration property.
Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1。\
根据网上类似问题解决方案,都不能解决此问题,对比在另一处 这种用法没有问题,删除注释行 ,问题解决。
--update VPN_FIREWALL set is_delete = true where where LINE_CI = #{item}
Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.postgresql.util.PSQLException: 栏位索引超过许可范围:2,栏位数:1的更多相关文章
- 又一个无效的列类型错误Error setting null for parameter #7 with JdbcType NULL . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLExcept
在更新数据时候出现的错误 更新代码如下: <update id="modify" parameterType="Standard"> update ...
- Parameter index out of range(1 > number of parameters, which is 0)参数索引超出范围
今天在写项目的过程中,有一个模块是做多选删除操作,通过servlet获得多选框的value组,然后执行sql操作.如下: 1 @RequestMapping( "/delteCouse.do ...
- java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2).
java.sql.SQLException: Parameter index out of range (3 > number of parameters, which is 2). java. ...
- IDEA_MyBatis_SQLException:Parameter index out of range坑
报错信息:超出数据库数据表设定的规定长度了 nested exception is org.apache.ibatis.type.TypeException: Could not set parame ...
- Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16944839 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.
今天发现task微服务的error日志报如下错误: Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large ...
- MyBatis 源码分析——类型处理器
官网上面讲到:无论是 MyBatis 在预处理语句(PreparedStatement)中设置一个参数时,还是从结果集中取出一个值时, 都会用类型处理器将获取的值以合适的方式转换成 Java 类型.那 ...
- 【MyBatis源码分析】insert方法、update方法、delete方法处理流程(下篇)
Configuration的newStatementHandler分析 SimpleExecutor的doUpdate方法上文有分析过: public int doUpdate(MappedState ...
- Mybatis源码学习之TypeHandler
ORM框架最重要功能是将面向对象方法中的对象和关系型数据库中的表关联了起来,在关联过程中就必然涉及到对象中的数据类型和数据库中的表字段类型的转换,Mybatis中的org.apache.ibatis. ...
- mybatis的typeHandler
typeHandler作用: 1.传参时将javaType类型转换成jdbcType 2.结果集中ResultSet中取值时,jdbcType转换为javaType; 系统自定义的typeHandle ...
随机推荐
- python基础(三)闭包与装饰器
闭包(closure): 内嵌函数通过调用外部嵌套函数作用域内的变量,则这个内嵌函数就是闭包. 闭包必须满足三个条件: 必须有一个内嵌函数 内嵌函数必须引用外部嵌套函数中的变量 外部函数的返回值必须是 ...
- mybaits-plus总结
import java.math.BigDecimal; import java.util.Arrays; import java.util.Date; import java.util.List; ...
- 配置vSphere Web Client超时值
1.默认超时值120分钟 2.webclient.properties文件位置: Windows系统:C:\ProgramData\VMware\vCenterServer\cfg\vsphe ...
- 八十、SAP中数据库操作之 (FOR ALL ENTRIES IN )用法,比较难明白
一.代码如下 二.查询结果如下 三.我们把it_spfli的内表内容添加两个 四.结果如下,查询的是所有的JFK和SFO机场. *&------------------------------ ...
- 二十四、SAP中打开帮助文件
一.在代码输入界面,选中一个关键词,按一下F1,或者问号 二.显示出的帮助内容
- 132-PHP子类和父类同名函数的调用
<?php class father{ //定义father类 public function cook(){ return '烹饪'; } } class son extends father ...
- Delphi MD5
unit uMD5; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics; type MD5Count = ...
- 在登陆退出时候使用Vuex
1.登陆的时候,在登陆模块请求接口,然后获取一个access_token,获取用户权限.保存到缓存里面. 2.退出的时候,请求退出接口,把缓存里面的access_token清除. 一旦要在登陆里面做一 ...
- mybatis基础CURD的学习
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "- ...
- 使用Oracle VM VirtualBox创建虚拟机教程
使用Oracle VM VirtualBox创建虚拟机教程 ...