2 Replies Latest reply on Oct 21, 2009 9:21 AM by hot33331

    Trying desperately to use envers with jboss-4.2.2GA

    hot33331

      Hi there,

      I am trying desperately to use envers with jboss-4.2.2GA. Is that possible, at all? If so: HOW??? I tried to use envers 1.0.0 since that should be compatible with the version 3.2.4 sp1 that is used in that version of jboss.
      I tried upgrading hibernate to version 3.3.2GA in order to use envers 1.2.1 ga. Nothing worked for me.

      The best I got was jboss starting up without any errors - no version tables got created an only when I used
      AuditReader reader = AuditReaderFactory.get( manager );
      Article oldArticle = reader.find( Article.class, persistentEntity.getId(), 2 );

      I get an exception
      java.lang.NoClassDefFoundError: org/hibernate/envers/event/AuditEventListener

      Is there an easy way to get envers to run? A Howto? ANYTHING? PLEASE HELP!!!

      Tobias

        • 1. Re: Trying desperately to use envers with jboss-4.2.2GA
          adamw

          Hello,

          yes, it is possible. I would rather recommend using newest Hibernate and newest Envers, if possible. To do that, it is best to create a .ear or .war in an isolated classloader (you can do it through a special deployment descriptor), and bundle all hibernate jars in your application, leaving the AS libraries intact.

          The exception suggest that you have a packaging problem, so that should help.

          Adam

          • 2. Re: Trying desperately to use envers with jboss-4.2.2GA
            hot33331

            Migrated everything to jboss5.1.0 now - envers works like a charm now - well there are still some things that I need to figure out in envers, but at least it does what it should with a simple entity.
            Thanks for the advice though!