I haven't done this, but take a look here:
You should be able to indicate the class loader in a jboss-web.xml in your .war file. This should match what you have in jboss-app.xml in your .ear file.
genman's idea should work. You need to make sure that there are not different versions of a single library.
Another way is to make UseJBossWEbLoader to be true. This will make JBoss look up everywhere (includnig inside the EAR).
Thank you genman and raja05. I will try this and let you know.