Hi all,
 I get the following exception when i type cast the home object which is of
type <derivedHome> to my parent class <baseHome>.

Note: I used narrow method to type cast my <derivedHome> to EJBHome object
and stored that instance as my <baseHome>
Then when i try to use my <derivedHome> from the stored instance of
<baseHome> the casting exception occurs. why is it so?

java.lang.ClassCastException: <mypackage>.ejb.derivedHomeImpl_ServiceStub
        at <mypackage>.MyAction.execute(MyAction.java:50)
        at <mypackage>.MyServlet.callAction(MyServlet.java:260)
        at <mypackage>.MyBaseServlet.doPost(MyBaseServlet.java:188)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
        at weblogic.servlet.ServletServlet.service(ServletServlet.java:46)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:742)
        at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:686)
        at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:247)
        at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
        at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

FYI: While debugging, i got the EjbHome instance stored in my <baseHome> as
follows:

ejbHome:<mypackage>[EMAIL PROTECTED]
.2.84:[7001,7001,7002,7002,7001,-1] <jndiName> [jndiName]

Please give some suggestions to solve this problem. It is very urgent.

Thanks and Regards to all
rajesh

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