Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4610

Interface not found when deploying an EJB of class A that extends B and B implements an Interface

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.1.Final
    • EJB
    • None
    • Hide

      1. create an interface (POJO):

      MyInterface.java
      // ...
      // POJO 
      public interface MyInterface {
      // ...
      

      2. create implementation for interface (POJO too)

      Client.java
      // ...
      // no EJB annotations in this class, in our case thats POJO
      public class Client
      		implements
      			MyInterface {
      // ...
      

      3. subclass POJO implementation:

      EJBClient.java
      // ...
      @javax.ejb.Stateless
      @javax.ejb.Local
      public class EJBClient extends SEITestServiceClient 
      // EJB does deploy on JBoss 7.1.1.Final if you uncomment the following line
      //implements MyInterface 
      {
      // ...
      

      4. deploy and see error
      5. uncomment given line in subclass
      6. deploy and it works

      Show
      1. create an interface (POJO): MyInterface.java // ... // POJO public interface MyInterface { // ... 2. create implementation for interface (POJO too) Client.java // ... // no EJB annotations in this class, in our case thats POJO public class Client implements MyInterface { // ... 3. subclass POJO implementation: EJBClient.java // ... @javax.ejb.Stateless @javax.ejb.Local public class EJBClient extends SEITestServiceClient // EJB does deploy on JBoss 7.1.1.Final if you uncomment the following line // implements MyInterface { // ... 4. deploy and see error 5. uncomment given line in subclass 6. deploy and it works
    • Hide

      Declare implemented interfaces in subclass.

      Show
      Declare implemented interfaces in subclass.

    Description

      The class hierarchy is as follows:
      -class EJBClient extends class Client (POJO)
      -class Client implements interface MyInterface (POJO)

      When deploying EJB 'EJBClient', JBoss does not resolve indirectly implemented interface by an EJB via a superclass. This did work in JBoss5. When deploying such an EJB you get the error message

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Bean class org.foo.EJBClient specifies @Local annotation, but does not implement 1 interface
      

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            polemoser Christoph Gutmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: