---
title: "org.hibernate.HibernateException: No Session found for current thread"
author: "tojaoomy"
date: "2012-04-01T19:40:38Z"
tags: []
categories: ["开源软件"]
slug: "org-hibernate-hibernateexception-no-session-found-for-current-thread"
draft: false
lastmod: "2012-04-01T19:40:38Z"
id: 1472858
url: "https://tojaoomy.iteye.com/blog/1472858"
---

Spring3.1.1 Intergrate with Hibernate 4.0.1 occurs the

 

org.hibernate.HibernateException: No Session found for current thread

 

In the applicationContext.xml configuration:

 

this configuration should like this

 

```
<tx:advice id="txAdvice" transaction-manager="txManager">
		<tx:attributes>
			<tx:method name="get*" read-only="true" propagation="REQUIRED"/>
			<tx:method name="*" propagation="REQUIRED"/>
		</tx:attributes>
</tx:advice>
```

 

it seems that propagation set values\[SUPPORTS|NOT\_SUPPORTED|NEVER] will issue

 

No Session found for the current thread