org.hibernate.exception.GenericJDBCException
来源:互联网 发布:fast迅捷网络 编辑:程序博客网 时间:2024/06/05 02:17
刚刚开始接触Hibernate编程,第一次写个小项目,就遇到这个问题,弄明白怎么回事后,记录下来了!
错误:
org.hibernate.exception.GenericJDBCException: could not insert: [vo.User]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2093)
错误原因:我在数据库设计时候,没有给ID设置为自增,做添加操作时,也没有给其赋值,所以才插入异常。
- org.hibernate.exception.GenericJDBCException
- org.hibernate.exception.GenericJDBCException
- org.hibernate.exception.GenericJDBCException
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: could not insert:
- org.hibernate.exception.GenericJDBCException: Cannot release connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Incorrect string value:
- org.hibernate.exception.GenericJDBCException: Cannot release connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: Cannot release connection
- org.hibernate.exception.GenericJDBCException: Cannot open connection
- org.hibernate.exception.GenericJDBCException: No database selected
- ls命令只显示目录或文件
- 让自己开始做事的8个简单要诀
- oracle join
- 如何停止拖延
- 路由器基本工作原理
- org.hibernate.exception.GenericJDBCException
- uva 11008 Antimatter Ray Clearcutting
- 如何应对生活中的临时突发事件?
- gevent sqlalchemy async access mysql
- 程序语言的自我意识与仿他意识
- 6种让你在忙碌中寻找安逸的方法
- datalist
- 1像素表格(1px表格)的5种制作方法
- 30岁白领如何减轻工作压力?