I have a tomee based application which I am testing using arquillian.I am using testNg & have configured tomee to use random ports by adding the following to my pom.xml :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<systemPropertyVariables>
<tomee.httpPort>-1</tomee.httpPort>
<tomee.stopPort>-1</tomee.stopPort>
</systemPropertyVariables>
</configuration>
</plugin>
However if I try to bring up & take down the server multiple times, I am getting the following exception :
org.jboss.arquillian.container.spi.client.container.DeploymentException: Unable to deploy
at org.apache.openejb.arquillian.embedded.EmbeddedTomEEContainer.deploy(EmbeddedTomEEContainer.java:165)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
...
Caused by: java.lang.NullPointerException: null
at org.apache.openejb.arquillian.common.TomEEContainer.addServlets(TomEEContainer.java:229)
at org.apache.openejb.arquillian.embedded.EmbeddedTomEEContainer.deploy(EmbeddedTomEEContainer.java:157)
...
My tommee version is 1.7.2 and open-ejb version is 4.7.2. Can someone tell me what am I doing wrong ?