异常积累:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in
来源:互联网 发布:网络大专报名 编辑:程序博客网 时间:2024/05/16 06:32
- 此异常是由于Spring提供的Open Session In View而引起的。
- 开启OpenSessionInViewFilter这个过滤器的时候FlushMode就已经被默认设置为了MANUAL,如果FlushMode是MANUAL或NEVEL,在操作过程中 hibernate会将事务设置为readonly,所以在增加、删除或修改操作过程中会出现该错误
- <filter>
- <filter-name>hibernateFilter</filter-name>
- <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
- <init-param>
- <param-name>flushMode</param-name>
- <param-value>AUTO</param-value>
- </init-param>
- <!-- singleSession默认为true,若设为false则等于没用OpenSessionInView --> 视情况而定
- <init-param>
- <param-name>singleSession</param-name>
- <param-value>true</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>hibernateFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
结束!
以上内容来自网络:http://www.blogjava.net/GavinMiao/archive/2011/10/21/361709.html
- 异常积累:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in
- 异常积累:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in
- 异常积累:org.springframework.dao.InvalidDataAccessApiUsageException Write operations are not allowed in
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed
- [spring]:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER)
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- SSH框架org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read
- InvalidDataAccessApiUsageException:Write operations are not allowed in read-only mode
- zoj An Awful Problem 3326
- centos 下安装jdk
- 软件测试中sql代码的优化
- virtualenv django
- eclipse ubuntu上快捷图标
- 异常积累:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in
- MATLAB在Ubuntu下配置到applications menu
- 顺序表的应用举例
- Mahout实例(UserCF,ItermCF,SlopOne)
- dbgrideh使用
- 结构体指针数组 vs 结构体数组
- Hadoop的MapFile, SetFile, ArrayFile 及 BloomMapFile文件格式<转>
- 单链表的应用举例
- js使 input file获得焦点,并且清空该值。