• 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

ClassCastException in EJB client

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
My code for an EJB Client throws a ClassCastException. Could you tell me why this is happening and how to avoid it. The EJB(stateless session EJB) has been deployed without any trouble with JNDI name CalculatorJNDI. The EJB class is CalculatorEJB, the home interface is CalculatorHome and the remote interface is Calculator. I am using j2se1.4 and j2ee1.3.1. See the code at www.geocities.com/rahuldasgupta1981/code1.html, and the exception message at www.geocities.com/rahuldasgupta1981/exception.html. Thanks for any help.
- Rahul
[ March 20, 2003: Message edited by: Rahul Dasgupta ]
 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
your links don't work
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a nasty one!
I remembered we were having that problem with Websphere some time ago. The reason why you are getting a ClassCastException is because you are trying to cast an Object to the wrong class.
The reason why it was happening to us is because the remote interface had changed, and we were using the old stubs. Re-creating the client stubs was enough to fix the problem.
This may help, but I don't promise you it is the cause of your problem...
Eduard
 
Rahul Dasgupta
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The links should work now.
- Rahul
 
What could go wrong in a swell place like "The Evil Eye"? Or with 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