sorry for my wrong words.

I know where you get this bean example but i do not have that book. Can you
pass 5 .java to me i.e. home, remote, bean, pk and client to me then I can
try.


-----Original Message-----
From: Sachin Devand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 01, 2001 12:25 AM
To: [EMAIL PROTECTED]
Subject: Re: Class Cast Exception Once Again !!


Fei:

I saw the difference and I made that change but still
it does not work! I dont know how much different it
would make if I did not type cast it into CabinHome
when I did lookup and later did a narrow on Object.
But it did not work! Am I not including something in
the CLASSPATH or is there something in my CLASSPATH
which I should remove? I have tried so many things it
just does not work! ejbc generates a GenCabin.jar
file. I have added that too in the CLASSPATH.

Devand
--- Fei Li <[EMAIL PROTECTED]> wrote:
> My edition to your code:
>
> Context jndiContext = getInitialContext();
> Object obj = jndiContext.lookup("CabinHome");
> CabinHome home =
>
(CabinHome)PortableRemoteObject.narrow(obj,CabinHome.class);
>
>
> compare to your original code:
>
> Context jndiContext = getInitialContext();
> Object obj =
> (CabinHome)jndiContext.lookup("CabinHome");
> CabinHome home =
>
(CabinHome)PortableRemoteObject.narrow(obj,CabinHome.class);
>
> Can you find a slight difference?
>
> Fei Li
>
>
> -----Original Message-----
> From: Sachin Devand [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 31, 2001 11:01 PM
> To: [EMAIL PROTECTED]
> Subject: Class Cast Exception Once Again !!
>
>
> Hi,
>
> This issue has come up earlier in this mailing list.
> I
> looked at it but still my problem is unsolved. Do
> let
> me know if someone can answer this question. I am
> trying to do a PortableRemoteObject.narrow() on a
> bean
> that I lookup from jndiContext. The problem is that
> I
> get a class cast exception. I have tried to add the
> generated jar files from weblogic.ejbc in the
> CLASSPATH, but still I get this error. If anyone
> knows
> a way out I would deeply appreciate it.
>
> Thanks.
> Devand
> ----------------STDERR-------------
> java.rmi.UnmarshalException: Problem deserializing
> error response; nested except
> ion is:
>         java.io.InvalidClassException:
> javax.ejb.EJBException; Local class not c
> ompatible: stream classdesc
> serialVersionUID=2303241739226627938 local class ser
> ialVersionUID=-9219910240172116449
>
java.io.InvalidClassException:javax.ejb.EJBException;
> Local class not compatible: stream classdesc
> serialVersionUID=2303241739226627938 local class
> serialVersi
> onUID=-9219910240172116449
>         at
>
java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:5
> 23)
>         at
>
java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:567)
>         at
>
java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
> :936).....
> -----------------STDERR---------------
> My Application is Simple:
> Context jndiContext = getInitialContext();
> Object obj = (CabinHome)jndiContext.lookup
> ("CabinHome");
> CabinHome home =
> (CabinHome)PortableRemoteObject.narrow
>                     (obj,CabinHome.class);
> Cabin cabin1 = home.create(1);
> .....
> ----------------------------------
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/?.refer=text
>
>
===========================================================================
> 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".
>


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text

===========================================================================
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".

Reply via email to