原文:【hibernate】报错:org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement

报错如下: View Code 解决方法: 一般出现这样的情况,是数据库sql语句执行出错了 ,可以往上翻看console的消息,查看是哪个sql语句执行出现了问题,然后根据问题逐步解决。 例如,我这里出现的问题是,在执行了一个insert语句之后,sql执行失败, 错误是:执行insert语句报错 ERROR: value too long for type character varying ...

2018-04-03 10:53 0 27436 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM