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 ...
随机推荐
- LeetCode1029 两地调度(贪心+java自定义排序回顾)
题目: 公司计划面试 2N 人.第 i 人飞往 A 市的费用为 costs[i][0],飞往 B 市的费用为 costs[i][1]. 返回将每个人都飞到某座城市的最低费用,要求每个城市都有 N 人抵 ...
- POJ - 2456 Aggressive cows(二分+贪心)
题意:把c个牛分进n个摊位,摊位位置已知,所有摊位分布在0 <= xi <= 1,000,000,000,问两头牛间最小距离的最大值. 分析:找所有最小距离取个最大的.所以二分找这个最小的 ...
- redmine处理规范
开发: 1. 研发人员负责更新到的状态共有三个: “进行中”. ”已解决”. ”需要反馈”. 2. 在开始修复bug的时候,把状态更新为”进行中”,把title更新 ...
- 基于springboot实现Java阿里短信发送
1.接口TestController import java.util.Random; import com.aliyuncs.DefaultAcsClient; import com.aliyunc ...
- java调用存储过程(stored procedures)的HelloWorld例子
1.java调用存储过程(stored procedures)的HelloWorld程序 有点数据 库基础的人都知道.存储过程(stored procedures)和java没什么关系.它是一段纯粹的 ...
- Django——include()三种使用方法
include()的三种使用方法 1.include(module, namespace=None) 2.include(pattern_list) 最常用 3.include((pattern_l ...
- opencv人脸检测
找了一张自己喜欢的<超人前传>剧照 其中的xml分类器需要到https://github.com/opencv/opencv/tree/master/data/haarcascades去下 ...
- 吴裕雄--天生自然JAVA SPRING框架开发学习笔记:Spring通知类型及使用ProxyFactoryBean创建AOP代理
通知(Advice)其实就是对目标切入点进行增强的内容,Spring AOP 为通知(Advice)提供了 org.aopalliance.aop.Advice 接口. Spring 通知按照在目标类 ...
- 吴裕雄--天生自然C++语言学习笔记:C++ 函数
函数是一组一起执行一个任务的语句.每个 C++ 程序都至少有一个函数,即主函数 main() ,所有简单的程序都可以定义其他额外的函数. 可以把代码划分到不同的函数中.如何划分代码到不同的函数中是由您 ...
- windows driver 获取文件属性
OBJECT_ATTRIBUTES oa; FILE_NETWORK_OPEN_INFORMATION fnoi; UNICODE_STRING strPath = RTL_CONSTANT_STRI ...