• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class Cast Problem using PortableRemoteObject.narrow

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???.
 
reply
    Bookmark Topic Watch Topic
  • New Topic