The moose likes Oracle/OAS and the fly likes EJB Home Cast Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "EJB Home Cast Exception" Watch "EJB Home Cast Exception" New topic
Author

EJB Home Cast Exception

Joe Lee
Greenhorn

Joined: Aug 01, 2002
Posts: 7
Hi All,
I have another problem.

If I call my deployed ejb from a JSP I get the following class name:-
TravelHome_StatelessSessionHomeWrapper3
I should get:-TravelHome
It works Ok calling it from a Application but not
a JSP.
A call via a JSP using the following code:-
home = (TravelHome)
PortableRemoteObject.narrow(
boundObject,TravelHome.class);
keeps throwing a class cast Exception.

The following ref some of my code used in the jsp.
final String location ="Travel";
TravelHome home = null;
Travel remote = null;

Object boundObject=context.lookup(location);
String className="";
className=boundObject.getClass().getName();
System.out.println(className);
Can anybody please help

:roll:
 
IntelliJ Java IDE
 
subject: EJB Home Cast Exception
 
Threads others viewed
I have deployed my ejb with Weblogic and I have a problem with my client
JNDI Context Problem
gettin problem with running client after deploying ejb in websphere 6.0
Class Cast Problem using PortableRemoteObject.narrow
Best practice for stateless session bean in a servlet
developer file tools