i getting a NullPointerException when
trying get a session ,and i found it is because i got a null sessionFactory
i am new to hibernate, and now doing with a one-to-many case.
i am sure the connection to db is well, and web application can find the datasource........ i can see these from command line of tomcat:
using datasource: java:comv/env/jdbc/pim
so .... why the sessionFactory is null?
the code is:
try {
sessionFactory = (new Configuration()).configure().buildSessionFactory();
}catch(HibernateException he) {
}
i put all *.hbm.xml and hibernate.cfg.xml under classes.
help~~~~~~~~~~~~~~~~~~~
|