1 Reply Latest reply on Nov 23, 2007 4:00 AM by Peter Jervgren

    Directory deployment problem (glassfish & netbeans)

    Mirko Adari Novice

      My environment:
      Glassfish V2
      Netbeans 6 RC 1
      JBoss 2.0.0.GA

      When I try to Deploy my EAR application inside netbeans it throws exception:

      Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Invalid ejb jar [jboss-seam.jar]: it contains zero ejb.
      Note:
      1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
      2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
      3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven), please check server.log to see whether the annotations were processed properly.
      com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [soov] -- Invalid ejb jar [jboss-seam.jar]: it contains zero ejb.
      Note:
      1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
      2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
      3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven), please check server.log to see whether the annotations were processed properly.
       at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:390)
       at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:358)
       at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:226)
       at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
       at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
       at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
       at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
       at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
       at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
       at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
       at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
      Caused by: java.lang.IllegalArgumentException: Invalid ejb jar [jboss-seam.jar]: it contains zero ejb.
      Note:
      1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message driven bean.
      2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
      3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven), please check server.log to see whether the annotations were processed properly.
       at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:95)
       at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:82)
       at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:729)
       at com.sun.enterprise.deployment.Application.visit(Application.java:1754)
       at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:470)
       at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:790)
       at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:744)
       at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:349)
       ... 10 more
      


      I found that it has raised before but didnt find any solutions.
      It`s pretty urgent because we cant do anything with it right now...

        • 1. Re: Directory deployment problem (glassfish & netbeans)
          Peter Jervgren Newbie

          I stumbled into the same problem.

          The following did the trick (at least in my environment):

          In NetBeans IDE 6.0 RC 1:
          1. select top-level menu "Tools" -> "Servers"
          2. select the "Glassfish" server and the "Options" tab
          3. uncheck the "Directory Deployment Enabled" option

          The "Help Information" for this option says:

          "Directory Deployment Enabled. When selected, web, EJB and EAR projects are deployed to the server from the build directory. This can reduce deployment time. This option is selected by default."

          It seams that Glassfish somehow get's confused with jboss-seam.jar if loaded from the build directory. I didn't go deeper down into invenstigation - just accepting that the "unchecked option" and normal deployment through the "ear-file" works fine.

          / Regards Peter Jervgren