Reputation: 23352
I am getting this exception and after a lot of R&D i am unable to resolve it.
Basically the error comes when it uses findAll() method located in hbnpojogen-persistence-1.4.4.jar
public abstract interface GenericDAO<T, PK extends Serializable>
public abstract List<T> findAll();
This is the code that tried to use this method.
HibernateFactory.getDataDao().findAll();
Upvotes: 0
Views: 397
Reputation:
You need to open a transaction before executing findAll()
. See e.g. Spring's HibernateTransactionManager
and @Transactional
annotation.
Upvotes: 1