This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error casting looked up ejb

 
Jeffrey Coleman
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just trying to get a working example up. I am using rad and running this on the built in websphere server version seven. The app that I am eventually going to be developing with EJBs will be using JEE5 so I cannot use the @EJB annotation outside of the container so I am learning how to do the lookup.

The error msg that I get is this:

Error 500: java.lang.ClassCastException: ejb.EJSLocal0SLHelloEJB_9fbc1047 incompatible with ejb.HelloEJB

Here is the code for the servelet



And here is the web.xml



This is the EJB



And here is the local interface



Any help would be much appreciated. Thanks in advance.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it work if you cast to HelloEJBLocal? The idea of the interfaces is to refer to them rather than bean implementation.
 
Jeffrey Coleman
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that works. Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic