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. require和require_once的区别

    require 的使用方法如 require("./inc.php"); .通常放在 PHP 程式的最前面,PHP 程式在执行前,就会先读入 require 所指定引入的档案,使它 ...

  2. Java数据结构和算法(九)——高级排序

    春晚好看吗?不存在的!!! 在Java数据结构和算法(三)——冒泡.选择.插入排序算法中我们介绍了三种简单的排序算法,它们的时间复杂度大O表示法都是O(N2),如果数据量少,我们还能忍受,但是数据量大 ...

  3. linux常用命令(不断更新)

    睡眠命令(第一步可省去): 1.查看你的系统支持什么模式:cat /sys/power/state(我的系统为:freeze mem disk) 2.切换到管理员模式下,执行命令:echo " ...

  4. 初探solr搜索

    solr是一个基于lucene的搜索引擎,lucene是一个全文检索引擎的架构.solr在此之上进行了封装完善,变成了一个很流行实用的搜索引擎,可以应对绝大部分的搜索需求.使用搜索引擎有以下几点好处: ...

  5. python学习:收集主机信息

    #!/usr/bin/env python   from subprocess import Popen, PIPE   def getIfconfig():     p = Popen(['ifco ...

  6. 【linux之find及awk】

    一.find命令 find 精确查找,根据提供的条件或组合条件进行查找,遍历所有文件,因此速度比较慢. 语法: find 目录 条件 动作 默认目录是当前目录默认条件是所有条件默认动作是显示查找到的信 ...

  7. Java基础系列--final关键字

    原创作品,可以转载,但是请标注出处地址:http://www.cnblogs.com/V1haoge/p/8482909.html 一.概述 final是Java关键字中最常见之一,表示"最 ...

  8. Java经典编程题50道之四十六

    编程实现两个字符串的连接. public class Example46 {    public static void main(String[] args) {        addString( ...

  9. ASP.NET CORE MVC 实现减号分隔(Kebab case)样式的 URL

    ASP.NET CORE MVC 中,默认的 Route 模板是: /{controller}/{action}  .我们可以通过开启 URL 小写转换将 URL 变为小写,但此方式在 Control ...

  10. No new migrations found. Your system is up-to-date.处理

    显然是migrations表中存储的相关操作记录了,删除就好了!!!