2 Replies Latest reply on Sep 16, 2009 8:22 AM by Patrick Jusseau

    Trying to use Envers with JBoss 4.2.3

    Patrick Jusseau Newbie

      Hi,

      I would like to use Envers with JBoss 4.2.3
      JBoss 4.2.3 ships with Hibernate 3.2.4sp1 therefore I guess I have to upgrade hibernate to 3.2.6 to use Envers 1.1.0 or better upgrade to hibernate 3.3.x to use Envers 1.2

      I followed this article to use hibernate 3.2.6
      http://jaitechwriteups.blogspot.com/2008/08/how-to-upgrade-hibernate-in-jboss.html

      However when I deploy my ear, I get the following exception :

      11:59:16,069 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=jpat-server.ear,jar=jpat-server.jar,unitName=PersistenceUnit
      11:59:16,129 INFO [Version] Hibernate Annotations 3.3.1.GA
      11:59:16,145 INFO [Environment] Hibernate 3.2.6
      11:59:16,159 INFO [Environment] hibernate.properties not found
      11:59:16,164 INFO [Environment] Bytecode provider name : javassist
      11:59:16,172 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      11:59:16,266 INFO [Version] Hibernate EntityManager 3.3.2.GA
      11:59:16,614 WARN [ServiceController] Problem starting service persistence.units:ear=jpat-server.ear,jar=jpat-server.jar,unitName=PersistenceUnit
      java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/hibernate/event/PreCollectionUpdateEventListener
      at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:109)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      This shows that hibernate 3.2.6 is loaded but can't find the PreCollectionUpdateEventListener class that is however part of hibernate3.jar !!

      Any idea of what is wrong?