1 Reply Latest reply on Jun 7, 2005 8:25 PM by Scott Huddleston

    HARDeployer in hibernate3-deployer.zip compatible with JBoss

    Scott Huddleston Newbie


      I'm receiving the following exception when the main deployer tries to start Hibernate3 under JBoss 4.0.0 standard configuration:

      ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.0.0/server/myserver/deploy/jboss-hibernate.deployer
      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
      Caused by: java.lang.NoSuchMethodError: org.jboss.hibernate.har.HARDeployer.setSuffixes([Ljava/lang/String;)V
       at org.jboss.hibernate.har.HARDeployer.<init>(HARDeployer.java:67)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
       at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1212)
       at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:269)
       at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:327)
       at org.jboss.system.ServiceCreator.install(ServiceCreator.java:125)
       ... 83 more

      Based on the Wiki entry http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHibernateSwitching I've performed the following steps to upgrade to Hibernate3:

      - removed the file .../server/myserver/deploy/hibernate-deployer-service.xml
      - removed the following jars under .../server/myserver/lib: hibernate2.jar and jboss-hibernate.jar
      - added the deployer archive jboss-hibernate.deployer from the hibernate3-deployer.zip (downloaded from the Wiki page) to .../server/myserver/deploy

      Note that .../server/myserver is based on the .../server/standard directory whose configuration starts all J2EE services in JBoss's optimized class loader.

      From the stacktrace listed above it seems that the HARDeployer is trying to call setSuffixes in its ctor, however that method does not exist. The class org.jboss.hibernate.har.HARDeployer extends from org.jboss.deployment.SubDeployerSupport. In JBoss 4.0.0 SubDeployerSupport does not have a setSuffixes method, however looking at the source for JBoss 4.0.2 it seems there is one.

      This could be a classpath issue since I'm using the standard configuration that does not isolate components, however I can't find the newer version of the org.jboss.deployment.SubDeployerSupport class in the jboss-hibernate.deployer archive (or anywhere for that matter). So even if I was using the default server (isolated deployments) I don't think it would matter. HARDeployer still needs a setSuffixes from somewhere.

      Is the jboss-hibernate.deployer contained in the hibernate3-deployer.zip truely compatible w/ JBoss 4.0.0? Or am I missing something?

      Any help would be greatly appreciated,