11 Replies Latest reply on Aug 23, 2011 1:12 PM by aslak

    Testing on JBoss AS 4.2

    htfv

      Hello World!

       

      I'm trying to run Arquillian test in JBoss AS 4.2.3.GA (managed). The server starts and package is deployed, however I receive the following exception from Arquillian:

       

      java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.

          at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI(ServletUtil.java:68)

          at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:58)

          at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:32)

          at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.getContainerMethodExecutor(RemoteTestExecuter.java:136)

          at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:119)

       

      (Full stack trace here: http://pastebin.com/c5wejQQv)

       

      What am I doing wrong? Is there a solution or workaround for this problem?

       

      I'm using Arquillian 1.0.0.CR1, ShrinkWrap 1.0.0-beta-2.

        • 1. Re: Testing on JBoss AS 4.2
          aslak

          Could you provide a example @Deployment that does not work ?

          • 2. Re: Testing on JBoss AS 4.2
            htfv

            Here you are:

             

            @Deployment

            public static WebArchive createDeployment()

            {

                return WebArchive archive = ShrinkWrap.create(WebArchive.class)

                        .addClasses(

                                PersistenceIntegrationTestImpl.class,

                                TestEntityManagerProducer.class)

                        .addPackages(true,

                                "com.brandmaker.persistence.dao",

                                "com.brandmaker.persistence.entities",

                                "com.brandmaker.persistence.utils")

                        .addAsResource("test-persistence.xml", "META-INF/persistence.xml")

                        .addAsWebInfResource("test-beans.xml", "beans.xml")

                        .addAsWebInfResource("test-web.xml",   "web.xml");

                        .addAsLibraries(DependencyResolvers

                                .use(MavenDependencyResolver.class)

                                .loadDependenciesFromPom("src/test/resources/dependencies.xml")

                                .resolveAsFiles())

                        .addAsLibraries(DependencyResolvers

                                .use(MavenDependencyResolver.class)

                                .loadDependenciesFromPom("src/test/resources-jbossas-4/dependencies.xml")

                                .resolveAsFiles());

            }

             

            dependencies.xml files contain Seam Persistence 3.0.1-SNAPSHOT and Weld 1.1.1.Final.

             

            Or do you need the complete project?

            • 3. Re: Testing on JBoss AS 4.2
              htfv

              Here is a small test project which shows the problem. There are 2 profiles: arquillian-jbossas-managed-4 and arquillian-jbossas-managed-7. It works perfectly in JBoss AS 7 but not in JBoss AS 4.2. There are absolute paths in arquillian.xml files, you have to fix those.

              • 4. Re: Testing on JBoss AS 4.2
                aslak
                • 6. Re: Testing on JBoss AS 4.2
                  htfv

                  I checked it today, it works. Thanks for the fix.

                   

                  BTW, jbossas-remote-5 build fails with the following error:

                   

                  [ERROR] Failed to execute goal on project arquillian-jbossas-remote-5:  Could not resolve dependencies for project org.jboss.arquillian.container:arquillian-jbossas-remote-5:jar:1.0.0.Final-SNAPSHOT:  Failed to collect dependencies for [org.jboss.arquillian.core:arquillian-core-spi:jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.arquillian.container:arquillian-container-spi

                  :jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.arquillian.testenricher:arquillian-testenricher-ejb:jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.arquillian.testenricher:arquillian-testenricher-resource:jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext:jar:1.0.0.Final-SNAPSHOT (compile), org.jboss.jbossas:jboss-as-client:pom:5.0.1.GA (provided)]: Failed to read artifact descriptor for trove:trove:jar:2.1.1: Could not transfer artifact trove:trove:pom:2.1.1 from/to repository.jboss.org (http://repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/trove/trove/2.1.1/trove-2.1.1.pom -> [Help 1]

                   

                  Not nice ))

                  • 7. Re: Testing on JBoss AS 4.2
                    aslak

                    yea, engineering closed down that repo for external access.. i thought they had opened it again already.. hmm

                    • 8. Re: Testing on JBoss AS 4.2
                      htfv

                      Is it possible to release new versions of JBoss AS containers? The newest which I can find in repository is 1.0.0.CR1.

                      • 9. Re: Testing on JBoss AS 4.2
                        aslak

                        Is there anything specific you're looking for to be fixed?  Or just craving a new version number ?

                         

                        If you want to use it with a newer Arq Core v. use the Arquillian Core BOM and Mavens DependencyManagement:

                        https://gist.github.com/1154075

                         

                        This is the recommended setup going forward, that will upgrade all the deps the Container has on Core to the Core v. you have choosen, not the Core v. the Contianer was compiled/released against.

                        • 10. Re: Testing on JBoss AS 4.2
                          htfv

                          Yes, ARQ-534 and ARQ-535. I can build containers locally, but I don't want to deploy them in company Maven repository.

                          • 11. Re: Testing on JBoss AS 4.2
                            aslak

                            JBoss Containers released in 1.0.0.CR2