Question

I'm trying to migrate from JBoss AS 7.2.0 to Wildfly 8.0.0beta1.

My own project and all tests were running fine on 7.2.0. But on 8.0.0beta1, the project itself is running but the Arquillian tests currently throw me an IllegalArgumentException (ArquillianServletRunner not found) when running them on a remote Server:

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)
[...]

When creating a new Project with Eclipse using JBoss Central > Java EE EAR Projects (which nearly reflects my project structure), i get the same exception.

Perhaps it would be helpful to fix the error on this new, nearly blank and general project.

Perhaps the problem is a wrong version of the Arquillian Container etc.? But when changing it, i get other errors (e.g. NoClassDefinition HTTPHandshake...)

Was it helpful?

Solution

I was able to fix the problem some days ago. Here is the solution:

pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>test.net</groupId>
  <artifactId>ArqTest</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.junit>4.11</version.junit>
    <version.arquillian>1.1.1.Final</version.arquillian>
    <version.wildfly.as>8.0.0.Beta1</version.wildfly.as>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.protocol</groupId>
      <artifactId>arquillian-protocol-servlet</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-version</artifactId>
        <version>${version.wildfly.as}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian</groupId>
        <artifactId>arquillian-bom</artifactId>
        <version>1.1.2.Final</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian</groupId>
        <artifactId>arquillian-bom</artifactId>
        <version>${version.arquillian}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-drone-bom</artifactId>
        <version>${version.arquillian}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <finalName>arquillian-tutorial</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jbossas-managed-wildfly-8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <!-- <testFailureIgnore>true</testFailureIgnore> -->
              <systemPropertyVariables>
                <arquillian.launch>jbossas-managed-wildfly-8</arquillian.launch>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-spec-api</artifactId>
          <version>8.0.0.Beta1</version>
          <type>pom</type>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-arquillian-protocol-jmx</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-arquillian-common</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>

And the arquillian.xml for the managed container:

<arquillian xmlns="http://jboss.org/schema/arquillian"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://jboss.org/schema/arquillian
        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

  <defaultProtocol type="Servlet 3.0" />

  <container qualifier="jbossas-managed-wildfly-8">
    <configuration>
      <property name="jbossHome">D:\workspace\wildfly-8.0.0.Beta1</property>
      <property name="serverConfig">standalone.xml</property>
    </configuration>
  </container>
</arquillian>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top