users@glassfish.java.net

Embedded GlassFish no EJBContainer available

From: Major Péter <majorpetya_at_sch.bme.hu>
Date: Sat, 26 Jun 2010 02:11:44 +0200

Hi,

I'm using glassfish-embedded-all artifact for Maven unit testing
(3.1-SNAPSHOT and r38139), and simple rerunning the tests sometimes
(absolutely transiently) I get the following error message in
surefire-report:
javax.ejb.EJBException: No EJBContainer provider available
The following providers:
org.glassfish.ejb.embedded.EJBContainerProviderImpl
Returned null from createEJBContainer call.
        at
javax.ejb.embeddable.EJBContainer.reportError(EJBContainer.java:200)

and in the test output:
[#|2010-06-26T01:44:49.195+0200|SEVERE|glassfish3.1|javax.enterprise.system.container.ejb.org.glassfish.ejb.embedded|_ThreadID=1;_ThreadName=main;|EJB5169:Caught
exception instantiating EmbeddedContainer.
javax.ejb.EJBException: Failed to deploy EJB modules - see log for details
        at
org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:139)
        at
org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:122)
        at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:116)

It looks like, that this only occurs, when I'm not specifying the
directory for EJB module, with:
properties.put(EJBContainer.MODULES, new
File("../sch-kp-ejb-impl/target/classes"));
ejb = EJBContainer.createEJBContainer(properties);

When I'm not commenting out the properties.put line, then there is no
exception (tried several times).

Is this a known issue?

Thanks,
Peter