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

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

你可能感兴趣的:(Hibernate)