This happened to me in the padt because only one of my web application and my ejb application was redeployed, and therefore used incompatible classloaders.
You can check if this is your case by doing:
System.out.println(ref.getClass().getClassLoader()); System.out.println(MyRemoteInterface class.getClassLoader());
If you get different classloaders then that is it.
(Remember classes loaded by different class loaders are incompatible).
What you must do is to redeploy both the web and the ejb application together, and not only one of them.
Or restart jboss, which takes more time.
Tell me if this helps.
Thanks for your response. After some additional research i found out the the Web Installer of Jboss AS 4.0.5 installs EJB 3 RC4. After manually updating to RC9 it worked correctly.
Eitherway the tip from andstall helped me a lot. This really sometimes aids me in resolving classloading errors.