may be related to http://www.jboss.com/index.html?module=bb&op=viewtopic&t=104346
After many searches, many headaches, I've reached the end and I still doesn't find a way to achieve what I want.
I have 2 wars containing the same lib. These 2 wars are deployed in default/deploy. They also use spring.jar that I want them to share, I put it in default/lib of my server. My deployment strategy is :
- what is common but not made by me (hibernate, spring, jsf, ...) is put under default/lib
- what is common but made by me is deployed within each of my wars.
If I deploy only one war, my application works well. If I add the second one, then I get something that looks like classcastException : spring tells me it can't set a value to a property arguing they are not from the same type.
I tried to use a specific class-loading in my jboss-web.xml :
<class-loading> <loader-repository> toto:loader=war1 </loader-repository> </class-loading>
<class-loading> <loader-repository> toto:loader=war2 </loader-repository> </class-loading>
forgot to mention I'm using JBoss 4.0.4