Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class Cast Problem using PortableRemoteObject.narrow

 
Joe Lee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I’m currently deploying a session bean to OC4J.
On calling the bean from a JSP using:-
Object boundObject=context.lookup(“Travel” ;
String className= boundObject.getClass().getName();
I found that the className value is: TravelHome_StatelessSessionHomeWrapper3
If I attempt the following within the JSP I get a cast exception ???

TravelHome home = (TravelHome)
PortableRemoteObject.narrow(
boundObject,TravelHome.class);
I’m not sure why TravelHome_StatelessSessionHomeWrapper3 is used.
I checked orion-ejb-jar.xml under directory application-deployment, it contains:-
<orion-ejb-jar>
<enterprise-beans>
<session-deployment wrapper=” TravelHome_StatelessSessionHomeWrapper3”
I’m not sure how to get arround this problem, any ideas.
 
Joe Lee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Using similar code within an application, I was able to call the EJB. Still having problems calling from a JSP due to the class cast exception; any ideas???.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic