log4j:WARN No appenders could be found for logger,
April 3, 2007 at 3:12 PM
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. /hibernate.cfg.xml not foundException in thread "main" java.lang.NullPointerException at Site.FirstExample.main(FirstExample.java:44)
solution include this in Firstexample.java file finally {
// Actual contact insertion will happen at this step if(session != null){ session.flush(); session.close(); } if(sessionFactory != null) sessionFactory.close(); }