hibernate dataexception could not insert
来源:互联网 发布:鞍山淘宝培训 编辑:程序博客网 时间:2024/06/05 02:29
上午花了两个多小时的时间,也不能说是浪费吧,反正挺烦的,因为出了这么个错误,让人郁闷的不行。我喜欢插入中文,所以每次测试都尽量使用中文来进行,今天就吃了这么个亏了。也怪我,没有早点意识到中文问题是个老大难问题。唉,我的一上午啊,就这么过去了,怎么想都觉得不痛快。
我使用的是mysql数据库,如果编码形式不是unicode,报出的就是上面那个该死的错误,我当时就想,平时都是这么做的,怎么今天不管怎么弄都是不对呢。突然就看见了中文了,意识到有可能是这里出了问题,把中文改成英文,果然测试通过了。我把数据库的编码格式改为utf8,可以插入,只是在数据库中显示的时候还是乱码,不过如果查询的时候查出来的是中文。
做数据库的时候,首先想到的是数据库的编码形式,这次真是吃了大亏了。平时还小心一些,知道机房里面安的mysql都是默认的一些配置,今天太大意了,只是急于往下做,而忘了一些基本的配置了。小心,下次一定要小心。
- hibernate dataexception could not insert
- org.hibernate.ex ception.DataException: could not insert报错
- org.hibernate.exception.DataException: could not execute statement
- org.hibernate.exception.DataException: could not execute statement
- org.hibernate.exception.DataException: could not execute statement
- javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute query
- org.hibernate.exception.DataException: could not execute native bulk manipulation query的问题
- org.hibernate.exception.GenericJDBCException: could not insert:
- org.hibernate.exception.ConstraintViolationException: could not insert
- org.hibernate.exception.SQLGrammarException: could not insert:
- org.hibernate.exception.ConstraintViolationException: could not insert
- Hibernate operation: could not insert异常
- org.hibernate.exception.SQLGrammarException: could not insert:
- hibernate.exception.SQLGrammarException异常:could not insert、
- org.hibernate.exception.ConstraintViolationException: could not insert
- Hibernate插入错误:GenericJDBCException: could not insert:
- org.hibernate.exception.ConstraintViolationException: could not insert:
- org.hibernate.exception.SQLGrammarException: could not insert
- Agile PLM Server Class Administration
- 看好在线旅游市场
- 宿主机windows Xp部署virtualBox虚拟机并在其上安装linux ubuntu操作系统
- 查找子字符串个数的标准C函数
- linux常用命令之文件与目录管理
- hibernate dataexception could not insert
- 关于web前端开发的资源
- Android中如何使用命令行查看内嵌数据库SQLite3
- CKEditor的几种配置方式
- DES加密码
- Agile EC 301 Save Design Structures
- C/C++ 程序设计员应聘常见面试试题深入剖析
- ubuntu 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)”的方法
- Java基础_多线程