1、错误描述

Caused by:org.hibernate.exception.ConstraintViolationException:Could not execute JDBC batch update.

2、错误原因

hibernate映射文件中的属性跟model中名称不一致,导致出错

3、解决办法

修改hibernate映射文件属性

org.hibernate.exception.ConstraintViolationException的更多相关文章

  1. org.hibernate.exception.ConstraintViolationException: could not insert:

    org.hibernate.exception.ConstraintViolationException: could not insert: 报错原由于xxx.hbm.xml文件里的主键类型设置有问 ...

  2. 在使用Hibernate save()方法的时候 报错: org.hibernate.exception.ConstraintViolationException:could not perform addBath

    org.hibernate.exception.ConstraintViolationException:could not perform addBath 错误可能原因:实体属性的值与数据库字段类型 ...

  3. org.hibernate.exception.ConstraintViolationException: could not delete:

    转自:http://fireinwind.iteye.com/blog/848515 异常描述: org.hibernate.exception.ConstraintViolationExceptio ...

  4. SpringBoot保存数据报错:could not execute statement; SQL [n/a]; constraint [PRIMARY];nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

    使用SpringBoot做JAVA开发时,用Repository.save();保存数据的时候遇到了报错: could not execute statement; SQL [n/a]; constr ...

  5. org.hibernate.exception.SQLGrammarException: could not execute query

    SSH项目中出现了 org.hibernate.exception.SQLGrammarException: could not execute query 错误,仔细检查后发现,是把createQu ...

  6. 在运行Hibernate Hello World程序的时候,抛如下错误: view plain Exception in thread "main" org.hibernate.exception.LockAcquisitionException 解决方法

    在运行Hibernate Hello World程序的时候,抛如下错误: Exception in thread "main" org.hibernate.exception.Lo ...

  7. Method threw 'org.hibernate.exception.SQLGrammarException' exception. Cannot evaluate com.hotel.Object_$$_jvst485_15.toString()

    数据库字段和类Object属性不匹配,Method threw 'org.hibernate.exception.SQLGrammarException' exception. Cannot eval ...

  8. 登录Cloudera Manager时报错org.hibernate.exception.GenericJDBCException: Could not open connection

    去Cloudera Server上边看了一下日志: cat /opt/cloudera-manager/log/cloudera-scm-server/cloudera-scm-server.log ...

  9. exception is org.hibernate.exception.DataException: Could not execute JDBC batch update at

    没有什么问题,但是却报了Could not execute JDBC batch update的错,主要是配置文件设置了关联,数据却没有关联造成的,只要数据正确就没有问题. 另外,造成这个原因的还可能 ...

随机推荐

  1. linux指令札记

    1.有关文件压缩解压缩:Linux下自带了一个unzip的程序可以解压缩文件,解压命令是:unzip filename.zip 同样也提供了一个zip程序压缩zip文件,命令是 zip filenam ...

  2. S5PV210中断处理

    _start: 1.设置栈空间:防止之前的UBOOT代码被覆盖,应为c中需要栈空间 ldr sp, =0x40010000 2.设置CPSR的I,F位,A8打开IRQ,FIQ中断: mov r0, # ...

  3. win7连接共享打印机

    1. 保证目标电脑启用共享.打印机驱动安装正常 2. 目标电脑进入"设备和打印机" 3. 右键要共享的打印机 - 打印机属性 -共享此打印机 4. 其他电脑打印时,选择其他打印机, ...

  4. 十年磨一剑 Delphi重新崛起再写传奇

    新年伊始,英巴卡迪诺公司(Embarcadero)就在其官网发布了"激动人心的RAD Studio2018年发展规划"公告(见上图).公告中指出,将在于2018年第一季度发布10. ...

  5. pinvoke 数据交互笔记

    intptr to array string string[]  _outputStrArray=null;  int channelCount = 0;///返回数组大小            In ...

  6. ADO.NET通用类库

    using System.Data; using System.Data.SqlClient; namespace DataService { public class SQLHelper { pub ...

  7. bzoj2151 种树 双向链表+堆

    2151: 种树 Time Limit: 10 Sec  Memory Limit: 259 MBSubmit: 1151  Solved: 613[Submit][Status][Discuss] ...

  8. Shiro笔记--shiroFilter权限过滤

    1.shiro中shiroFilter中的一些配置页面的过滤权限 <!--名字必须和web.xml里面的filter-name一样--> <bean id="shiroFi ...

  9. MYSQL索引的类型和索引的方式

    索引的类型: normal:表示普通索引 unique:表示唯一的,不允许重复的索引,如果该字段信息保证不会重复例如身份证号用作索引时,可设置为unique full textl: 表示 全文搜索的索 ...

  10. OO(Object Oriented)

    封装.继承.多态. 封装:隐藏对象的属性和实现细节,仅对外公开接口,控制在程序中属性的读取和修改的访问级别.封装就是将抽象得到的数据和行为相结合,形成一个有机的整体,也就是将数据与操作数据的代码进行有 ...