I would test my EJB with TomEE embedded EJBContainer.
This is my JUnit test case skeleton:
package com.xxx.indexer.scheduler.service;
import java.ut
I read at this link, https://stackoverflow.com/a/3416368/1412839, that the problem is the order of maven dependencies.
I have to declare first the tomee embedded artifact, and after the javaee api, in this way:
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>tomee-embedded</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
It works.
you can replace javax:javaee-api (broken jar) by org.apache.openejb:javaee-api:6.0-4 too and it always works ;)