9 Replies Latest reply: Apr 5, 2011 11:04 AM by thomas10 RSS

JBoss 6 - Envers missing?

thomas10 Newbie



I'm using JBoss 6.0.0 CR1 and trying to get started with Envers.


The Envers page stats that "Envers is now part of Hibernate". As hibernate is included in JBoss I wonder why there are no envers jars. The jar-versions.xml says hibernate-core.jar should be at version 3.6.0.Final. Since hibernate 3.5 envers should be included in hibernate-core.

Am I missing something or is envers missing from the jboss distribution?


If so, what is the correct way to get envers up and running? Can I simply replace the hibernate jars?


Thanks for your help.



  • 1. Re: JBoss 6 - Envers missing?
    Nicklas Karlsson Master

    It might be a part of the hib release but not included in the AS. Drop in the envers jar next to the other hib jars in the AS

  • 2. Re: JBoss 6 - Envers missing?
    thomas10 Newbie

    Thanks for your answer.

    I thought along the same lines and did try that approach. It works, but I wonder why AS does not include the full hibernate release. And it just does not feel correct to duplicate the hibernate libraries just to get the full release... what is the rationale anyway to ship a stripped down version of hibernate?

    Maybe I am suffering of paranoia but dropping my own hibernate libs seems to be quite dangerous if the versions dont match exactly.



  • 3. Re: JBoss 6 - Envers missing?
    Nicklas Karlsson Master

    The only reason I can think of is that deployment scanning is more expensive for all deployments if envers is enabled. I think you should(tm) be safe as long as you check the META-INF manifest of the hibernate-core to make sure you have the correct version.

  • 4. Re: JBoss 6 - Envers missing?
    thomas10 Newbie

    Ok, thank you. Just one more question: What is the right lib folder to use? The local server lib or the global lib?



  • 5. Re: JBoss 6 - Envers missing?
    jaikiran pai Master

    thomas10 wrote:


    Since hibernate 3.5 envers should be included in hibernate-core.

    From what I understand of this (which even applies to Envers) http://in.relation.to/14172.lace, it was never meant to be part of the single hibernate-core.jar.

  • 6. Re: JBoss 6 - Envers missing?
    Nicklas Karlsson Master

    I've just put it there in common lib with the other hibernate jar:s

  • 7. Re: JBoss 6 - Envers missing?
    sanfran0201 Newbie

    Hi Nicklas,


    I am at a loss of (1) which jar to use and (2) whether to replace an existing jar or drop a new jar.


    JBoss-6.0.0.Final contains hibernate-core.jar (version 3.6.0.GA) This jar, as correctly stated earlier, does not contain org.hibernate.envers. I downloaded hibernate-distribution-3.6.0.Final-dist.tar.gz from http://sourceforge.net/projects/hibernate/files/hibernate3/3.6.0.Final/hibernate-distribution-3.6.0.Final-dist.tar.gz/download .  hibernate-distribution-3.6.0.Final-dist.tar.gz's hibernate3.jar does not exactly match jboss6's hibernate-core.jar where org.hibernate.ejb package is 'missing' in hibernate-core.jar but fully populated in hibernate-distribution-3.6.0.Final-dist.tar.gz's hibernate3.jar. Other than that, everything seems to be the same. Consequently, it doesn't seem that I can replace jboss6's hibernate-core.jar with hibernate3.jar.


    Then I took the other route of NOT replacing jboss6's hibernate-core.jar but dropping a new jar for envers. I downloaded the latest version, envers-1.2.2.ga-hibernate-3.3.jar, from http://www.jboss.org/envers/downloads, the 1.2.2.GA release. When I performed a file-by-file comparison between envers-1.2.2.GA class files vs the package org.hibernate.envers in hibernate-distribution-3.6.0.Final-dist.tar.gz's hibernate3.jar, the two were significantly different (I can post the differences if you wish).


    Therefore, I am at a quandary. I can not simply (a) replace hibernate-core.jar with hibernate3.jar, nor can I (b) drop envers-1.2.2.ga-hibernate-3.3.jar into <JBOSS_SERVER>/common/lib


    Any help is appreciated.


  • 8. Re: JBoss 6 - Envers missing?
    ja do Newbie

    Having the same problem as Mike above, and would be thankful for any help.

  • 9. Re: JBoss 6 - Envers missing?
    thomas10 Newbie

    It does work when I put hibernate3.jar in my server/default/lib folder. But this seems just plain wrong. Many classes are in common/lib/hibernate-core.jar as well as in my hibernate3.jar.


    Is there an 'official' way to include envers? I could repackage my hibernate3.jar and just extract the envers related bits but thats completely wrong too.


    Any help is appreciated.