Class Cast Exception in Stateless session bean

Hi,

i am getting a class cast exception in this particular line....

in my EJBClient program i get this error..

//Getting a reference to the bean's home interface in client program

SimpleSessionHome home=(SimpleSessionHome)PortableRemoteObject.narrow(ref, SimpleSessionHome.class);

Wher SimpleSessionHome is my Home interface.

I am not able to correct the error. Plz help me.

Thanks,

Akshatha

[447 byte] By [doubts4akkua] at [2007-10-2 5:28:48]
# 1
a
rinowza at 2007-7-16 1:30:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Hi,

Make sure you are looking up the correct JNDI name. And, what king of Classloading is being used.

This could be an issue if there are different classloader in action.

According to the JBoss 4 Admin Guide.

Most developers know that the type of a class in Java is a function of the fully qualified name of the class. However the type is also a function of the java.lang.ClassLoader that is used to define that class.

Feel free to forward your queries / comment.

Pawan.

Pawan_Singha at 2007-7-16 1:30:26 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...