glassfish
  1. glassfish
  2. GLASSFISH-20865

Deployment error, it seams there are 2 EJB implementing the same business interface

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0_b89_RC5
    • Fix Version/s: None
    • Component/s: deployment
    • Labels:
      None

      Description

      I created an enterprise app with an ejb module, client app and web module.
      Besides I put all interfaces in a common module that all other module depends on.
      Then the app is very simple but GF have still problems ...

      My ejb ( in ejb module ):

      @Local(HBServiceLocal.class)
      @Stateless
      public class HBTestBean implements HBServiceLocal {

      @Override
      public String echo(final String parameter)

      { return "Echo "+parameter; }

      // Add business logic below. (Right-click in editor and choose
      // "Insert Code > Add Business Method")

      }

      The interface ( in common module) :

      public interface HBServiceLocal extends HBService{

      String echo(final String parameter);

      }

      And the error message :
      Avvertenza: AS-DEPLOYMENT-00001
      Grave: Eccezione durante la distribuzione dell'applicazione [HomeBankNB]
      Grave: Exception during lifecycle processing
      java.lang.IllegalArgumentException: Impossibile risolvere il riferimento [Remote ejb-ref name=homebankappclient.Main/bean,Remote 3.x interface =org.savino.hb.common.business.service.HBServiceLocal,ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session] perché sono presenti [2] EJB nell'applicazione con l'interfaccia org.savino.hb.common.business.service.HBServiceLocal.
      Di seguito sono riportate alcune delle cause possibili.
      1. The EJB bean class has been included in the package of a library LIB EAR (or by another library mechanism that makes the library visible to all modules of the components). Therefore all the modules of the components indirectly include this bean class.
      2. The EJB bean class has been included in the package of a component module that refers EJB, directly or indirectly through the manifest file, WEB-INF/lib.
      The EJB bean class must be included only in a package the EJB module declaration and not in the forms of reference. The reference modules must only include EJB interfaces.
      at com.sun.enterprise.deployment.util.ComponentValidator.accept(ComponentValidator.java:356)
      at com.sun.enterprise.deployment.util.DefaultDOLVisitor.accept(DefaultDOLVisitor.java:78)
      at com.sun.enterprise.deployment.util.ComponentValidator.accept(ComponentValidator.java:123)
      at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:147)
      at com.sun.enterprise.deployment.util.AppClientValidator.accept(AppClientValidator.java:67)
      at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:621)
      at com.sun.enterprise.deployment.ApplicationClientDescriptor.visit(ApplicationClientDescriptor.java:623)
      at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:135)
      at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:621)
      at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:703)
      at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:248)
      at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:232)
      at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:188)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:878)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:818)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:374)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
      at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
      at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:724)

        Activity

        Hide
        Jeremy_Lv added a comment -

        Hi, kronos72it:

        Could you please upload your reproduced application to somewhere so that I can download it and reproduced this phenomenon on my local platform?

        Anyway, I think the error won't be thrown out if you moved the interface HBServiceLocal to the EJB module instead of common module.

        thanks

        Show
        Jeremy_Lv added a comment - Hi, kronos72it: Could you please upload your reproduced application to somewhere so that I can download it and reproduced this phenomenon on my local platform? Anyway, I think the error won't be thrown out if you moved the interface HBServiceLocal to the EJB module instead of common module. thanks
        Hide
        kronos72it added a comment -

        Hi Jeremy , I re generate my Aplication and now it seams work with both 2 interface, I am testing my application and will give you a feedback.
        Anyway a I'd like to have both interface in my shared library as I can share the interfaces with all projects and publish them to the world...

        Show
        kronos72it added a comment - Hi Jeremy , I re generate my Aplication and now it seams work with both 2 interface, I am testing my application and will give you a feedback. Anyway a I'd like to have both interface in my shared library as I can share the interfaces with all projects and publish them to the world...

          People

          • Assignee:
            Hong Zhang
            Reporter:
            kronos72it
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: