No Hibernate Session bound to thread, and configuration does not allow creat

今天遇到这么一个错误,在网上差了很多都没有能解决我的问题。transactional注解也添加了,各种配置也都没问题,结果快纠结死了。

最终在一个回复里面发现,原来是opensessionInView这个filter没有配置导致的。

具体原理不明,暂且记下来。

<!-- Hibernate Open Session in View filter -->
<filter>
<filter-name>openSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
...... <filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

No Hibernate Session bound to thread, and configuration does not allow creat的更多相关文章

  1. 解决No Hibernate Session bound to thread, and configuration does not allow creat。。。

    applicationContext.xml配置 <?xml version="1.0" encoding="UTF-8"?> <beans ...

  2. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

    org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a ...

  3. spring事务管理出错。No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy ...

  4. spring 管理事务配置时,结果 报错: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here这个异常

    java.lang.IllegalStateException: No Hibernate Session bound to thread, and configuration does not al ...

  5. 出现No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here异常

    问题描述: public void save(BaseEntity baseEntity) { Session session = null; try { session = currentSessi ...

  6. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a

    如果出现了这个错误,看看在使用Hibernate的时候有没有在事务的环境下执行操作!

  7. 报错解决:No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

    大概分析一般使用了注解才会报这方面的错 1.没有在spring的ApplicationContext.xml中开启注解事务 <!-- 开启注解事务 --> <tx:annotatio ...

  8. No Hibernate Session bound to thread, and configuration does not allow

    今天晚上挺悲催的,遇到了这个问题花费我很长时间,现在总结如下: 到这这种情况的发生有两种情况: 1,没有配置事物只要在Spring配置文件中添加如下代码: <bean id="txMa ...

  9. org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not

    遇到这个问题之前,我去百度和谷歌去搜索了一下.发现各种说法.可是针对我的项目而言,也就是公司的项目而言,这个问题的根源并不是是网上所说的那样. 最后是通过自己的想法做測试得到了解决. 1.首先说说我的 ...

随机推荐

  1. Maven Build Profiles--reference

    What is Build Profile? A Build profile is a set of configuration values which can be used to set or ...

  2. felx基础知识

    felx4将功能组件划分为3个命名空间分别是 fx:核心功能 mx:标准flex3组件组 s:新flex4 spark组件组

  3. iOS 网络编程:NSURLConnection

    1 简介 1.1 概念 NSURLConnection类似NSURLSession,都是进行网络数据传输的.其中NSURLSession是NSURLConnection的替代版本,目前IOS9.0几乎 ...

  4. Java并发——Fork/Join框架

    为了防止无良网站的爬虫抓取文章,特此标识,转载请注明文章出处.LaplaceDemon/ShiJiaqi. http://www.cnblogs.com/shijiaqi1066/p/4631466. ...

  5. 关于FPGA异步时钟采样--结绳法的点点滴滴

    一.典型方法 典型方法即双锁存器法,第一个锁存器可能出现亚稳态,但是第二个锁存器出现亚稳态的几率已经降到非常小,双锁存器虽然不能完全根除亚稳态的出现(事实上所有电路都无法根除,只能尽可能降低亚稳态的出 ...

  6. c中计时的几种方法

    C计时的几种方法说明及例程 1. 使用clock() 函数 头文件:<time.h> clock()函数,返回“自程序启动到调用该函数,CPU时钟的计时单元数(clock tick)” 每 ...

  7. 20151213Jquery学习笔记--插件

    插件(Plugin)也成为 jQuery 扩展(Extension),是一种遵循一定规范的应用程序接口编 写出来的程序.目前 jQuery 插件已超过几千种,由来自世界各地的开发者共同编写.验证 和完 ...

  8. Android设计模式系列

    http://www.cnblogs.com/qianxudetianxia/category/312863.html Android设计模式系列(12)--SDK源码之生成器模式(建造者模式) 摘要 ...

  9. Android获取屏幕尺寸大小

    官方API: A structure describing general information about a display, such as its size, density, and fo ...

  10. 在office 2010中插入Mathtype出现ctrl+v不能复制的问题

    加载项中去掉command for那个即可 详细网址:http://heblue.blog.163.com/blog/static/96325568201375102628405/