Apologies for abusing the format, I'm not really asking a question here but I sure wish this would have shown up when I started banging my head against this wall two weeks ago.
I've inherited several large Java projects, using Spring and running on Tomcat, and am upgrading the frameworks used by them. However, when I upgrade Hibernate I suddenly get ExceptionInInitializer: root cause UnknownEntityException. Our HibernateConf looks like so:
public class HibernateUtil {
private static final SessionFactory sessionFactory;
private static ServiceRegistry serviceRegistry;
static {
Configuration configuration = new Configuration().configure("hibernate.cfg.xml");
serviceRegistry = new StandardServiceRegistryBuilder().applySettings(
configuration.getProperties()).build();
sessionFactory = configuration.buildSessionFactory(serviceRegistry);
}
}
We're still using hbm.xml to describe mappings, they are placed in individual files and included in hibernate.cfg.xml.