glassfish
  1. glassfish
  2. GLASSFISH-19629

Unable to deploy EAR archive in embedded mode with latest glassfish-embedded-all.jar

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_dev
    • Component/s: embedded
    • Labels:
      None

      Description

      When trying to deploy a EAR file in embedded mode with the latest embedded uber jar i..e, glassfish-embedded-all-4.0-SNAPSHOT.jar, it fails with the following error:

      Feb 03, 2013 4:36:23 AM ContainerStarter startContainer
      INFO: Snifer org.glassfish.javaee.full.deployment.EarSniffer@188b9 set up following modules: []
      Feb 03, 2013 4:36:23 AM org.glassfish.api.ActionReport failure
      SEVERE: Exception while deploying the app [sear]
      Feb 03, 2013 4:36:23 AM com.sun.enterprise.v3.server.ApplicationLifecycle deploy
      SEVERE: Exception during lifecycle processing
      java.lang.IllegalArgumentException: type cannot be null
      	at com.sun.enterprise.deployment.Application.getModuleDescriptorsByType(Application.java:1033)
      	at com.sun.enterprise.deployment.archivist.ApplicationArchivist.sortModules(ApplicationArchivist.java:648)
      	at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:540)
      	at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:229)
      	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:879)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:819)
      	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)
      

        Issue Links

          Activity

          Hide
          Bhavanishankar added a comment -

          This is because of change in implementation of ApplicationArchivist.java in GlassFish 4.0

          In 4.0, DOLUtils.carType() is used to obtain the CAR module type instead of how it was done in 3.x version where XModuleType.CAR was used.

          In 3.x, XModuleType.CAR was just an enum/constant value. However, in 4.0, the DOLUtils.carType() computes the CAR module type by doing:

          
          serviceLocator.getService(ArchiveType.class, "car");
          
          

          The above code returns a non null module type value only if the application server distribution contains the container that could handle the CAR modules.

          But glassfish-embedded-all.jar does not bundle the appclient container so the above code return NULL. Hence the EAR application fails.

          Show
          Bhavanishankar added a comment - This is because of change in implementation of ApplicationArchivist.java in GlassFish 4.0 In 4.0, DOLUtils.carType() is used to obtain the CAR module type instead of how it was done in 3.x version where XModuleType.CAR was used. In 3.x, XModuleType.CAR was just an enum/constant value. However, in 4.0, the DOLUtils.carType() computes the CAR module type by doing: serviceLocator.getService(ArchiveType.class, "car" ); The above code returns a non null module type value only if the application server distribution contains the container that could handle the CAR modules. But glassfish-embedded-all.jar does not bundle the appclient container so the above code return NULL. Hence the EAR application fails.
          Hide
          Bhavanishankar added a comment -

          This issue can be reproduced by running appserver/tests/embedded/scatteredarchive test.

          Show
          Bhavanishankar added a comment - This issue can be reproduced by running appserver/tests/embedded/scatteredarchive test.
          Hide
          Bhavanishankar added a comment -

          Fixed with check-in rev 59069.

          Show
          Bhavanishankar added a comment - Fixed with check-in rev 59069.

            People

            • Assignee:
              Bhavanishankar
              Reporter:
              Bhavanishankar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: