-
1. Re: Trying to use Envers with AS-provided Hibernate
jaikiran Aug 2, 2011 7:33 AM (in response to adamw)What exception do you get if you don't bundle dom4j.jar within your application?
-
2. Re: Trying to use Envers with AS-provided Hibernate
adamw Aug 2, 2011 7:35 AM (in response to jaikiran)The above one. Bundling dom4j in the war obviously won't work .
Adam
-
3. Re: Trying to use Envers with AS-provided Hibernate
jaikiran Aug 2, 2011 7:41 AM (in response to adamw)Oh I misread a part of your original description. I should actually have asked - what's the exception stacktrace that you see when you don't add a Dependencies: org.dom4j. A CNFE I'm guessing, but I want to see the stacktrace to know which exact module is missing that dep and how it uses that library.
-
4. Re: Trying to use Envers with AS-provided Hibernate
adamw Aug 2, 2011 7:50 AM (in response to jaikiran)Sure. Here's the stack without Dependenices: http://pastie.org/private/tevhsuq3zp83v3ofohiegg
And with: http://pastie.org/private/ns9bsq6htoox6elixm6cq
lms.war is my application
Adam
-
5. Re: Trying to use Envers with AS-provided Hibernate
alesj Aug 2, 2011 8:09 AM (in response to adamw)Make Envers as a module and have it depend on "org.dom4j". :-)
-
6. Re: Trying to use Envers with AS-provided Hibernate
adamw Aug 2, 2011 8:11 AM (in response to alesj)That's what I was going to try in the evening
Just wondering if it's possible to use using the traditional bundle-in-war approach (which I think should be possible)
Adam
-
7. Re: Trying to use Envers with AS-provided Hibernate
nickarls Aug 2, 2011 8:15 AM (in response to adamw)What happens if you just make it a part of the hibernate module? Dump it in the module dir with the rest of them and register it in module.xml
-
8. Re: Trying to use Envers with AS-provided Hibernate
jaikiran Aug 2, 2011 8:17 AM (in response to alesj)Ales Justin wrote:
Make Envers as a module and have it depend on "org.dom4j". :-)
I thought Strong had already worked on that https://issues.jboss.org/browse/AS7-928. Looks like it's not available in upstream.
-
9. Re: Trying to use Envers with AS-provided Hibernate
alesj Aug 2, 2011 8:18 AM (in response to adamw)Just wondering if it's possible to use using the traditional bundle-in-war approach (which I think should be possible)
Imo it should.
My guess is that war' child-first rule probably somehow gets in the way ...
-
10. Re: Trying to use Envers with AS-provided Hibernate
alesj Aug 2, 2011 8:19 AM (in response to nickarls)What happens if you just make it a part of the hibernate module? Dump it in the module dir with the rest of them and register it in module.xml
That would definitely work :-), but I doubt you wanna have Envers everywhere you have HIbernate.
-
11. Re: Trying to use Envers with AS-provided Hibernate
adamw Aug 2, 2011 8:39 AM (in response to alesj)I tried quickly creating a separate module (depending on Hibernate), but then Hibernate doesn't see Envers at all - the new auto-discovery looks for implementations of Integrator in the classpath and it seems the EnversIntegrator isn't found. I think Strong already worked on that, but not sure if it got commited.
Do you think the bundle-envers-in-war approach has any chances to work?
Adam
-
12. Re: Trying to use Envers with AS-provided Hibernate
jaikiran Aug 2, 2011 8:46 AM (in response to adamw)Adam Warski wrote:
Do you think the bundle-envers-in-war approach has any chances to work?
It should work. If it doesn't then we have to figure out why it doesn't work and try and fix it. After all, envers is just another library that the user can wish to package within his application.
-
13. Re: Trying to use Envers with AS-provided Hibernate
nickarls Aug 2, 2011 9:01 AM (in response to adamw)dom4j is really sticky, for some reason I can't even get it excluded from envers in maven when trying the maven build. It still gets included and results in a classcastexception against the version on the AS...
-
14. Re: Trying to use Envers with AS-provided Hibernate
adamw Aug 2, 2011 9:05 AM (in response to nickarls)Really? It doesn't get included for me.
My dependencies:<dependencies> <!-- JEE --> <dependency> <groupId>org.jboss.spec</groupId> <artifactId>jboss-javaee-6.0</artifactId> <type>pom</type> <scope>provided</scope> <version>1.0.0.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-envers</artifactId> <version>4.0.0.Beta1</version> <exclusions> <exclusion> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> </exclusion> <exclusion> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> </exclusion> <exclusion> <groupId>org.hibernate</groupId> <artifactId>hibernate-tools</artifactId> </exclusion> <exclusion> <groupId>org.hibernate</groupId> <artifactId>hibernate-commons-annotations</artifactId> </exclusion> <exclusion> <groupId>org.jboss.logging</groupId> <artifactId>jboss-logging</artifactId> </exclusion> <exclusion> <groupId>ant</groupId> <artifactId>ant</artifactId> </exclusion> <exclusion> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> </exclusion> </exclusions> </dependency> </dependencies>
Adam