users@glassfish.java.net

ejb testing with embedabble container

From: <thomas_at_randspringer.de>
Date: Tue, 13 Jul 2010 08:42:08 +0200 (CEST)

Hi,
 
I try to test my EJB with the embedabble container and get some errors:
 
From my mavens pom.xml :
...
<dependency>
   <groupId>org.glassfish.extras</groupId>
   <artifactId>glassfish-embedded-all</artifactId>
   <version>3.1-b09</version>
   <scope>test</scope>
</dependency>
 
From my EJBTest-Class:
 
@Test
public void createContainerContent() throws Exception {
   ec = EJBContainer.createEJBContainer();
   ctx = ec.getContext();
   ...
   ContainerContentEJB container_contentEJB =
     (ContainerContentEJB) ctx.lookup("java:global/ContainerContentEJB");
 ...}
 
my Test-Sysout (complete log see: http://www.randspringer.de/ejbtest_gf.log ) :
 
...
SEVERE: MNTG0301:Cannot process XML ProbeProvider, xml = META-INF/gfprobe-provider.xml
java.lang.IllegalStateException: Provider already mapped glassfish:javamail:smtp-transport
        at org.glassfish.flashlight.impl.core.ProbeProviderRegistry.registerProbeProvider(ProbeProviderRegistry.java:96)
...
 
SEVERE: Module type not recognized for module /opt/workarea/eclipse_glassfish_workspace/cobra-glassfish/gfembed5910314841914317090tmp/applications/classes
Jul 12, 2010 5:07:37 PM org.glassfish.api.ActionReport failure
SEVERE: There is no installed container capable of handling this application classes
Jul 12, 2010 5:07:37 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
INFO: [EJBContainerProviderImpl] Cleaning up on failure ...
Jul 12, 2010 5:07:37 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdown
INFO: JMXStartupService and JMXConnectors have been shut down.
Jul 12, 2010 5:07:37 PM com.sun.enterprise.v3.server.AppServerStartup stop
INFO: Shutdown procedure finished
Jul 12, 2010 5:07:37 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting
Jul 12, 2010 5:07:38 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
SEVERE: ejb.embedded.exception_instantiating
javax.ejb.EJBException: Failed to deploy EJB modules - see log for details
 
 
From surefire-output:
 
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 22.636 sec <<< FAILURE!
createContainerContent(de.otto.cobra.business.ContainerContentEJBTest)  Time elapsed: 22.58 sec  <<< ERROR!
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)
 
How to fiy all this severe errors?
 
Best regards
Thomas