After some debugging I've noticed that the following peace of code is causing the exception. But I still cant figure out why...
public void init() {
try {
System.out.println(">>>>>>>>>>>>>>>>>>>init start<<<<<<<<<<<<<<<<<<<<<<");
factory = new Configuration().configure().buildSessionFactory();
System.out.println(">>>>>>>>>>>>>>>>>>>init stop<<<<<<<<<<<<<<<<<<<<<<");
} catch (Exception e) {
System.out.println(">>>>>>>>>>>>>>>>>>>error<<<<<<<<<<<<<<<<<<<<<<");
//LOG.error("error configuring", e);
//throw new RuntimeException( e.getMessage());
// Make sure you log the exception, as it might be swallowed
LOG.error("Initial SessionFactory creation failed.", e);
throw new ExceptionInInitializerError(e);
}
}
It never reaches init stop, but the weirdest thing is that error is also not printed out.
This is part of the HibernateSessionFactory class.
Please help
|