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

Arquillian Servlet's context root should be "test", not "test.war", in EAR

    XMLWordPrintable

Details

    • Hide

      Add dependency
      <groupId>org.jboss.arquillian.protocol</groupId>
      <artifactId>arquillian-protocol-servlet</artifactId>
      <version>1.0.0.CR5</version>

      and add to arquillian.xml

      <defaultProtocol type="Servlet 3.0" />

      Show
      Add dependency <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <version>1.0.0.CR5</version> and add to arquillian.xml <defaultProtocol type="Servlet 3.0" />

    Description

      As the Arquillian JMX protocol doesn't currently work for EARs in AS7 (AS7-1696), I tried using the Servlet 3.0 protocol. However the test runner fails to contact the servlet:

      java.lang.IllegalStateException: Error launching request at http://127.0.0.1:8080/test/ArquillianServletRunner?outputMode=serializedObject&className=com.example.ExampleITCase&methodName=testMethod. No result returned
      at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:158)
      at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:118)
      ... 75 more

      The servlet is actually deployed at:

      http://127.0.0.1:8080/test.war/ArquillianServletRunner

      Because Arquillian has added the following to my EAR's application.xml:
      <module>
      <web>
      <web-uri>test.war</web-uri>
      <context-root>test.war</context-root>
      </web>
      </module>

      This can be traced to org.jboss.arquillian.protocol.servlet.v_3.ServletProtocolDeploymentPackager:

      applicationXml.webModule(wrappedWar.getName(), wrappedWar.getName());

      Attachments

        Issue Links

          Activity

            People

              aslak@redhat.com Aslak Knutsen
              agattik Alexandre Gattiker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: