Hello.
I am attempting to provide all of the information I can, but if there is further detail needed let me know. The detailed information follows the explanation of the problem.
A Hibernate 1.2.4 enabled web-app is deployed to a BEA Weblogic 8.1 server cluster with 2 participants in the cluster (.war only, no Hibernate-enabled EJB's). Both BEA server instances are launched with the same user account and scripts (difference only in required server naming parameters) from a shared drive mount.
Server 1 - Hibernate works just fine.
Server 2 - HibernateUtil sessionFactory initialization fails and the calling Thread received java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException.
The same application has been deployed to another cluster (on the same devices) without issue.
The Hibernate-related .jars are only provided within the WEB-INF/lib directory of the .warfile (no system/container defined classpath references to Hibernate).
Given the same hardware, OS, application server version (and JVM), user and scripts I cannot fathom what is happening. If this is a classloader related issue (such as HB-1064) I would expect the deployment to fail on both server instances of the cluster, not just one.
If anyone has any idea why this might be happening (or had a similar experience with Hibernate behaviour in a cluster) please let me know. I am theorizing that the deployment to the second server is somehow damaged but myself (and several others) have not yet been able to discover a way to find or correct the problem.
Thanks,
JC.
Hibernate version:1.2.4
sessionFactory Initialization:
Code:
static {
try {
Configuration cfg = new Configuration();
Log log = getLog( "app" );
if ( log != null ) {
log.debug("HibernateUtil - staticInitializer - Building sessionfactory.");
} else {
System.out.println("HibernateUtil - staticInitializer - Building sessionfactory.");
}
sessionFactory = cfg.configure().buildSessionFactory();
}
catch (Throwable t) {
t.printStackTrace(System.out);
Log log = getLog( "app" );
if ( log != null ) {
log.error("HibernateUtil - staticInitializer - Attempt to find/set configuration failed. Exception: " + t.getMessage(), t );
} else {
System.out.println("HibernateUtil - staticInitializer - Attempt to find/set configuration failed. Exception: " + t.getMessage() );
}
throw new ExceptionInInitializerError(t);
}
}
Full stack trace of any exception that occurs:
2005-03-14 10:59:02,727 [Thread-21 ] ERROR : Agent::run():: - Unexpected exception: java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException message: net/sf/hibernate/HibernateException. Thread is terminating.
Name and version of the database you are using: DB2/UDB v7