学习hibernate遇到的问题1
来源:互联网 发布:知无涯者书 编辑:程序博客网 时间:2024/05/29 11:55
今天初学hibernate,运行junit test 遇到了三个错误,再次记录一下。
错误1:org.hibernate.HibernateException: Dialect class not found:
原因:在hibernate.cfg.xml中<property
name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>大小写写错了注意,MySQLInnoDBDialect别再写错了。
错误2.Hibernate: org.hibernate.exception.SQLGrammarException: could not insert: 错误
原因:数据库方言是MySQLInnoDBDialect,这时需要数据库中的表必须存在,所以需要先建一个表。
错误3.org.hibernate.HibernateException: The database returned no natively generated identity value
原因:在程序中我定义的id是自增的,然而在数据库中我没有定义成自增的,所以出错。
0 0
- 学习hibernate遇到的问题1
- 学习Hibernate时遇到的问题
- 学习hibernate时遇到的问题
- Hibernate学习中遇到的问题
- hibernate 第一次学习遇到的问题
- 学习hibernate遇到的问题2
- 学习hibernate遇到的问题及解决方案
- Hibernate遇到的问题
- hibernate 遇到的问题
- Hibernate遇到的问题
- 遇到的hibernate 问题
- Hibernate 遇到的问题(1)
- 学习申报系统所遇到的一些hibernate的问题
- hibernate 开发学习过程中遇到的问题:
- Hibernate学习过程中遇到的几个小问题
- 开始学习Hibernate框架遇到的空指针问题
- hibernate 所遇到的问题
- hibernate事务遇到的问题
- 把握linux内核设计思想(九):进程调度
- gb2312网页转码输出utf-8格式文本
- Mysql Client
- if语句的运用
- CentOS 7 下的MySQL安装以及C连接MySQL
- 学习hibernate遇到的问题1
- WebService常见问题
- 【HTTP】URL与资源
- mongodb与mysql命令对比
- Objective-C类和对象
- xcode6 ios ios simulator Home键
- [记录]学习<<QT学习之路2>>第四天
- 有序单链表合并(递归法)
- 铁道部新客票系统设计