-
1. Re: simple stateful session bean classcast exception
eielk Mar 21, 2006 10:28 PM (in response to eielk)sorry but here is some additional info:
1. using ejb3
2. i did notice that the trailblazer works with 4.0.4 only, but my question still stands, why can't i lookup the stateful session bean? -
2. Re: simple stateful session bean classcast exception
eielk Mar 21, 2006 11:19 PM (in response to eielk)update: upgraded to 4.0.4RC1 and i get the same classcast exception! doh!
anyone have any ideas? should i be getting a statefulproxyfactory first since that is what is loaded into jndi? -
3. Re: simple stateful session bean classcast exception
eielk Mar 22, 2006 11:58 PM (in response to eielk)anyone?
no one has run into this? come on... i don't believe it.
i've been thru all of the tutorials and trailblazers, this is not complex but the client lookup just doesn't work for a stateful session bean...
i found another posting on the wiki site that talks about classcastexception for multiple deployments of the same class, so i made sure my .war had only the interfaces and the ejb.jar had interfaces and impls. all wrapped up nicely in an ear...but it still gave the same error.
help! -
4. Re: simple stateful session bean classcast exception
starksm64 Mar 25, 2006 11:54 AM (in response to eielk)The war should not have the interfaces when using the default war first class loading mode as this results in inconsistent types.
-
5. Re: simple stateful session bean classcast exception
tazly Apr 11, 2006 8:43 AM (in response to eielk)"scott.stark@jboss.org" wrote:
The war should not have the interfaces when using the default war first class loading mode as this results in inconsistent types.
That finally solved the problem!
For the sake of usablity, this hint should be in the error message when getting a ClassCastException on EJB3 lookup, when classnames are identical and classloaders differ. Especially because in the old ways of J2EE, the EJB-interfaces have to be present in the war - now they are not allowed to.