Getting SEVERE: Could not locate SessionFactory in JNDI while getting sessionfactory
问题 I am using hibernate as persistence layer to communicate with the database. I used maven plugin hbm2java to generate dao, java, *hbm.xml and hibernate.cfg.xml. till that time plugins works fine. But when I trying to communicate to db it gives following exception. Aug 30, 2012 1:45:46 PM org.hbm2dao.AssemblyHome getSessionFactory SEVERE: Could not locate SessionFactory in JNDI javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet