0 Replies Latest reply on Aug 28, 2003 12:09 PM by kflagg

    Hibernate2 and JBoss 3.2.2RC2

    kflagg

      I'm trying to launch Hibernate2 as an MBean under JBoss. I have Hibernate2.jar in my server/default/lib directory, and the jboss-service.xml in my hibernate.sar is:



      jboss.jca:service=RARDeployer
      jboss.jca:service=ConnectionFactoryDeployer
      <!-- Make it deploy ONLY after DataSource had been started -->
      mappings/TJdoTest.hbm.xml,
      mappings/TBundle.hbm.xml,
      mappings/TMaterial.hbm.xml
      java:/hibernate/HibernateFactory
      java:jdbc/SybaseDS
      net.sf.hibernate.dialect.SybaseDialect
      net.sf.hibernate.transaction.JTATransactionFactory
      net.sf.hibernate.transaction.JBossTransactionManagerLookup
      false
      false
      java:/UserTransaction



      When I start JBoss, it barfs when trying to deploy my MBean with the following message:

      ------------------

      2003-08-28 09:54:29,701 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/c:/my/project/deploy/hibernate.sar

      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException)

      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)

      -----------------

      The actual cause of the UndeclaredThrowable is:

      ----------------

      Caused by: java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
      at java.lang.Class.getConstructor0(Class.java:1762)
      at java.lang.Class.getConstructor(Class.java:1002)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:850)

      ---------------------

      So, the SARDeployer is finding net.sf.hibernate.jmx.HibernateService but once it's inside, trying to instantiate that class, it is unable to find net.sf.hibernate.HibernateException, which is in the classpath.

      I'm am flummoxed. Has anyone encountered this before, or gotten Hibernate2 to work with 3.2.2RC2?

      Thanks,
      Ken