POSTS

Hibernate - HibernateException: createQuery is not valid without active transaction

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

Unknown -

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

Thnaks


:) glad i could help

Jeremias -

:) glad i could help


i have the same problem.but I have auto-generated …

mozhi -

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 @Transaction…

Jeremias -

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