mybatis批量新增报错 BadSqlGrammarException
org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
### The error may involve com.yks.eco.dao.EcoStaffDAO.insertBatch-Inline
### The error occurred while setting parameters
### SQL: insert into ykseco.eco_staff (name,userid, order_in_depts, unionid, position, mobile, tel, work_place, remark, email, org_email, jobnumber, is_hide, is_admin, is_boss, is_leader, active, hired_date, avatar, extattr, user_code, creater, create_date, modifier ) values
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:399)
at com.sun.proxy.$Proxy22.insert(Unknown Source)
注意:sql语句在values之后就没有了,这是由于传入的list集合为空,请检查代码!
mybatis批量新增报错 BadSqlGrammarException的更多相关文章
- druid + mysql + mybatis 批量更新报错
首先 批量更新报错 sql injection violation, multi-statement not allow 然后看了博客:https://blog.csdn.net/qq_3634595 ...
- mybatis批量更新报错
批量更新sql <update id="updateAutoAppraiseInfo" parameterType="Object"> <fo ...
- mybatis批量插入报错
报错内容 org.springframework.jdbc.UncategorizedSQLException: ### Error updating database. Cause: java.sq ...
- mybatis批量更新报错badsql
mybatis批量更新时语法写的都对,但是报错,需要在连接上面加上allowMultiQueries=true 示例:jdbc:MySQL://192.168.1.236:3306/test?useU ...
- 解决Oracle+Mybatis批量插入报错:SQL 命令未正确结束
Mybatis批量插入需要foreach元素.foreach元素有以下主要属性: (1)item:集合中每一个元素进行迭代时的别名. (2)index:指定一个名字,用于表示在迭代过程中,每次迭代到的 ...
- mybatis批量更新报错 org.mybatis.spring.MyBatisSystemException
具体报错信息: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Bin ...
- Mybatis批量更新报错com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
批量更新数据,非常简单的一段代码,硬是报错,插入的数据也能显示出来 List<User> userlist = new ArrayList<User>(); userlist. ...
- Mybatis批量insert报错的解决办法【the right syntax to use near '' at line...】
Java中使用Mybatis批量插入数据时Mapper.xml中的sql如下: <insert id="batchSave"> into t_emp(emp_name, ...
- Mybatis遇到的报错
MyBatis遇到的报错: 1.Caused by: org.xml.sax.SAXParseException; lineNumber: 35; columnNumber: 17; 元素类型为 &q ...
随机推荐
- 使用plv8+ shortid npm包构建一个短唯一id服务
plv8 是一个很强大的pg 扩展插件,我们可以直接额使用js 增强sql ,shortid 是一个用来生成短连接id 很方便的类库 因为shortid 是一个npm 模块,我们需要使用一种方法使用r ...
- 讲课专用——线段树——BSS
题目链接:http://codevs.cn/problem/3981/ 题解: 线段树求GSS模板题 一.一段长的区间的 GSS 有三种情况:>1 完全在左子区间>2 完全在右子区间> ...
- React_01_ECMAScript6
ECMAScript6 1.ES6简介 1.1.什么是ES6 ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在 2015 年 6 月正式发布了.它的目 ...
- c# EPPlus读取Excel里面的时间字段时,1900-01-01转成了1899-12-31
看到一篇文章:https://bbs.csdn.net/topics/70511379,5楼的回复: 我发现EXCEL有千年虫BUG,把1900年算成闰年了,2月有29天.1900年3月1日以后就没问 ...
- Alpha冲刺(10/10)——2019.5.2
作业描述 课程 软件工程1916|W(福州大学) 团队名称 修!咻咻! 作业要求 项目Alpha冲刺(团队) 团队目标 切实可行的计算机协会维修预约平台 开发工具 Eclipse 团队信息 队员学号 ...
- Python【每日一问】31
问: [基础题]:有 n 个人围成一圈,顺序排号.从第一个人开始报数(从 1 到 3 报数) ,凡报到 3 的人退出圈子,问最后留下的是原来第几号的那位. (n由键盘输入,比如n=100) [提高题] ...
- 关于nginx proxy_next_upstream 重试 和 max_fails的那些事
背景及简要分析 前几天一次故障定位的时候发现,后端服务(java)在从故障中恢复之后,会出现大量499,且会持续较长时间无法自行恢复.根本原因是服务容量问题,处理太慢导致客户端等不了了,主动断开.不过 ...
- linux ffmpeg 源码安装教程
AMR格式是智能手机上的常用音频文件格式,比MP3格式的压缩比大.同样时长的AMR文件大概是MP3的十分之一,所以在移动互联项目中应用比较广泛.但目前AMR格式在个人电脑上应用较少,所以目前大部门播放 ...
- Atlassian JIRA 插件开发之一 环境搭建
参考 https://developer.atlassian.com/server/framework/atlassian-sdk/ download the SDK 说明 Download the ...
- Windows进程间各种通信方式浅谈(转)
转自 https://blog.csdn.net/microzone/article/details/7044266 权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原 ...