首页 > 数据库技术 > 详细

HTTP Status 500 - JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1364]; could not execute statement; nested exception is org.hibernate.exception.Ge

时间:2018-09-11 13:41:49      阅读:541      评论:0      收藏:0      [点我收藏+]

技术分享图片

HTTP Status 500 - JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1364]; could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement

翻译:

HTTP 状态:500  Hibernate数据访问中的JDBC异常: 

SQL数据库执行SQL语句异常[n/a];

SQL状态[HY 000];错误码[1364];

无法执行语句;
嵌套异常是org.HiberNate.Exction.GenericJDBCException:

无法执行语句

 

问题原因:hibernate执行sql语句操作数据库时,因为主键为NULL,无法执行,原因是数据库主键不是自动增长或不能为NULL的

解决方法:设置数据库主键可为空,或者自动增长

技术分享图片

快乐的一个问题

 

HTTP Status 500 - JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [HY000]; error code [1364]; could not execute statement; nested exception is org.hibernate.exception.Ge

原文:https://www.cnblogs.com/niusdtz/p/9626855.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!