开发日志:ssh配置实体映射时出错could not instantiate id generator
来源:互联网 发布:淘宝售假限制宝贝数量 编辑:程序博客网 时间:2024/06/05 06:18
很久没新建实体映射文件了,一配置就出错
使用的是mysql数据库,Int类型自增id
<id name="id" type="java.lang.Integer"> <column name="ID" precision="10" scale="0" /> <generator class="sequence"></generator> </id>
运行tomcat出错,搜索Caused by发现主要的错误信息
一:不能初始化Groups实体
Caused by: org.hibernate.MappingException: could not instantiate id generator [entity-name=com.gdcy.bean.Groups]
二:不支持sequences
Caused by: org.hibernate.MappingException: Dialect does not support sequences
原因是mysql不支持sequences序列化的方式,将generator里的class改为native就可以了
<id name="id" type="java.lang.Integer"> <column name="ID" precision="10" scale="0" /> <generator class="native"></generator> </id>tomcat运行成功
0 0
- 开发日志:ssh配置实体映射时出错could not instantiate id generator
- could not instantiate id generator
- 在Hibernate中配置Hilo进行数据绑定测试时出错:org.hibernate.MappingException: Could not instantiate id generator
- hibernate-------could not instantiate id generator
- org.hibernate.MappingException: could not instantiate id generator
- org.hibernate.MappingException: could not instantiate id generator
- 初识Hibernate:Could not instantiate id generator [entity-name=com.hibernate.e
- could not interpret id generator strategy: UUID
- SSH配置启动后Tomcat后报错:Could not instantiate bean class [org.hibernate.cfg.Configuration]
- Hibernate映射文件id的generator配置
- 错误整理:could not interpret id generator strategy: uuid.string
- 使用ibatis作为orm框架时, 如果实体/DO/POJO类中有自定义的构造函数, 会抛出could not instantiate result class
- MyBatis日志log4j异常ERROR Could not instantiate class [org.apache.ibatis.session.AutoMappingUnknownColum
- MyBatis日志log4j异常ERROR Could not instantiate class [org.apache.ibatis.session.AutoMappingUnknownColu
- Could not instantiate class named NSLayoutConstraint
- 解决Could not instantiate class named NSLayoutConstraint
- ibatis:JavaBeansDataExchange could not instantiate result class
- reason: ‘Could not instantiate class named NSLayoutConstraint’
- Linux系统32位与64位数据类型长度比较
- iOS 面试题 网络协议
- shell tr的语法
- c/c++ 程序员笔试面试题型
- c++对数组的引用
- 开发日志:ssh配置实体映射时出错could not instantiate id generator
- 程序员MM一年的工作总结
- 事件驱动模型
- 第二十七章:不改变正负数之间相对顺序重新排列数组
- Apache构建WEB服务器
- 计算机视觉库、人脸识别开源库
- web.xml中出现<servlet-name>default</servlet-name>是什么意思?
- PAXOS算法3
- IOS AlertView动态添加按钮