• 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

EJB Home Cast Exception

 
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 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:
 
Nothing? Or something? Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic