Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values;
项目部署,启动过程中有以下警告:
[WARN]: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values; consider using org.hibernate.id.UUIDGenerator instead
查看项目中用户类的主键生成策略:
- @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
- @Id
- @GeneratedValue(generator = "system-uuid")
- @Column(name = "user_id")
- public String getUserId() {
- return userId ;
- }
经查询,Hibernate 3.6开始,如果有model的主键有uuid生成,就会报这个错误,采用最新的生成策略,改成下面的就会正常
- @Id
- @Column(length = 32, nullable = false)
- @GeneratedValue(generator = "uuid2" ) //指定生成器名称
- @GenericGenerator(name = "uuid2", strategy = "org.hibernate.id.UUIDGenerator" ) //生成器名称,uuid生成类
XML配置:
原来的:
- <id name="id" type="string">
- <column name="ID" length="32" />
- <generator class="uuid" />
- </id>
现在改变后的:
- <id name="id" type="string">
- <column name="ID" length="36" />
- <generator class="uuid2" />
- </id>
Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values;的更多相关文章
- 【hibernate】主键生成策略使用UUID报出如下警告:org.hibernate.id.UUIDHexGenerator - HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values;
主键生成策略使用UUID报出如警告如下: 控制台- 2017-11-24 18:40:14 [restartedMain] WARN org.hibernate.id.UUIDHexGenerator ...
- org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.String
org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.Strin ...
- Hibernate —— ID的各种生成器(转)
Hibernate中,<id>元素下的可选<generator>子元素是一个Java类的名字,用来为该持久化类的实例生成惟一标示,所有的生成器都实现net.sf.hiberna ...
- org.hibernate.id.IdentifierGenerationException
[问题]org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned bef ...
- 异常:org.hibernate.id.IdentifierGenerationException
在有关联关系的数据表中保存数据时,先保存一端,再保存多端的抛出的异常(此时不管一端,还是多端的对象都没有设置id,属性,也就是要保存的两个对象的id 属性为空.) org.hibernate.id.I ...
- org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save()
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before ...
- org.hibernate.id.IdentifierGenerationException错误解决方法
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before ...
- Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.qingmu.seller.entity.OrderMaster
org.springframework.orm.jpa.JpaSystemException: ids for this class must be manually assigned before ...
- org.hibernate.id.IdentifierGenerationException: Hibernate异常
异常信息: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned b ...
随机推荐
- 基于 html5 geolocation来获取经纬度地址(copy)
geolocation来获取经纬度地址 以前如果要获取互联网用户所在地都是根据用户的IP地址来获取地理位置,这样获取到的数据和真实数据有很大的偏差.为了获取更加精确的位置,可以使用了html5的geo ...
- 通过iscsi协议使用ceph rbd
转自:http://blog.csdn.net/wytdahu/article/details/46545235 ceph很早就已经支持通过iscsi协议来使用rbd,这篇博文对此做下演示,并且使用O ...
- web实现QQ第三方登录 开放平台-web实现QQ第三方登录
应用场景 web应用通过QQ登录授权实现第三方登录. 操作步骤 1 注册成为QQ互联平台开发者,http://connect.qq.com/ 2 准备一个可访问的域名, ...
- CentOS 6.7下配置 yum 安装 Nginx。
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: cd /etc/yum.repos.d/ vim nginx.repo 填写如下内容: [nginx]nam ...
- 用HTTP协议传输媒体文件 学习
用HTTP协议传输媒体文件可以分两个阶段,第一个阶段是Progressive Download(渐进式下载方式)阶段,第二个阶段是HTTP streaming(HTTP流化)阶段.其中,第一个阶段可以 ...
- Accelerated C++学习笔记7—<使用库算法>
第6章 使用库算法 本章中主要教我们怎样使用几个库算法来解决与处理字符串和学生成绩相关的问题. 1.分析字符串 使用一个循环来连接两幅字符图案 <span style="font-f ...
- [转]Ubuntu上安装TL-WN725N 2.0无线网卡驱动
笔者使用的Ubuntu操作系统是13.04版本的,这个版本下,笔者使用朋友的TL-WN725N 1.0版本的无线网卡,直接插上就可以使用.正是由于这个方便性,不用去折腾什么驱动,所以笔者从京东上买了一 ...
- 谱聚类(Spectral clustering)(1):RatioCut
作者:桂. 时间:2017-04-13 19:14:48 链接:http://www.cnblogs.com/xingshansi/p/6702174.html 声明:本文大部分内容来自:刘建平Pi ...
- 基于EM的多直线拟合实现及思考
作者:桂. 时间:2017-03-22 06:13:50 链接:http://www.cnblogs.com/xingshansi/p/6597796.html 声明:欢迎被转载,不过记得注明出处哦 ...
- [hihoCoder] #1122 : 二分图二•二分图最大匹配之匈牙利算法
时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 上一回我们已经将所有有问题的相亲情况表剔除了,那么接下来要做的就是安排相亲了.因为过年时间并不是很长,所以姑姑希望能够尽可 ...