I'm trying to run the following unit test in a Maven project using a WebSphere 8.5 embeddable container:
import javax.ejb.embeddable.EJBContainer;
...
private EJBContainer ec;
@Before
public void setUp() {
final Map<String, Object> properties = new HashMap<String, Object>();
properties.put(EJBContainer.PROVIDER, "com.ibm.websphere.ejbcontainer.EmbeddableContainerProvider");
ec = EJBContainer.createEJBContainer(properties);
}
@Test
public void test1(){
...
}
But I'm getting the following exception in the setup method:
CNTR9403E: The embeddable enterprise bean container cannot start multiple modules with the same file name: project1\target\classes and project2\target\classes
Does anybody know how to get around this issue? I searched but couldn't find anything useful.
Edit: I've found the documentation for the exception CNTR9403E here:
CNTR9403E: The embeddable enterprise bean container cannot start multiple modules with the same file name: {0} and {1}
Explanation User code has directed the embeddable container to start multiple modules with the same file name. Action Specify a list of modules that does not have duplicate file names, or rename one of the modules with a unique file name.
But I don't see how I can fix this. Is it complaining about the two "classes" directories at the end of the paths? How can I solve this in a Maven multi-module project? Or is it a bug in WebSphere 8.5?