I have a very similar problem, did you ever find a resolution?
You mean, you are seeing a classcastexception while doing the lookup from the war? Have a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassCastExceptions, especially, the JMX console method mentioned over there
I'm experiencing the same problem as described in the original post. I've read the information within the link regarding ClassCastExceptions but cannot resolve the issue. My EAR file is being packaged via Eclipse (Ganymede) and the Bean itself resides within a JAR at top level described within application.xml. This JAR also appears to be included within the WAR (obviously nested within the EAR file containing the JAR I've just mentioned) within the WEB-INF/lib directory. Is it this duplication of the JAR, and therefore the Stateful session bean class and interface, which is causing the problem?
Yes, having the ejb jar file appear both in the ear and the war will cause a problem. The ejb will be created using the class definition from the jar in the ear, and then when code in the war attempts to access it, the jar in the war will be used for the class definition, and those are not the same because of the different classloaders used. Removing the ejb jar from the war should solve the issue.