5 Replies Latest reply on May 16, 2011 9:52 AM by Benjamin Lambe

    unknown jboss error with hibernate

    Benjamin Lambe Newbie

      I have a class HibernateUtil.java

       

      public class HibernateUtil

      {

          private static final SessionFactory sessionFactory;

       

          static

          {

              sessionFactory = new Configuration().configure().buildSessionFactory();

          }

       

          public static SessionFactory getSessionFactory()

          {

              return sessionFactory;

          }

      }

       

      this reads in my hibernate.cfg.xml file

       

      i have deployed this on tomcat and glassfish seperately and it works fine, but as soon as i try and put it on jboss when i try and connect it throws the folloring error

       

      2011-05-16 14:04:28,149 ERROR [org.jboss.wsf.common.invocation.InvocationHandlerJAXWS] (http-127.0.0.1-8080-1) Method invocation failed with exception: null: java.lang.reflect.InvocationTargetException

       

      and

       

      Caused by: java.lang.NoClassDefFoundError: Could not initialize class HibernateUtil

       

      like i said this only happens with jboss, glassfish works fine, any ideas?