ingwarsw / arquillian-suite-extension

Arquillian extension that will force single deployment for all tests
Apache License 2.0
67 stars 20 forks source link

Cannot upgrade to Arquillian BOM 1.1.14.Final from 1.1.13.Final #53

Closed mark1900 closed 6 years ago

mark1900 commented 6 years ago

I get a NullPointerException on utx.begin(); in the following JUnit test code.

@RunWith(Arquillian.class)
public class MyTest {

    private static final Logger LOGGER = LoggerFactory.getLogger(MyTest.class);

    @Inject
    private EntityManager em;

    @Inject
    UserTransaction utx;

    @Before
    public void before() throws Exception {
        utx.begin(); // throws java.lang.NullPointerException
        em.joinTransaction();
    }

    @After
    public void after() throws Exception {
        utx.rollback();
    }
}

I have tried to utilize dependencies similar to the release -arquillian-suite-extension/compare/v1.1.4...v1.2.0

The above code will run successfully if I utilize a previous version of Arquillian - org.jboss.arquillian:arquillian-bom:1.1.13.Final

This is starting to look like an issue with Arquillian and not this extension.

mark1900 commented 6 years ago

I looked into this further and discovered that this issue occurs when utilizing the shrinkwrap-resolver-impl-maven-2.2.6.jar dependency verses the shrinkwrap-resolver-impl-maven-2.2.4.jar dependency.

Additional details here

The workaround is to explicitly utilize the version of the dependency without this issue.

<dependency>
    <groupId>org.jboss.shrinkwrap.resolver</groupId>
    <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
    <version>2.2.4</version>
    <scope>test</scope>
</dependency>