3 Replies Latest reply on Mar 20, 2017 11:24 AM by Gregor Resing

    Arquillian with managed glassfish works under windows crashes under linux

    Benny Weber Newbie

      Hi,

       

      I have a working setup with:

       

      Java EE7

      Glassfish4

      Arquillian - managed glassfish

       

      in @deployment I do:

       

      File[] files = Maven.resolver().loadPomFromFile("pom.xml")

                      .importRuntimeDependencies().resolve().withTransitivity().asFile();

       

          WebArchive result = ShrinkWrap.create(WebArchive.class, "test.war")

                  .addAsLibraries(files)

                  .addClasses(ClassA.class, ClassB.class,....)

                  .addAsResource(new File("src/test/resources/persistence-test.xml"),

                                          "META-INF/persistence.xml")

                  .addAsWebInfResource(EmptyAsset.INSTANCE,

                                          ArchivePaths.create("beans.xml"));

       

       

      On my windows machine I can do:

       

      mvn test

       

      and the tests are working.

       

      Under linux (ubuntu) I get this:

       

      Okt 31, 2013 4:01:44 PM org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientUtil getResponseMap

      SEVERE:  [status: REDIRECTION reason: Found]

       

      This is my stackstrace:

       

      com.sun.jersey.api.container.ContainerException:  [status: REDIRECTION reason: Found]

              at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientUtil.getResponseMap(GlassFishClientUtil.java:192)

              at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientUtil.GETRequest(GlassFishClientUtil.java:109)

              at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.isDASRunning(GlassFishClientService.java:300)

              at org.jboss.arquillian.container.glassfish.CommonGlassFishManager.isDASRunning(CommonGlassFishManager.java:131)

              at org.jboss.arquillian.container.glassfish.managed_3_1.GlassFishManagedDeployableContainer.start(GlassFishManagedDeployableContainer.java:57)

              at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

              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:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)

              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)

              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221)

              at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

              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:135)

              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

              at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)

              at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)

       

       

      Cannot find any help with google .

       

      Do you have any idea?

        • 1. Re: Arquillian with managed glassfish works under windows crashes under linux
          Benny Weber Newbie

          Found sth. out:

           

          On my linux machine I had at glassfish


          enable-secure-admin


          if I set


          disable-secure-admin


          it is working...


          But would be great if this would also work with enabled secure admin, because the linux machine is a remote machine...

          • 2. Re: Arquillian with managed glassfish works under windows crashes under linux
            Stephan ivanov Newbie

            Unfortunately I have the same problem.
            I've already tried everything I've found.
            Local works with no problems, remoute always:

             

            com.sun.jersey.api.container.ContainerException:  [status: REDIRECTION reason: Found] 
            at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientUtil.getResponseMap(GlassFishClientUtil.java:177)
            at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientUtil.GETRequest(GlassFishClientUtil.java:101)
            at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientUtil.getChildResources(GlassFishClientUtil.java:88)
            at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.getServersList(GlassFishClientService.java:314)
            at org.jboss.arquillian.container.glassfish.clientutils.GlassFishClientService.startUp(GlassFishClientService.java:100)
            at org.jboss.arquillian.container.glassfish.CommonGlassFishManager.start(CommonGlassFishManager.java:64)
            at org.jboss.arquillian.container.glassfish.remote_3_1.GlassFishRestDeployableContainer.start(GlassFishRestDeployableContainer.java:58)
            at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199)
            .
            .
            .
            .

             

             

            I have tested with i Glassfish.4 and Payara Server 164 Full

            Has anyone solved this problem.

             

            • 3. Re: Arquillian with managed glassfish works under windows crashes under linux
              Gregor Resing Newbie

              I have the same problem. Tested with Glassfish 4.1.1 and Payara 171. I use glassfish-remote profile for running the Arquillian tests. The test works if I disable secure-admin, but fails if secure-admin is enabled. I need to turn on secure-admin for remote deployment (want to run payara in docker). From what I read somewhere is that it might be related to nucleus-grizzly-all.jar. See: java - Arquillian integration tests fail on Glassfish 4.1 container with secure admin (HTTPS) enabled - Stack Overflow  I replaced the jar, but it has no effect.