0 Replies Latest reply on Mar 31, 2012 4:31 PM by christopherp

    Arquillian works with Maven, but Intellij IDEA gives error: "ArquillianServletRunner not found"

    christopherp Newbie

      I'm getting a little frustrated here and I was hoping someone could point out what I'm missing. i think it has something to do with IDEA's class path or something, because Arquillian is running fine using Maven. I have set up arquillian according to the guides, I'm using the arquillian-bom version 1.0.0.CR7, embedded glassfish 1.0.0.CR3, embedded glassfish 3.1.2 (but same thing happens with 3.1.1). My pom.xml is here:

       

      http://pastebin.com/Z3YCTcWq

       

      Everything runs well with Maven 3, using "mvn verify" or "mvn integration-test" (I'm using failsafe)

       

      Here is the Shrinkwrap descriptor, adapted from one of the Arquillian guides:

      @Deployment
         public static Archive<?> createDeployment() throws Exception {
            MavenDependencyResolver resolver = DependencyResolvers.use(MavenDependencyResolver.class).loadMetadataFromPom("pom.xml");
      
            return ShrinkWrap.create(WebArchive.class, "experiment-server.war")
                    .addPackages(true, "org.cpoile.domain", "org.cpoile.simulation", "org.cpoile.facade")
                    .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
                    .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
                    .addAsLibraries(resolver.artifact("org.easytesting:fest-assert").resolveAsFiles())
                    .addAsLibraries(resolver.artifact("com.google.guava:guava").resolveAsFiles());
         }
      
      

       

      But when I run the integration tests with Intellij IDEA's built in test runner I almost always get the following 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: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)

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

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

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

                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.execution.ClientTestExecuter.execute(ClientTestExecuter.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 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.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:57)

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

                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.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)

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

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

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

                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.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)

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

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

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

                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.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)

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

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

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

                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.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:263)

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

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

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

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

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

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

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

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

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

                at org.junit.runners.Suite.runChild(Suite.java:128)

                at org.junit.runners.Suite.runChild(Suite.java:24)

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

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

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

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

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

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

                at org.junit.runner.JUnitCore.run(JUnitCore.java:157)

                at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)

                at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182)

                at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)

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

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

                at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

       

       

      I would love any pointers on how to solve this. Thanks!