3 Replies Latest reply on Jun 21, 2013 8:08 AM by Bartosz Majsak

    Issue: Adding dozer results in java.lang.IllegalArgumentException: ArquillianServletRunner not found.

    Kristian Frølund Jørgensen Newbie

      Hi!

       

      I am having an issue, I have a project where I need to map some data. For data mapping I am using Dozer.

       

      When I add Dozer as a dependency, my tests fail.

       

      -------------------------------------------------------------------------------

      Test set: net.froelund.reporting.service.BatchServiceTest

      -------------------------------------------------------------------------------

      Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 9.577 sec <<< FAILURE!

      createBatchWithDeals(net.froelund.reporting.service.BatchServiceTest)  Time elapsed: 0.015 sec  <<< ERROR!

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

                at org.jboss.arquillian.protocol.servlet.ServletURIHandler.locateTestServlet(ServletURIHandler.java:60)

                at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:84)

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

                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: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.execution.ClientTestExecuter.execute(ClientTestExecuter.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: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.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)

                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)

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

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

                at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

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

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

                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.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:94)

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

                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.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.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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)

                at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)

                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)

                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

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

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

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

                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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)

                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)

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

                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)

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

      createBatch(net.froelund.reporting.service.BatchServiceTest)  Time elapsed: 0 sec  <<< ERROR!

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

                at org.jboss.arquillian.protocol.servlet.ServletURIHandler.locateTestServlet(ServletURIHandler.java:60)

                at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:84)

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

                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: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.execution.ClientTestExecuter.execute(ClientTestExecuter.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: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.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)

                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)

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

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

                at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

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

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

                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.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:94)

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

                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.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.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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)

                at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)

                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)

                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)

                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)

                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)

                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)

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

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

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

                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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)

                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)

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

                at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)

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

       

       

      
      @Deployment
      
      
      public static JavaArchive setUpClass() throws Exception {
      
      
      
      
      return ShrinkWrap
      
      
      
      
      
      
      
      
      .create(JavaArchive.class, "batchService.jar")
      
      
      
      
      
      
      
      
      .addClass(BatchService.class)
      
      
      
      
      
      
      
      
      .addClass(DealService.class)
      
      
      
      
      
      
      
      
      .addPackage(Batch.class.getPackage())
      
      
      
      
      
      
      
      
      .addAsResource("test-persistence.xml",
      
      
      
      
      
      
      
      
      
      
      
      
      "META-INF/persistence.xml")
      
      
      
      
      
      
      
      
      .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
      
      
      }
      
      
      

      As you can see, I am using Shrinkwrap.

       

      Any ideas?

       

      - Froelund

        • 1. Re: Issue: Adding dozer results in java.lang.IllegalArgumentException: ArquillianServletRunner not found.
          Bartosz Majsak Master

          Can you share more details about your environment? In particular

          * Container

          * Versions (pom.xml will be enough)

           

          What do you mean by "adding dozer"? As I can see it in Shrinkwrap deployment method I assume it's simply adding it as new dependency to the project? Are you using embedded container? Maybe there are some classpath conflicts which you don't see in the test error, but can be found in container bootstrap logs?

          • 2. Re: Issue: Adding dozer results in java.lang.IllegalArgumentException: ArquillianServletRunner not found.
            Kristian Frølund Jørgensen Newbie

            Thanks for the respons!

             

            Yes, I am simply adding the dependency to the pom xml

             

            These dependences are from a parent pom

             


            <properties>


            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>


            <javax.javaee-api.version>6.0</javax.javaee-api.version>


            <junit.junit.version>4.11</junit.junit.version>


            <org.jboss.arquillian.container.arquillian-glassfish-embedded-3.1.version>1.0.0.CR4</org.jboss.arquillian.container.arquillian-glassfish-embedded-3.1.version>


            <org.glassfish.extras.glassfish-embedded-all.version>3.2-b06</org.glassfish.extras.glassfish-embedded-all.version>


            <org.jboss.arquillian.junit.arquillian-junit-container.version>1.0.4.Final</org.jboss.arquillian.junit.arquillian-junit-container.version>

            </properties>

            <dependencies>


            <dependency>



            <groupId>junit</groupId>



            <artifactId>junit</artifactId>



            <version>${junit.junit.version}</version>


            </dependency>


            <dependency>



            <groupId>org.jboss.arquillian.container</groupId>



            <artifactId>arquillian-glassfish-embedded-3.1</artifactId>



            <version>${org.jboss.arquillian.container.arquillian-glassfish-embedded-3.1.version}</version>


            </dependency>


            <dependency>



            <groupId>org.glassfish.extras</groupId>



            <artifactId>glassfish-embedded-all</artifactId>



            <version>${org.glassfish.extras.glassfish-embedded-all.version}</version>


            </dependency>


            <dependency>



            <groupId>org.jboss.arquillian.junit</groupId>



            <artifactId>arquillian-junit-container</artifactId>



            <version>${org.jboss.arquillian.junit.arquillian-junit-container.version}</version>



            <scope>test</scope>


            </dependency>


            <dependency>



            <groupId>javax</groupId>



            <artifactId>javaee-api</artifactId>



            <version>${javax.javaee-api.version}</version>



            <scope>provided</scope>


            </dependency>

            </dependencies>

             

             

            And these are in the project that has the errors:

             


            <dependencies>


            <dependency>



            <groupId>net.sf.dozer</groupId>



            <artifactId>dozer</artifactId>



            <version>5.4.0</version>



            <scope>test</scope>


            </dependency>

            </dependencies>

             

            I am not even using dozer anywhere in the code, I just added the dependency.

            • 3. Re: Issue: Adding dozer results in java.lang.IllegalArgumentException: ArquillianServletRunner not found.
              Bartosz Majsak Master

              This is because of "embedded" mode. It's all the same classpath and most likely this is causing the problem. I would suggest to try Glassfish managed or remote to have proper classloaders isolation. From my experience gf embedded gives you only a headache without any real benefit.