Clicky

Hibernate - HibernateException: createQuery is not valid without active transaction

March 3, 2013

I have this problem.by use your solution.. i clear…

Unknown - Jul 5, 2015

I have this problem.by use your solution.. i clear the error.

Thnaks

:) glad i could help

i have the same problem.but I have auto-generated dao classes so i can’t add the line
" Transaction tx = getCurrentSession().beginTransaction();” manually.
then how can i solve this pb?

Are you using Spring? Maybe using the @Transactional annotation at method level could be a solution.