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

你可能感兴趣的:(transaction)