In the following code I am trying to get a List of Products which contains all the products in the database:
public List getAllProducts() throws
Forgot to type cast the query. it is working now.
List products = (List) session.createQuery("from Products").list();