-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: NoClassDefFoundError: HibernateException in 1/2 Cluster
PostPosted: Mon Mar 14, 2005 3:03 pm 
Newbie

Joined: Sat Mar 12, 2005 1:30 am
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: NoClassDefFoundError: HibernateException in 1/2 Cluster
PostPosted: Wed Mar 30, 2005 5:41 pm 
Newbie

Joined: Sat Mar 12, 2005 1:30 am
Posts: 2
Hello Everyone.

At this point I have still not found an explanation as to how
the circumstances leading to the 1/2 cluster failure occur.
However it has been discovered that forcing an explicit
change in the deployment mechanism for the application
server appears to resolve the problem. Returning to the
previous deployment mechanism following this appears
to suffer no further problems.

It appears in this case that some obscure form of
corruption in the deployment occurred which was not
cleaned up using normal process.

Regards,

JC2112


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.