The Linkage error occurs when the same class is loaded from two different locations, sounds like a classloader hierarchy problem or you can say when included a library twice. For example:
LinkageError is what you'll get in a classic case where you have a class C loaded by more than one classloader and those classes are being used together in the same code (compared, cast, etc). It doesn't matter if it is the same Class name or even if it's loaded from the identical jar - a Class from one classloader is always treated as a different Class if loaded from another classloader
Thanks for reply. How to avoid linkage issue. Is it possible to activate only one classloader instead of multiple. Please advice.
By default the web application class loader works different from the Java2 delegation model: when a web application's needs a class first it will look in the local repositories (that is the classes and libraries in the wEB-INF/classes or WEB-INF/libs directories) instead of delegating. So, the configuration you're proposing will work without any problem.
But since both wars will contain the same class, have you considered packaging this class in a jar and place it in the jboss instance lib directory? This way you wouldn't need to include it in all the web applications you deploy in the instance.
Also you can refer: Class Loading in AS7 - JBoss AS 7.1 - Project Documentation Editor