gradle - Arquillian can't find Wildfly - org.jboss.arquillian.container.spi.client.container.LifecycleException -


i'm trying run arquillian tests on wildfly managed container.

here's arquillian's deployment , test:

@runwith(arquillian.class) public abstract class arquilliantestcase {      @deployment     public static webarchive createdeployment() {          /* create war file according build.gradle. */         webarchive war = shrinkwrap.create(embeddedgradleimporter.class)                 .forthisprojectdirectory().importbuildoutput()                 .as(webarchive.class);          /* add abstract test classes war. */         war.addclasses(arquilliantestcase.class, seleniumtestcase.class);          /* add selenium , transitive dependencies 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);     } } 

i don't have arquillian.xml file, rely on jboss_home environment variable let arquillian find wildfly:

echo $jboss_home /opt/wildfly-8.2.1.final 

all of process started gradle build, here relevant dependencies of build.gradle file:

dependencies {      /* arquillian managing life cycle of container. */     testcompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.1.10.final'      /* arquillian , wildfly integration. */     testcompile 'org.wildfly:wildfly-arquillian-container-managed:8.2.1.final'      /* arquillian , gradle integration. */     testcompile 'org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-gradle-depchain:2.2.6'      /* arquillian , maven integration resolving dependencies @ 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 front-end testing. */     testcompile 'org.seleniumhq.selenium:selenium-java:3.3.1' }  

if run setup on windows jboss_home pointing valid wildfly installation, works fine, when reproduce same setup on ubuntu server 14.04, error below:

org.jboss.arquillian.container.spi.client.container.lifecycleexception: not start container     @ org.jboss.as.arquillian.container.managed.manageddeployablecontainer.startinternal(manageddeployablecontainer.java:208)     @ org.jboss.as.arquillian.container.commondeployablecontainer.start(commondeployablecontainer.java:112)     @ org.jboss.arquillian.container.impl.containerimpl.start(containerimpl.java:199)     @ org.jboss.arquillian.container.impl.client.container.containerlifecyclecontroller$8.perform(containerlifecyclecontroller.java:163)     @ org.jboss.arquillian.container.impl.client.container.containerlifecyclecontroller$8.perform(containerlifecyclecontroller.java:157)     @ org.jboss.arquillian.container.impl.client.container.containerlifecyclecontroller.forcontainer(containerlifecyclecontroller.java:255)     @ org.jboss.arquillian.container.impl.client.container.containerlifecyclecontroller.startcontainer(containerlifecyclecontroller.java:156)      (omitted dozens of lines improve readability) caused by: java.lang.nullpointerexception     @ java.io.file.<init>(file.java:277)     @ org.jboss.as.arquillian.container.managed.manageddeployablecontainer.startinternal(manageddeployablecontainer.java:94)     ... 84 more 

i tried reproduce behavior on windows , realised happens when remove environment variable jboss_home, arquillian doesn't find container, on ubuntu, variable exists, doesn't work.

any ideas? in advance.


Comments