[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: JBoss 5, Java 6, and DocumentBuilderFactory ClassCastExc
bdean42
do-not-reply at jboss.com
Mon Dec 15 15:46:43 EST 2008
Okay, I may have made this post a bit preemptively but hopefully someone else will do less searching because of my solution.
Various hibernate libraries we use (hibernate-validator, hibernate-annotations, hibernate-search, etc), depend on dom4j. dom4j had been in our old hibernate 3.2.6 war as well but something must have changed.
Now if I run mvn dependency:tree, there is another new jar being sucked in by dom4j, xml-apis. Looking at dom4j's pom file, it does not not directly depend on xml-apis, but it does depend on xerces which depends on xml-apis. This was really the only noticable xml related difference in the jar files that get included in our war.
So I changed the dependencyManagement section of our pom file to have the following:
<dependency>
| <groupId>dom4j</groupId>
| <artifactId>dom4j</artifactId>
| <version>1.6.1</version>
| <exclusions>
| <exclusion>
| <groupId>xml-apis</groupId>
| <artifactId>xml-apis</artifactId>
| </exclusion>
| </exclusions>
| </dependency>
And now it works. I'm still not 100% sure why I needed to do this though. Seems like "maven magic" to some extent. I realize that it's not magic but I'm not sure what exactly is going on here.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196701#4196701
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196701
More information about the jboss-user
mailing list