Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-242

Cannot run tests with jetty7 embedded profile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Alpha4
    • 1.0.0.Alpha3
    • Jetty Containers
    • None

      When trying to run a test where a simple servlet is deployed, I get the following exception:

      java.lang.IllegalStateException: Service org.jboss.arquillian.container.jetty.embedded_7.JettyEmbeddedConfiguration does not implement expected type org.jboss.arquillian.spi.ContainerConfiguration
      at org.jboss.arquillian.spi.util.ServiceLoader.reload(ServiceLoader.java:190)
      at org.jboss.arquillian.spi.util.ServiceLoader.getProviders(ServiceLoader.java:282)
      at org.jboss.arquillian.impl.DynamicServiceLoader.all(DynamicServiceLoader.java:39)
      at org.jboss.arquillian.impl.XmlConfigurationBuilder.build(XmlConfigurationBuilder.java:102)
      at org.jboss.arquillian.testng.Arquillian.arquillianBeforeSuite(Arquillian.java:56)
      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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:643)
      at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:446)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:162)
      at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:92)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
      at org.testng.SuiteRunner.run(SuiteRunner.java:193)
      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:910)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
      at org.testng.TestNG.run(TestNG.java:787)
      at org.jboss.arquillian.testng.TestNGTestRunner.execute(TestNGTestRunner.java:54)
      at org.jboss.arquillian.protocol.servlet_3.ServletTestRunner.doGet(ServletTestRunner.java:84)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:426)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
      at org.eclipse.jetty.server.Server.handle(Server.java:337)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:581)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1005)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:560)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:222)
      at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:417)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:474)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:437)
      at java.lang.Thread.run(Thread.java:637)

      The test is:

      public class SimpleTest extends Arquillian {
      @Deployment
      public static WebArchive createDeployment()

      { return ShrinkWrap.create(WebArchive.class, "simpletest.war") .addWebResource("WEB-INF/web.xml", ArchivePaths.create("web.xml")); }

      @Test
      public void shouldBeAbleToCallServlet() throws Exception

      { String body = new RichStream(new URL("http://localhost:8080/simpletest").openStream()).asString(); Assert.assertEquals( "Verify that the servlet was deployed and returns the expected result", "hello", body); }

      }

              aslak@redhat.com Aslak Knutsen
              adamw_jira Adam Warski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: