Hi All,
I have run the service file for entity employee. Now I want to get the list of records records available from the database in conntroller and jsp
page. I have observerd two classes are there to get the list of records.
1) EmployeeUtil.findAll() method.But here in comments of this class definition, Never access this utility in a JSP, controller, model, or other front-end class.
Still i used this method and I have got the following exception as follows
ERROR [BasePersistenceImpl:188] Caught unexpected exception org.hibernate.HibernateException
####################com.liferay.portal.kernel.exception.SystemException: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
2) java.util.List<com.vam.model.Employee> empList=new EmployeePersistenceImpl().findAll();
I have used the above method,but I am getting exception ERROR [BasePersistenceImpl:188] Caught unexpected exception java.lang.NullPointerException
####################java.lang.NullPointerException
Please reply me is there any settings required or is there any alternative to get the list.
Thanks
Kiiran
Please sign in to flag this as inappropriate.