-
1. Re: How to deal with commons-codec version conflict?
ctomc Oct 16, 2012 7:17 PM (in response to johnson_shawn)Hi,
check the class loading docs https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7
but basicly just define exclude for all modules you don't want to get imported.
--
tomaz
-
2. Re: How to deal with commons-codec version conflict?
johnson_shawn Oct 16, 2012 8:04 PM (in response to ctomc)Thanks, I just re-read through the classloading link. I think I'm starting to "get it", but may need a bit more help.
I have a WAR only, so I understand that the "local resources" are #3 in line.
I have a jboss-deployment-structure.xml:
<jboss-deployment-structure> <deployment> <dependencies> <module name="com.bananaco.settings" /> <module name="com.documentum" /> </dependencies> <exclusions> <module name="org.apache.commons.codec" /> </exclusions> </deployment> </jboss-deployment-structure>
I was "trying" the exclusion above - it didn't do the trick I was hoping. However, the com.documentum module has that commons-codec-1.3 and it is taking precedence. So, is there a way to instead have an exclusion specifically for the commons-codec Jar within the com.documentum module?
-
3. Re: How to deal with commons-codec version conflict?
sfcoy Oct 16, 2012 8:39 PM (in response to johnson_shawn)1 of 1 people found this helpfulTry updating the commons-codec version in your com.documentum module.
-
4. Re: How to deal with commons-codec version conflict?
johnson_shawn Oct 17, 2012 11:31 AM (in response to sfcoy)Sure, I could certainly update the commons-codec jar in com.documentum module. That is essentially what I had prior to JBoss, I replaced the older with newer inside of WEB-INF/lib.
So, should I take it a step further and update the actual org.apache.common.codec/main/ - to the newer commons that I'm using, or do I risk breaking something in JBoss core? Then of course adding the dependency to com.documentum.
-
5. Re: How to deal with commons-codec version conflict?
sfcoy Oct 17, 2012 6:50 PM (in response to johnson_shawn)1 of 1 people found this helpfulI would not touch the built-in org.apache.common.codec module. In theory it will only be seen by JBoss code unless you explicitly import it.
Just update the one in your documentum module, and leave it out of your WEB-INF/lib.
If you still have issues then a complete stack trace will be needed.