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


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的

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

快乐的一个问题

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 HTTP Status 500 - Request processing failed; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: 【hibernate】报错:org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement 报错:org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement SpringBoot保存数据报错:could not execute statement; SQL [n/a]; constraint [PRIMARY];nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate. could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Exception occurred during processing request: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet org.hibernate.exception.GenericJDBCException: could not execute statement 严重: Could not synchronize database state with session org.hibernate.exception.DataException: Could not execute JDBC batch update
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM