| Author |
Error casting looked up ejb
|
Jeffrey Coleman
Greenhorn
Joined: May 25, 2012
Posts: 23
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26218
|
|
|
Does it work if you cast to HelloEJBLocal? The idea of the interfaces is to refer to them rather than bean implementation.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Jeffrey Coleman
Greenhorn
Joined: May 25, 2012
Posts: 23
|
|
|
Yes that works. Thank you.
|
 |
 |
|
|
subject: Error casting looked up ejb
|
|
|