I create a factory session in the following way:
private final SessionFactory sessionFactory = new Configuration().configure("hibernate.cfg.xml").addResource("com/jegab/persistenceEntities/Categoria.hbm.xml").buildSessionFactory();
When wanting to get a session in Hibernate I am using the following line of code:
Session session = sessionFactory.getCurrentSession();
You are returning an error that says:
javax.faces.el.EvaluationException: org.hibernate.HibernateException: No CurrentSessionContext configured!
help.