Arkillian Tome Can't Start

I have a tomee based application that I am testing using arquillian. I use testNg and configured tomee to use random ports, 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 call and remove the server several times, I get 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 version is for version 1.7.2, and open-ejb version is 4.7.2. Can someone tell me what I am doing wrong?

+4
source share

Source: https://habr.com/ru/post/1617321/


All Articles