-
1. Re: When deploying stateful session bean, it shows via JNDI
h0ppy May 1, 2007 12:38 PM (in response to yair.zaslavsky)I have a very similar problem, did you ever find a resolution?
-
2. Re: When deploying stateful session bean, it shows via JNDI
jaikiran May 2, 2007 10:32 AM (in response to yair.zaslavsky)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
-
3. Re: When deploying stateful session bean, it shows via JNDI
alistairblack Aug 13, 2008 3:59 PM (in response to yair.zaslavsky)Hi,
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?
Many thanks
Alistair -
4. Re: When deploying stateful session bean, it shows via JNDI
peterj Aug 13, 2008 5:16 PM (in response to yair.zaslavsky)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.