title: Arquillian can't find Wildfly - org.jboss.arquillian.container.spi.client.container.LifecycleException
body: <p>I'm trying to run Arquillian tests on a Wildfly managed container.</p>
  
  <p>Here's the Arquillian's deployment and the test:</p>
  
  <pre><code>@RunWith(Arquillian.class)
  public abstract class ArquillianTestCase {
  
      @Deployment
      public static WebArchive createDeployment() {
  
          /* Create the war file according to build.gradle. */
          WebArchive war = ShrinkWrap.create(EmbeddedGradleImporter.class)
                  .forThisProjectDirectory().importBuildOutput()
                  .as(WebArchive.class);
  
          /* Add the abstract test classes to war. */
          war.addClasses(ArquillianTestCase.class, SeleniumTestCase.class);
  
          /* Add selenium and its transitive dependencies to war's lib. */
          String seleniumJava = "org.seleniumhq.selenium:selenium-java:3.3.1";
          MavenResolverSystem resolver = Maven.resolver();
          File[] seleniumFiles = resolver.resolve(seleniumJava).withTransitivity()
                  .asFile();
          war.addAsLibraries(seleniumFiles);
  
          return war;
      }
  }
  
  public class LoginTest extends ArquillianTestCase {
  
      @Test
      public void shouldRun() throws Exception {
          System.out.println("LoginTest!");
          Assert.assertTrue(true);
      }
  }
  </code></pre>
  
  <p>I don't have any <code>arquillian.xml</code> file, so I rely on <code>JBOSS_HOME</code> environment variable to let Arquillian find my Wildfly:</p>
  
  <pre><code>echo $JBOSS_HOME
  /opt/wildfly-8.2.1.Final
  </code></pre>
  
  <p>All of this process is started by a Gradle build, so here are the most relevant dependencies of my <code>build.gradle</code> file:</p>
  
  <pre><code>dependencies {
  
      /* Arquillian for managing the life cycle of the container. */
      testCompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.1.10.Final'
  
      /* Arquillian and Wildfly integration. */
      testCompile 'org.wildfly:wildfly-arquillian-container-managed:8.2.1.Final'
  
      /* Arquillian and Gradle integration. */
      testCompile 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-gradle-depchain:2.2.6'
  
      /* Arquillian and Maven integration for resolving dependencies at runtime. */
      testCompile 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:2.2.6'
      testCompile 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:2.2.6'
  
      /* Selenium for front-end testing. */
      testCompile 'org.seleniumhq.selenium:selenium-java:3.3.1'
  } 
  </code></pre>
  
  <p>If I run this setup on <code>Windows</code> with my <code>JBOSS_HOME</code> pointing to a valid Wildfly installation, it works fine, but when I reproduce the same setup on <code>Ubuntu Server 14.04</code>, I get the error below:</p>
  
  <pre><code>org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
      at org.jboss.as.arquillian.container.managed.ManagedDeployableContainer.startInternal(ManagedDeployableContainer.java:208)
      at org.jboss.as.arquillian.container.CommonDeployableContainer.start(CommonDeployableContainer.java:112)
      at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199)
      at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163)
      at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157)
      at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)
      at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156)
       (omitted dozens of lines to improve readability)
  Caused by: java.lang.NullPointerException
      at java.io.File.&lt;init&gt;(File.java:277)
      at org.jboss.as.arquillian.container.managed.ManagedDeployableContainer.startInternal(ManagedDeployableContainer.java:94)
      ... 84 more
  </code></pre>
  
  <p>I tried to reproduce this behavior on <code>Windows</code> and realised that it happens when I remove my environment variable <code>JBOSS_HOME</code>, so Arquillian doesn't find my container, but back on <code>Ubuntu</code>, even that variable exists, it doesn't work.</p>
  
  <p>Any ideas? Thanks in advance.</p>