Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

EJB3.0 not working in Websphere 7

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also I got the exception:

 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 3716
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
That new kid is a freak. Show him this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic