Hi Scott,
J2EE 1.2.1 RI uses RMI-IIOP and direct casting is not permitted in that case.
You need narrow the object reference using the following call.
Object o = ctx.lookup("person.PersonHome");
PersonHome phome = (PersonHome) PortableRemoteObject.narrow(o,
PersonHome.class);
HTH
-Arun
________________________________________________
Get your own "800" number - Free
Free voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
---- On , Scott Ellis ([EMAIL PROTECTED]) wrote:
> Ok, I have gotten the ejb to deploy correctly, but I am getting a class
> cast
> exception when I am trying to acquire the home interface of my person
> bean.
>
> try
> {
> System.out.println( "Starting to look for the person bean" );
> Object o = ctx.lookup( "person.PersonHome" );
> System.out.println( "Found " + o.getClass().toString() );
> PersonHome phome = (PersonHome)o;
> System.out.println( "Found the person home interface" );
> }
> catch( Exception e )
> {
> ...
> }
>
> The type of class returned by the lookup is
> PersonBeanHomeImpl_ServiceStub
>
> Does this ring a bell for anyone?
>
> Scott
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".