christian wrote:
Replacing the imports should be enough, although you don't need to catch and wrap exceptions anymore - H3 throws RuntimeExceptions.
thx chris,
I did it and now I see this exception:
java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:262)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:184)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1505)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1053)
at com.xxx.util.HibernateUtil.<clinit>(HibernateUtil.java:34)
The code thats throwing this exception:
static {
//try {
configuration = new Configuration();
sessionFactory = configuration.configure().buildSessionFactory();
// We could also let Hibernate bind it to JNDI:
// configuration.configure().buildSessionFactory()
//} catch (Throwable ex) {
// We have to catch Throwable, otherwise we will miss
// NoClassDefFoundError and other subclasses of Error
//log.error("Building SessionFactory failed.", ex);
//throw new ExceptionInInitializerError(ex);
//}
}
Why is it still looking for old packages?
thanks