-
1. Re: ClassCastException when trying to cast naming reference
donniedarko Jul 18, 2005 4:33 AM (in response to bmhardy)Check out:
"Connecting to EJB3 from within an Applet"
in the Wiki
http://wiki.jboss.org/wiki/Wiki.jsp?page=EJB3
Best regards -
2. Re: ClassCastException when trying to cast naming reference
lhoriman Jul 18, 2005 4:49 PM (in response to bmhardy)"bmhardy" wrote:
autoMgr = (AutomobileMgr)ctx.lookup(AutomobileMgr.class.getName());
Is AutomobileMgr a @Remote interface or a @Local one? Are you sure you don't want:
autoMgr = (AutomobileMgr)ctx.lookup(AutomobileMgrRemote.class.getName());
That error msg (about Reference) is what happens when you lookup a local interface from a remote client.
Jeff Schnitzer
http://www.similarity.net -
3. Re: ClassCastException when trying to cast naming reference
bmhardy Jul 21, 2005 11:28 AM (in response to bmhardy)That was a good idea.
I'm pretty sure the Mgr is Remote. I see @Remote specified in my Mgr interface, but once the code is compiled and deployed, I'm not certian where to look to verify for certain that the Mgr is Remote (even though not named with MgrRemote).
Brian -
4. Re: ClassCastException when trying to cast naming reference
bmhardy Aug 3, 2005 2:08 AM (in response to bmhardy)I read this off theserverside at address
http://www.theserverside.com/discussions/thread.tss?thread_id=34856
It seems there is a bug with JBoss 4.0.2. I deployed the same example ear file to version 4.0 and 4.0.2 but version 4.0.2 failed. When I lookuped the home of a bean deployed from a web servlet using InitialContext JBoss Server 4.0.2 always appended additional "Home" to the end of bound JNDI subcontext, which caused ClassCastException. The funny thing is, if you use stand-alone client there are no such exception at all.
I'm using jboss-4.0.1sp1 and see this problem
Is this comment correct?
Brian