Could not execute JDBC batch update
2014-07-16 19:54
351 查看
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0'
defined in ServletContext resource [/WEB-INF/queryservice-servlet.xml]:
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'videoController':
Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: com.jrgy.util.FileUpload com.jrgy.main.controller.VideoController.fileUpload;
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No unique bean of type [com.jrgy.util.FileUpload] is defined:
Unsatisfied dependency of type [class com.jrgy.util.FileUpload]: expected at least 1 matching bean
主要是配置文件设置了关联,数据却没有关联造成的,只要数据正确就没有问题。
Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0'
defined in ServletContext resource [/WEB-INF/queryservice-servlet.xml]:
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'videoController':
Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: com.jrgy.util.FileUpload com.jrgy.main.controller.VideoController.fileUpload;
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No unique bean of type [com.jrgy.util.FileUpload] is defined:
Unsatisfied dependency of type [class com.jrgy.util.FileUpload]: expected at least 1 matching bean
关于hibernate 错误 Could not execute JDBC batch update。
主要是配置文件设置了关联,数据却没有关联造成的,只要数据正确就没有问题。
1. 重点注意主键的映射关系是否配置正确,因为Hibernate
Tools(或者Eclipse本身的Database Explorer)生成*.hbn.xml工具中包含有catalog="***"(*表示数据库名称)这样的属性,将该属性删除就可以了
2. 是由更新数据库表时,插入的数据与字段不匹配引起的。比如字段A已设为只允许有0和1值,但你却插入了一个空值或其它值,则就会报这个错误。 还一个就是字段超长。
3. 数据库表的列名是否为关键字,命名列的时候不要单独使用date,ID...这种关键字
4. 不能批量更新,这个错误是因为一次性更新多条数据。
5. 另外,造成这个原因的还可能是数据库的驱动jar包不支持。
相关文章推荐
- org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
- nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
- Could not execute JDBC batch update
- hibernate 错误 Could not execute JDBC batch update,已解决
- hibernate的Could not execute JDBC batch update错误原因及处理
- org.hibernate.exception.SQLGrammarException:Could not execute JDBC batch update问题的解决
- org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
- org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update
- Hibernate数据关联映射出现Could not execute JDBC batch update的异常处理
- Could not execute JDBC batch update; SQL [delete from role where roleId=?]; constraint [null]; neste
- Could not execute JDBC batch update异常的解决办法
- org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
- org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update错误
- Hibernate 抛出的 Could not execute JDBC batch update
- Could not execute JDBC batch update; bad SQL grammar [insert into
- 小谈Hibernate下SQL Grammer Exception,Could not execute JDBC batch update异常的解决
- hibernate的Could not execute JDBC batch update错误原因及处理
- Hibernate报错:Grammer Exception,Could not execute JDBC batch update,解决方法
- org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
- Could not execute JDBC batch update