| | |
Class Cast Exception in Portable Remote Object
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Solved Threads: 0
Hai guys,
I am new at jsp.I have made a simple j2ee application in which i am getting class cast exception in PortableRemoteObject.narrow function.
The exception is:
The root cause is :
The code of the file is :
I have read many threads but i was not able to solve this problem.
It has been 2 to 3 weeks that i am struck in this error.
Plz help me with this.
Thanks in advance.
I am new at jsp.I have made a simple j2ee application in which i am getting class cast exception in PortableRemoteObject.narrow function.
The exception is:
JSP Syntax (Toggle Plain Text)
org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
The root cause is :
JSP Syntax (Toggle Plain Text)
java.lang.ClassCastException com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229) javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137) org.apache.jsp.registration_jsp._jspService(registration_jsp.java:59) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
The code of the file is :
JSP Syntax (Toggle Plain Text)
<%@ page language="java" import="java.sql.,pkg.,javax.ejb.,javax.naming.,javax.rmi.PortableRemoteObject,java.rmi.RemoteException" %> <html> <head> <title></title> </head> <body bgcolor="CCCCFF"> <h1><center>Welcome to MyBank</center></h1> <% InitialContext initial = new InitialContext(); Object objref = initial.lookup("bankDSN"); pkg.mybankHome vi = (pkg.mybankHome)PortableRemoteObject.narrow(objref,pkg.mybankHome.class); %> </body> </html>
I have read many threads but i was not able to solve this problem.
It has been 2 to 3 weeks that i am struck in this error.
Plz help me with this.
Thanks in advance.
Last edited by peter_budo; Jul 14th, 2008 at 8:41 pm. Reason: Keep It Organized - please use [code] tags
![]() |
Other Threads in the JSP Forum
- Previous Thread: Unable to connect database From jsp page
- Next Thread: I got error while i am trying to use java generic classes in jsp
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web





