-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4240679
By: andigre
Hi
Zk seems not to work with 1.4 and Hibernate (Since 2.2.1). I found out that I have to replace the HibernateUtil in the zkplus.jar with an older version. Since 2.2.1 there is a static initializer which uses AnotationConfiguration. This not only requires the hibernate-annotations.jar in the classpath, but also jdk1.5.
--> with 1.4 you get a missmatched classversion exception during startup.
Do you know another solution?
Thanks. Andreas
New Versions: (Not working with 1.4)
static SessionFactory initSessionFactory() {
if (_factory == null) {
try {
// Create the SessionFactory from hibernate.cfg.xml
_factory = new AnnotationConfiguration()
.configure()
.buildSessionFactory();
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
log.error("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
}
return _factory;
}
In earlier version it was just Configuration. (Working with 1.4)
static SessionFactory initSessionFactory() {
if (_factory == null) {
try {
// Create the SessionFactory from hibernate.cfg.xml
_factory = new Configuration().configure().buildSessionFactory();
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
log.error("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
}
return _factory;
}
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4240792
By: jumperchen
This question occurs when we implement a new requirement in the JDK5 Annotation.
You can manually customize your Util class as well as the HibernateUtil class if you want to work with 1.4
Jumper
Asked: 2007-04-03 05:14:17 +0800
Seen: 159 times
Last updated: Apr 03 '07