I think the problem may be caused by the location you put your server-side
classes.
Please check the following diagram for reference. (IT works for me with
weblogic51 and tomcat)
Hope this helps
Jeff Hu
+---clientclasses
| \---com
| \---britannica
| \---cma
| Return_RecordSet_Client.class
| Return_RecordSet_ClientBean.class
| Return_RecordSet_ClientBean_test.class
|
+---servletclasses
| +---com
| | \---britannica
| | \---cma
| | IG_ControlServlet.class
| | Return_RecordSet_ClientBean.class
| |
| \---lab02_JDBC
| JDBCStockQuoteServlet.class
|
\---serverclasses
\---com
\---britannica
\---cma
Return_RecordSetBeanHomeImpl_WLSkel.class
Return_RecordSetBeanEOImpl_WLSkel.class
Return_RecordSetBeanHomeImpl_ServiceStub.class
Return_RecordSetBeanEOImpl_ServiceStub.class
Return_RecordSetBeanHomeImpl_WLStub.class
Return_RecordSetBeanEOImpl_WLStub.class
Return_RecordSetBeanHomeImpl.class
Return_RecordSetBeanEOImpl.class
Return_RecordSet.class
Return_RecordSetBean.class
Return_RecordSetHome.class
-----Original Message-----
From: sohail_hirani [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 18, 2000 6:09 AM
To: [EMAIL PROTECTED]
Subject: EJB in JSP (on a diff server) causes
java.lang.ClassCastException : trial.CustomerBeanHomeImpl_ServiceStub
I am trying to get a reference to the home class with the following code in
another web server (on the same machine):
Properties p =new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory
");
Context ctx = new InitialContext(p);
CustomerBeanHome home = (CustomerBeanHome) ctx.lookup("CustomerBeanHome");
This code gives me the following error
[18/Jul/2000:14:42:48] failure ( 123): Internal error: exception thrown
from the servlet service function (uri=/CustQuery.jsp):
javax.servlet.ServletException: trial.CustomerBeanHomeImpl_ServiceStub,
Stack: javax.servlet.ServletException:
trial.CustomerBeanHomeImpl_ServiceStub
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:384)
at _CustQuery_jsp._jspService(_CustQuery_jsp.java:112)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.jav
a:476)
Please tell me what could be the reason for such an exception. The same code
has worked in a standalone application.
Please answer ASAP
With regards and best wishes,
Sohail Hirani
(Normal is boring)
*Off 91- 2139-32800/1.
Extn No. 2684 @ Hjw.
Res 91-20-6683416
Infosys Technologies limited
* sohail_hirani @ inf.com
INFOSYS(r)
Powered by intellect. Driven by values.
===========================================================================
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".