3 Replies Latest reply on Mar 21, 2011 3:49 PM by Aslak Knutsen

    Embedded GF3.1 + Alpha5: Problems with sun-resources.xml?

    Dennis Sidharta Newbie

      All:

       

      I attempted to upgrade to embedded GF3.1 and Arquillian Alpha5 today, but kept getting a resource lookup failure. I'm suspecting that it has something to do with sun-resources.xml not being handled properly, but am not sure. Would you share your thoughts as to what I missed? This worked fine with GF3.0.1 and  Arquillian Alpha4.

       

      I've attached a simple project on how to replicate this. To run, execute "mvn clean test -Pglassfish-embedded". If you'd like to see how it worked in GF3.0.1 + Alpha4, do the following:

       

      1. in pom.xml: remove "version.arquillian", "version.glassfish", and "arquillian.container", and uncomment the block of properties marked with triple x's.

      2. in UserTest.java: replace the addManifestResource call with the line marked with triple x's.

      3. rename arquillian.xml to something else, and rename old_arquillian.xml to arquillian.xml

       

      Thanks!

       

       

      Dennis

       

      PS. A somewhat related issue can be found here: http://community.jboss.org/thread/163345

        • 1. Embedded GF3.1 + Alpha5: Problems with sun-resources.xml?
          Aslak Knutsen Master

          Seems that I missed the support for sunResourceXML in the upgrade to the 3.1 APIs.

           

          https://issues.jboss.org/browse/ARQ-397

           

          You can use the configurationXML option as a workaround and define your full domain.xml

          • 2. Re: Embedded GF3.1 + Alpha5: Problems with sun-resources.xml?
            Dennis Sidharta Newbie

            There seems to be a problem with configurationXML property as well. No matter what value I set for it, absolute or not, I kept getting this exception:

             

            INFO: Could not read active container configuration: null

            java.lang.IllegalArgumentException: URI is not absolute

                      at java.net.URI.toURL(URI.java:1080)

                      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.createTempInstanceRoot(StaticGlassFishRuntime.java:220)

                      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.setEnv(StaticGlassFishRuntime.java:164)

                      at com.sun.enterprise.glassfish.bootstrap.StaticGlassFishRuntime.newGlassFish(StaticGlassFishRuntime.java:100)

                      at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.setup(GlassFishContainer.java:115)

                      at org.jboss.arquillian.container.glassfish.embedded_3_1.GlassFishContainer.setup(GlassFishContainer.java:51)

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$4.perform(ContainerLifecycleController.java:126)

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$4.perform(ContainerLifecycleController.java:106)

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

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.setupContainer(ContainerLifecycleController.java:105)

                      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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

                      at org.jboss.arquillian.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:78)

                      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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

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

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

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:68)

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:61)

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:176)

                      at org.jboss.arquillian.impl.client.container.ContainerLifecycleController.setupContainers(ContainerLifecycleController.java:60)

                      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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

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

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

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

                      at org.jboss.arquillian.impl.client.ContainerEventController.execute(ContainerEventController.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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

                      at org.jboss.arquillian.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.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

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

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

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

                      at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:58)

                      at org.jboss.arquillian.junit.Arquillian.<init>(Arquillian.java:86)

                      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                      at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)

                      at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)

                      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)

                      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)

                      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)

                      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:33)

                      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)

                      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)

                      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.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)

                      at $Proxy0.invoke(Unknown Source)

                      at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)

                      at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)

                      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)

             

            With Alpha4, using the "domainXml" property, it works (although I get a different exception because of the contents of my domain.xml, but that's a different problem).

             

            Might be a mistake on my part, I'll try to look into this again sometime soon.

             

            Thanks,

             

             

            Dennis Sidharta

            • 3. Re: Embedded GF3.1 + Alpha5: Problems with sun-resources.xml?
              Aslak Knutsen Master

              Seems like it wants a full absolute URI. file:///home/bla/bla/my-domain.xml works.

               

              https://issues.jboss.org/browse/ARQ-398