zoukankan      html  css  js  c++  java
  • org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update

    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自动生成正确的字段

  • 相关阅读:
    iOS-导航条
    iOS-存储
    iOS-模型传递
    iOS-日期相关
    iOS-UIViewController
    iOS-loadView方法
    iOS-UIWindow
    Spring 测试
    Spring条件注解@Conditional
    Spring多线程
  • 原文地址:https://www.cnblogs.com/zhouyalei/p/3042831.html
Copyright © 2011-2022 走看看