sessionFactory « Test « JPA Q&A





1. Hibernate SessionFactory creation failure when running JUnit tests only    stackoverflow.com

I'm using Eclipse and Hibernate to develope a J2EE web app. When running/debugging the web app, my hibernate-related code works just fine. But if I run a junit test that tests some of ...

2. JUnit Test for HIbernate => Exception SessionFactory in J    forum.hibernate.org

Hello, I need to test my DAO classes, but makes this error at "dao = new UsuariosDAO();": IllegalStateException: COuld not locate SessionFactory in JNDI. What can I do? Thanks. This is the code: public class UsuariosDAOTest { private static Usuarios usr = null; private static UsuariosDAO dao = null; @BeforeClass public static void runBeforeEachTest() { usr = new Usuarios(); dao = ...