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 ...
随机推荐
- Window Server 2019 配置篇(4)- 配置WDS实现自动部署服务
上次我们建立了hyper-v集群,那么我们这次需要对集群内的客户机和外部的服务器进行自动部署,这时候需要WDS服务 WDS服务是一种自动部署服务,能够对无OS的计算机进行操作系统的部署 首先建立虚拟机 ...
- Python3 格式化输出
Python3 格式化输出 今天用字符串功能的时候,我突然忘记了格式化输出的方式X﹏X.所以赶紧恶补一下. 1.打印字符串 print("My name is %s" %(&quo ...
- NASA航天技术演示实验集
为了支持太空探索NASA开起了一系列先进太空技术演示实验. 具体的实验实验地址在:https://www.nasa.gov/mission_pages/tdm/main/overview.html 通 ...
- Centos7安装rabbitMQ3.6.0
文章中的erlang和rabbitmq3.6.0 http://pan.baidu.com/s/1c2Nn64w Centos7 系统操作 cd /etc/yum.repos.d/ mv Cent ...
- C#中类的字段或属性不被序列化成JSON或XML
将一个类序列化成JSON或XML时,如果某个字段或属性不想被序列化,则可以使用以下Attribute: 1.[Newtonsoft.Json.JsonIgnore]特性:使用Newtonsoft.Js ...
- HDU_4960 2014多校9 Another OCD Patient DP
其实现在想起来是个巨简单的DP,模型就跟LCS很像,比赛的时候居然没想出来,在聪哥提醒下还卡了个地方 就是说给定一串n个数字的序列,可以连续合并,最终使得序列是回文的,题目也给定了合并数字所需的代价, ...
- django下载
pip install django ==2.0.5 创建目录 1创建目录 2终端下进入目录 3输入django-admin startproject project
- HDU - 5591 ZYB's Game(博弈)
题意:A和B两人在1~N中选数字.已知1<=X<=N,谁先选中X谁就输.每当一个人选出一个不是X的数,裁判都会说明这个数比X大还是小,与此同时,可选范围随之缩小.已知A先选,求满足能让B赢 ...
- 官网英文版学习——RabbitMQ学习笔记(一)认识RabbitMQ
鉴于目前中文的RabbitMQ教程很缺,本博主虽然买了一本rabbitMQ的书,遗憾的是该书的代码用的不是java语言,看起来也有些不爽,且网友们不同人学习所写不同,本博主看的有些地方不太理想,为此本 ...
- my97datepicker实现日期改变立刻触发函数
<input type="text" class="Wdate" onclick="WdatePicker({onpicking:functio ...