File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB3.0 not working in Websphere 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB3.0 not working in Websphere 7" Watch "EJB3.0 not working in Websphere 7" New topic
Author

EJB3.0 not working in Websphere 7

Mika Tapanainen
Ranch Hand

Joined: Jun 11, 2009
Posts: 95
Hello,

I can't get the EJB3.0 to work in Webspere 7. I got the error message:



My EchoServiceWSImpl (works without EJB) uses the EJB bean:



The service interface (is needed for the EJB3.0) is:



The service implementation is:



I have also beans.xml (I'm not sure if this is needed) in the jar metainf folder:



Do you know what is the problem?

BR,

Mika


SCJP, SCJD, SCEA
http://fi.linkedin.com/in/mikatapanainen
Mika Tapanainen
Ranch Hand

Joined: Jun 11, 2009
Posts: 95
Also I got the exception:

Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

WAS 7 supports JEE 5, so, there is no support for beans.xml (which is anyway CDI and not related to EJB).

And, I don't see either a @Local or @Remote declaration on the EJB interface.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Mika Tapanainen
Ranch Hand

Joined: Jun 11, 2009
Posts: 95
Now the ejb3.0 is working. The solution was to change my maven project type to the "ejb" and use the ejb 3.0 version in the maven ejb plugin.

Yes, you are correct the beans.xml is not needed.

But the @Local annotation is not needed. I checked from the EJB3.0 specification:

ejb-3_0-fr-spec-simplified.pdf page 16


If bean class implements a single interface, that interface is assumed to be the business interface
of the bean. This business interface will be a local interface unless the interface is designated
as a remote business interface by use of the Remote annotation on the bean class or
interface or by means of the deployment descriptor.


Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

Mika Tapanainen wrote:
But the @Local annotation is not needed. I checked from the EJB3.0 specification:

Oh ok. I was not aware of that.
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3204
    
    5
Seems the error is WAS7 specific. I was able to fix this error by generating application.xml DD for the EAR. It could be done via context menu: Java EE > Generate Deployment Descriptor Stub.

HTH,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB3.0 not working in Websphere 7