Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1301

JAR Deployment on managed GlassFish throws NullPonterException

XMLWordPrintable

    • Workaround Exists
    • Hide

      The workaround is to change the deployment archive type from JavaArchive to WebArchive. So this works:

      @Deployment(testable = false)
      public static Archive<?> createDeployment()

      { WebArchive archive = ShrinkWrap.create(WebArchive.class, "foo.war"); archive.addClasses(UserInfoBean.class, UserInfo.class); return archive; }
      Show
      The workaround is to change the deployment archive type from JavaArchive to WebArchive. So this works: @Deployment(testable = false) public static Archive<?> createDeployment() { WebArchive archive = ShrinkWrap.create(WebArchive.class, "foo.war"); archive.addClasses(UserInfoBean.class, UserInfo.class); return archive; }

      Deployment of an EJB JAR failes with a NullPointerException in org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.doDeploy.

      The issue can be reproduced by a deployment like this:

      @Deployment(testable = false)
      public static Archive<?> createDeployment()

      { JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "foo.jar"); archive.addClasses(UserInfoBean.class, UserInfo.class); return archive; }

      The classes UserInfoBean and UserInfo define a simple stateless bean, but that is not important here: The NullPointerException is thrown regardless of the actual contents of the deployed jar file.

      Obviously subComponents is assigned null in doDeploy (line 219):

      Map<String, String> subComponents = (Map<String, String>) subComponentsResponce.get("properties");

              Unassigned Unassigned
              dirkweil Dirk Weil (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: