Home > JBoss, Seam, WAS, WebLogic > No EJBs found in the ejb-jar file ‘MyApplication.jar’. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation

No EJBs found in the ejb-jar file ‘MyApplication.jar’. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation

Another migration error. In my application.xml I have defined an <ejb> module but my ejb project only contains EJB 3.0 @Entity annotated beans. WebLogic (10.3) doesn’t like this and expects a @Stateless, @Stateful or @MessageDriven annotated bean. It doesn’t find any and throws a

No EJBs found in the ejb-jar file ‘MyApplication.jar’. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation

exception. The exact same jar file works fine on JBoss and WebSphere though. Not sure which one is right but I had to add a dummy @Stateless EJB in the jar file order to make it work.

Advertisements
Categories: JBoss, Seam, WAS, WebLogic Tags: , , , ,
  1. Felix
    12 August 2011 at 11:25 pm

    Panos,

    I have a very similiar issue when migrate from old Oracle Application Server to OAS 11g (weblogic).

    I added the following lines to the ejb-jar.xml, but failed in execution since the class not available.

    This is a dummy session added to make it work in weblogic

    dummy
    dummy
    rfs.ejb.dummy
    Stateless

    How do you add the dummy @stateless EJB in the jar file?

    Thank you.

  2. Felix
    15 August 2011 at 1:14 pm

    Panos,

    Sorry, due to the cut-and-past problem the tags were not copied.
    I re-sent the ejb-jar.xml:

    MyApplication (EJB module)

    EJB module that contains one Container Managed Entity Bean,
    namely the Groups bean

    This is a dummy session added to make it work in weblogic

    dummy
    dummy
    rfs.ejb.dummy
    Stateless

    Users
    users

  3. 22 August 2011 at 6:32 pm

    Felix maybe I was not clear. When I said you need to add a dummy @Stateless EJB I meant that you need to create an EJB that does nothing, declare it as stateless and add it to the jar file you’re deploying. Then the error should go away. Hope this makes the things clearer.

    • Hari
      28 April 2013 at 3:07 pm

      Remove the reference of the ejb project in application.xml and delete ejb-jar.xml and weblogic-ejb-jar.xml

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: