org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.DataException: Could not execute JDBC batch update

用的spring+struts2+hibernate框架,在提交表单时,出现这个错误
之前修改过实体Bean int userId 改成了String userId
数据库中没有更新过来

遇到这种情况,有2中解决方法:
1.在数据库中修改字段类型为varchar
2.删除这个字段,重启项目,让hibernate自动生成正确的字段

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-08-07
  • 2021-10-08
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案