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的更多相关文章

  1. druid + mysql + mybatis 批量更新报错

    首先 批量更新报错 sql injection violation, multi-statement not allow 然后看了博客:https://blog.csdn.net/qq_3634595 ...

  2. mybatis批量更新报错

    批量更新sql <update id="updateAutoAppraiseInfo" parameterType="Object"> <fo ...

  3. mybatis批量插入报错

    报错内容 org.springframework.jdbc.UncategorizedSQLException: ### Error updating database. Cause: java.sq ...

  4. mybatis批量更新报错badsql

    mybatis批量更新时语法写的都对,但是报错,需要在连接上面加上allowMultiQueries=true 示例:jdbc:MySQL://192.168.1.236:3306/test?useU ...

  5. 解决Oracle+Mybatis批量插入报错:SQL 命令未正确结束

    Mybatis批量插入需要foreach元素.foreach元素有以下主要属性: (1)item:集合中每一个元素进行迭代时的别名. (2)index:指定一个名字,用于表示在迭代过程中,每次迭代到的 ...

  6. mybatis批量更新报错 org.mybatis.spring.MyBatisSystemException

    具体报错信息: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Bin ...

  7. Mybatis批量更新报错com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    批量更新数据,非常简单的一段代码,硬是报错,插入的数据也能显示出来 List<User> userlist = new ArrayList<User>(); userlist. ...

  8. Mybatis批量insert报错的解决办法【the right syntax to use near '' at line...】

    Java中使用Mybatis批量插入数据时Mapper.xml中的sql如下: <insert id="batchSave"> into t_emp(emp_name, ...

  9. Mybatis遇到的报错

    MyBatis遇到的报错: 1.Caused by: org.xml.sax.SAXParseException; lineNumber: 35; columnNumber: 17; 元素类型为 &q ...

随机推荐

  1. Docker入门之安装Docker

    目录 目录 1 1. 前言 1 2. 创建网桥 2 3. 安装Docker 2 3.1. 二进制安装 3 3.1.1. 下载安装 3 3.1.2. 配置服务 3 3.1.3. 启动服务 4 3.2. ...

  2. 【BZOJ4722】由乃

    [BZOJ4722]由乃 题面 bzoj 题解 考虑到区间长度为\(14\)时子集个数\(2^{14}>14\times 1000\),由抽屉原理,区间长度最多为\(13\)(长度大于这个值就一 ...

  3. app内嵌h5分享到小程序分享功能

    if (this.GLOBAL.env !== 'production') { try { window.JSBridge.shareMiniProgramToWx('https://www.lexi ...

  4. 几句话总结一个算法之Policy Gradients

    强化学习与监督学习的区别在于,监督学习的每条样本都有一个独立的label,而强化学习的奖励(label)是有延后性,往往需要等这个回合结束才知道输赢 Policy Gradients(PG)计算某个状 ...

  5. Gamma阶段第九次scrum meeting

    每日任务内容 队员 昨日完成任务 明日要完成的任务 张圆宁 #91 用户体验与优化https://github.com/rRetr0Git/rateMyCourse/issues/91(持续完成) # ...

  6. win10 下安装 ZooKeeper 的方法

    ZooKeeper 下载地址: https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 1 随便解压到一个目录 2 在 zookeeper-3.x ...

  7. JVM一些问题

    1. 类的实例化顺序,比如父类静态数据,构造函数,字段,子类静态数据,构造函数,字段,他们的执行顺序 答:先静态.先父后子. 先静态:父静态 > 子静态 优先级:父类 > 子类 静态代码块 ...

  8. Java学习:Debug调试程序

    Debug追踪 Debug调试程序: 可以让代码逐行执行,查看代码执行的过程,调试程序中出现的bug 使用方式: 在行号的右边,鼠标左键单击,添加断点(每个方法的第一行,哪里有bug添加到哪里) 右键 ...

  9. json文件 乱码问题 根本解决办法

    1 工具→自定义:2 点击 命令 标签:3 在上方单选区选中 菜单栏,下拉列表选 文件:4 点击 添加命令5 在类别中,找到文件,在右侧找到高级保存选项,确定6 然后可以通过下移调整该选项在文件菜单中 ...

  10. C#条码生成及打印实例代码

    ";//条码 ; ; //打印按钮 private void button1_Click(object sender, EventArgs e) { //实例化打印对象 PrintDocum ...