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

Initialization of the extension for remote Glassfish fails when the remote domain configuration does not match the expected configuration

    XMLWordPrintable

Details

    • Hide

      1. Create a new listener in Glassfish using the Glassfish Administration Console or the "asadmin create-http-listener" command.
      2. Delete one of the existing http or https listeners named "http-listener-1" or "http-listener-2". Use the "asadmin delete-http-listener" command or the Admin Console.
      3. Use the modified Glassfish domain for testing.

      Show
      1. Create a new listener in Glassfish using the Glassfish Administration Console or the "asadmin create-http-listener" command. 2. Delete one of the existing http or https listeners named "http-listener-1" or "http-listener-2". Use the "asadmin delete-http-listener" command or the Admin Console. 3. Use the modified Glassfish domain for testing.
    • Workaround Exists
    • Hide

      For Arquillian managed deployments, use a Glassfish domain with default names for resources.

      Show
      For Arquillian managed deployments, use a Glassfish domain with default names for resources.

    Description

      As explained in the title, the initialization of Arquillian fails on remote Glassfish when the domain configuration is not as expected by Arquillian. The following exception was reported when running the unit tests of glassfish-remote-3.1 against a custom configured domain:

      -------------------------------------------------------------------------------
      Test set: org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployWarTest
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 221.294 sec <<< FAILURE!
      org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployWarTest  Time elapsed: 0 sec  <<< ERROR!
      java.lang.NumberFormatException: null
      	at java.lang.Integer.parseInt(Integer.java:417)
      	at java.lang.Integer.parseInt(Integer.java:499)
      	at org.jboss.arquillian.container.glassfish.remote_3_1.clientutils.GlassFishClientService.getAdminServerHttpPort(GlassFishClientService.java:408)
      	at org.jboss.arquillian.container.glassfish.remote_3_1.clientutils.GlassFishClientService$AdminServer.getNodeAddressList(GlassFishClientService.java:549)
      	at org.jboss.arquillian.container.glassfish.remote_3_1.clientutils.GlassFishClientService.startUp(GlassFishClientService.java:136)
      	at org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployableContainer.start(GlassFishRestDeployableContainer.java:81)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:144)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$5.perform(ContainerLifecycleController.java:134)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:182)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:133)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      	at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:83)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:76)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:175)
      	at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainers(ContainerLifecycleController.java:75)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:83)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
      	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:76)
      	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
      	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
      	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
      	at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
      	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
      

      The following listeners were configured in the Glassfish domain.xml file:

      ...
            <http-service>
              <access-log></access-log>
              <virtual-server id="server" network-listeners="http-listener,https-listener"></virtual-server>
              <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
            </http-service>
      ...
      

      The test succeeded when the name of the listeners were modified from "http-listener-1" and "http-listener-2" to "http-listener" and "https-listener" in GlassFishClientService.getAdminServerHttpPort(...). But this is not desirable, although the names of http-listener-1,http-listener-2 etc. could be useful defaults.

      The same might also be true of the DAS (Default Admin Server) name used by the extension (currently set to "server"). The Domain File Format reference for the server element in domain.xml states that

      The admin-service subelement of the config element referenced by a server's config-ref attribute determines whether the server is the DAS.

      which might be true of the REST API as well.

      Arquillian must either:
      1. query Glassfish for the names of the resources before issuing requests using the REST AOU, and choose values from the responses, or
      2. must allow these values to be specified in arquillian.xml.

      Attachments

        Activity

          People

            vineet.reynolds_jira Vineet Reynolds (Inactive)
            vineet.reynolds_jira Vineet Reynolds (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: