This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassCastException while lookingup EJB - Sun ONE App server 7.0  RSS feed

Jayakumar Gopalan
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
While lookingup EJB from JSP, I am getting the ClassCastException. I am using Sun ONE Application server 7.0 on Win2K machine with JDK1.4. The web module and ejb module are deployed separately as war and jar (not as ear).
Below is my part of code
InitialContext context = null;
context = new InitialContext();
Object homeObj = context.lookup("java:comp/env/ejb/Gateway");

GatewayHome gatewayHome = (GatewayHome) javax.rmi.PortableRemoteObject.narrow(homeObj, GatewayHome.class);

Gateway gateway = gatewayHome.create();

msg = gateway.process();

} catch( Exception ex )
And below is the exception i am getting
[07/Nov/2002:20:13:41] INFO ( 1784): CORE3282: stdout: hObj =$1
[07/Nov/2002:20:13:41] INFO ( 1784): CORE3282: stdout: Exception$1
[07/Nov/2002:20:13:41] WARNING ( 1784): CORE3283: stderr: java.lang.ClassCastException:$1
[07/Nov/2002:20:13:41] WARNING ( 1784): CORE3283: stderr: at _jasper._MyTest_jsp._jspService(
[07/Nov/2002:20:13:41] WARNING ( 1784): CORE3283: stderr: at org.apache.jasper.runtime.HttpJspBase.service(
[07/Nov/2002:20:13:41] WARNING ( 1784): CORE3283: stderr: at javax.servlet.http.HttpServlet.service(
[07/Nov/2002:20:13:41] WARNING ( 1784): CORE3283: stderr: at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(

Can anybody help me.
Thanks in advance.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!