java开源框架集成常见错误之No Hibernate Session bound to thread
2009-08-10 22:22
549 查看
错误描述:
No Hibernate Session bound to thread, and configuration does not allow creation of
non-transactional one here
原因:
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<tx:advice id="txadvice" transaction-manager="transactionManager" >
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="cut" expression="execution(* com.sale.dao..*.*
(..))" />
<aop:advisor advice-ref="txadvice" pointcut-ref="cut" />
</aop:config>
中的expression com.sale.dao..*.*(..)多写了个“s”不能找到
解决方法:
正确配置com.sales.dao..*.*(..)
No Hibernate Session bound to thread, and configuration does not allow creation of
non-transactional one here
原因:
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<tx:advice id="txadvice" transaction-manager="transactionManager" >
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="cut" expression="execution(* com.sale.dao..*.*
(..))" />
<aop:advisor advice-ref="txadvice" pointcut-ref="cut" />
</aop:config>
中的expression com.sale.dao..*.*(..)多写了个“s”不能找到
解决方法:
正确配置com.sales.dao..*.*(..)
相关文章推荐
- 三大框架整合异常之No Hibernate Session bound to thread, and configuration does not allow creation of non-tran
- hibernate错误提示: No Hibernate Session bound to thread, and configuration does not allow creation of no
- java开源框架集成常见错误之Unable to locate NamespaceHandler for namespace (错误)
- java开源框架集成常见错误之Unable to locate NamespaceHandler for namespace
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- 关于出现No Hibernate Session bound to thread问题的记录
- 关于: No Hibernate Session bound to thread, and configuration does not allow creation of non-transacti
- 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
- 解决No Hibernate Session bound to thread, and configuration does not allow create tansactional的问题
- spring hibernate No Hibernate Session bound to thread异常
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not a
- 继承类的@Transactional:org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
- HibernateException: No Hibernate Session bound to thread
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not
- HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transac
- HibernateException: No Hibernate Session bound to thread
- No Hibernate Session bound to thread纠结了很久
- HibernateException: No Hibernate Session bound to thread
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not