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

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 7.1.1.Final
    • Fix Version/s: None
    • Component/s: EJB
    • Labels:
      None
    • Steps to Reproduce:
      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
    • Workaround Description:
      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

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

              Dates

              Created:
              Updated:
              Resolved: