org.hibernate.HibernateException: Duplicate identifier in table for: Waa
提示表的标识符重复,发现是数据库中的主键id重复了。因为是序列自动生成的。
我原本以为是因为我的序列的问题,序列.nextval()有问题,但是当我在数据库测试时,发现当前序列没有问题。但是当数据插入时,id的值却和数据库不一致。于是我打印了sql语句,发现插入时,select hibernate_sequence.nextval from dual是这个序列的值,而不是我自己定义的。这个是默认的序列
这是因为我们在配置hibernate配置文件时,没有指定序列名。

改为:

解决问题!
org.hibernate.HibernateException: Duplicate identifier in table for: Waa的更多相关文章
- 解决org.hibernate.HibernateException: identifier of an instance of com.ahd.entity.Order was altered from2 to 0
错误信息 严重: Servlet.service() for servlet [springmvc] in context with path [/order] threw exception [Re ...
- Caused by: org.hibernate.HibernateException: identifier of an instance of ... is alterde from
Caused by: org.hibernate.HibernateException: identifier of an instance of ... is alterde from Hi ...
- 【hibernate】错误:org.hibernate.HibernateException: identifier of an instance of com.agen.entity.Monthdetail was altered from xx to xx
所报错误: org.hibernate.HibernateException: identifier of an instance of com.agen.entity.Monthdetail was ...
- identifier of an instance of xx.entity was altered from xxKey@249e3cb2 to xxKey@74e8f4a3; nested exception is org.hibernate.HibernateException: identifier of an instance of xxentity was altered from错误
用entityManager保存数据时报错如下 identifier of an instance of xx.entity was altered from xxKey@249e3cb2 to xx ...
- Atitit.解决org.hibernate.DuplicateMappingException: Duplicate class/entity mapping
Atitit.解决org.hibernate.DuplicateMappingException: Duplicate class/entity mapping 1. 排除流程::: @Depreca ...
- spring整合hibernate的时候报异常org.hibernate.HibernateException: createQuery is not valid without active transaction
在整合Spring4+hibernate4时候,当代码执行到dao中CRUD操作时,报了一个异常, org.hibernate.HibernateException: createQuery is n ...
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a ...
- org.hibernate.HibernateException: No Session found for current thread
spring.springmvc和hibernate整合 在sessionFactory.getCurrentSession()时,出现以下异常 No Session found for curren ...
- org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance:
详细错误堆栈信息: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" ...
随机推荐
- 【原创】大叔经验分享(44)hdfs副本数量
当hdfs空间不足时,除了删除临时数据或垃圾数据之外,还可以适当调整部分大目录的副本数量,多管齐下: 1 查看 $ hdfs dfs -ls /user/hive/warehouse/temp.db/ ...
- WPF样式中TargetType 属性 (Property) 和 x:Key 属性 (Attribute)
如第一个示例所示,如果将 TargetType 属性设置为 TextBlock 而不为样式分配 x:Key,样式就会应用于所有 TextBlock 元素.这种情况下,x:Key 隐式设置为 {x:Ty ...
- 根据SQL_ID查询并杀会话
Oracle 根据SQL_ID查询并杀会话,清空执行计划缓冲池2018年09月06日 10:31:40 小学生汤米 阅读数:4731. 查询最近五分钟内最高频次SQL,查看event select t ...
- sprd测试系统跑vts
android 8.1版本上google新增vts测试,主要针对测试vendor接口, 在sprd ctest系统中,需要注意: 1. 以同一个账号登录ctest远程站点,和本地ctest客户端 2. ...
- 关于saltstack
配置Saltstack master 服务器 master服务器:saltstack.master 172.18.1.103 minion客户端:minion01 172. ...
- angular 2+ 变化检测系列三(Zone.js在Angular中的应用)
在系列一中,我们提到Zone.js,Zones是一种执行上下文,它允许我们设置钩子函数在我们的异步任务的开始位置和结束位置,Angular正是利用了这一特性从而实现了变更检测. Zones.js非常适 ...
- ionic2中使用极光IM的WebSDK实现即时聊天
本文主要介绍如何在ionic项目中集成极光IM的WebSDK,详细文档可参考官方介绍. 一.准备 1. 注册激光账号,进入开发者服务页面创建应用. 2. 创建应用后须完成对应平台的推送设置,进行应用或 ...
- Spark之join、leftOuterJoin、rightOuterJoin及fullOuterJoin
Spark的join与mysql的join类似,mysql的join是将表与表之间连接查询,spark中join是将RDD数据集进行连接,Spark主要有join.leftOuterJoin.righ ...
- Windows Server 2008 R2 修改远程桌面服务RDP默认端口及相应的防火墙配置
修改以下两个注册表项当中的默认端口3389为自定义端口: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wd ...
- 如何在webpack中成功引用到图片?
打包图片时,你可曾遇到在产出目录文件夹找不到图片,即便找到了,但是页面说引用不到资源?页面上或者文件中引用的图片地址不对? 一.在webpack中引入图片需要url-loader //webpack配 ...