Probably the JBoss client jars you are using are not the same as those supplied with your JBoss distribution. The JVM is complaining because the class it has locally does not match the UID of the class it finds at the remote end. Check your jbossall-client.jar and so on that you have installed in Tomcat compared to those from your JBoss distribution's client directory.
Yes. This is what I tried to do.
So I've copied all the jars laying under JBoss/client to the WEB-INF/lib directory of my webproject.
But still Tomcat doesn't lookup correctly. Do you know if I have to use another dir (I also tried Tomcat/common/lib)
It should work from shared/lib. Make sure you don't have multiple copies of the libraries. Also the libraries in client have some repeated classes so including all of them may hurt your cause. Just try the jbossall-client.jar to start with and if you get any class missing issues, find the jar with that class and include that.
There used to be an issue with the transition from JDK 1.3 to 1.4 that the UIDs would be reported differently (if I remember correctly). In any case, you should probably use the same JDK for both environments and see if that changes anything.
Also make sure you only have the jars included once in all of Tomcat and your WAR - that will ensure that you don't have an old class floating around somewhere in your Tomcat install. That is the only other thing I can think of that would cause you to have two classes with different UIDs at client (Tomcat) and server (JBoss).
Hope that helps otherwise I'm out of ideas.
thanks a lot. I will try to solve the problem with your suggestions. If it works afterwards I will also give a short feedback about the reason why it fails.