createQuery is not valid without active transaction

去掉<prop key="hibernate.current_session_context_class">thread</prop>

If you use LocalSessionFactoryBean, you don't need to declare hibernate.current_session_context_class=thread, Spring will manage it for you .

参考自:http://blog.csdn.net/javavenus/article/details/5806164

猜你喜欢

转载自luan.iteye.com/blog/1859602