Most likely you have problem with hibernateSession initialization. Your exception handling is bad and block
Code:
catch (HibernateException hne) {
hne.getStackTrace();
}
does not make any sense.
Rewrite your static initializer like this:
Code:
static {
try {
sessionFactory = new Configuration().configure()
.buildSessionFactory();
}
catch (HibernateException hne) {
throw new ExceptionInInitializerError(hne);
}
}
and if sessionFactory is not created (I guess this is the most likely case) you will see why it fails.
On a side note your getSession() method just eats up HibernateException without even logging exception which is poor way to code.