title: Glassfish embedded Fails to deploy EJB modules
body: <p>Does somebody can help me to solve this error with JUnit4.12 and glassfish4.1?</p>
  
  <p>I'm trying to test EJB using JUnit but I got this message from JUnit trace:</p>
  
  <pre><code>javax.ejb.EJBException: Failed to deploy EJB modules - see log for details
  at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:149)
  </code></pre>
  
  <p>Using maven my pom.xml is:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.leorm.sga&lt;/groupId&gt;
  &lt;artifactId&gt;sga-jee-last&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;glassfish.embedded-static-shell.jar&gt;
          /opt/servers/glassfish4/glassfish/lib/embedded/glassfish-embedded-static-shell.jar
      &lt;/glassfish.embedded-static-shell.jar&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.main.extras&lt;/groupId&gt;
          &lt;artifactId&gt;glassfish-embedded-static-shell&lt;/artifactId&gt;
          &lt;version&gt;4.1&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${glassfish.embedded-static-shell.jar}&lt;/systemPath&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;7.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.12&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>My JUnit test case is:</p>
  
  <pre><code>...
  public class PersonaServiceTest {
  
  private PersonaService personaService;
  
  @Before
  public void setUp() throws NamingException{
      EJBContainer contenedor = EJBContainer.createEJBContainer();
      personaService = (PersonaService) contenedor.getContext().lookup("ejb/Persona");
  
  }
  
  @Test
  public void test() {
      System.out.println("Starting test EJB PersonaService");
      assertTrue(personaService != null);
  
      assertEquals(2, personaService.listarPersonas().size());
  
      System.out.println("Count personas is:" + personaService.listarPersonas().size());
  
      this.desplegarPersonas(personaService.listarPersonas());
      System.out.println("End test EJB PersonaService");
  }
  
  private void desplegarPersonas(List&lt;Persona&gt; personas) {
      for(Persona persona: personas){
          System.out.println(persona);
      }
  
  }
  
  }
  </code></pre>
  
  <p>The console says:</p>
  
  <pre><code>INFO: [EJBContainerImpl] GlassFish status: STARTED
  Oct 18, 2015 11:33:56 AM org.glassfish.ejb.embedded.EJBContainerImpl deploy
  INFO: [EJBContainerImpl] Deploying as a ScatteredArchive
  Oct 18, 2015 11:33:57 AM    org.glassfish.deployment.common.GenericAnnotationDetector scanArchive
  WARNING: NCLS-DEPLOYMENT-00009
  Oct 18, 2015 11:33:57 AM org.glassfish.api.ActionReport failure
  SEVERE: Archive type of /tmp/classes.jar was not recognized
  Oct 18, 2015 11:33:57 AM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
  INFO: [EJBContainerProviderImpl] Cleaning up on failure ...
  JdbcRuntimeExtension,  getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool]
  Oct 18, 2015 11:33:57 AM org.glassfish.admin.mbeanserver.JMXStartupService shutdown
  INFO: JMXStartupService and JMXConnectors have been shut down.
  Oct 18, 2015 11:33:57 AM org.glassfish.admin.mbeanserver.JMXStartupService shutdown
  INFO: JMXStartupService and JMXConnectors have been shut down.
  JdbcRuntimeExtension,  getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool]
  Oct 18, 2015 11:33:57 AM com.sun.enterprise.v3.server.AppServerStartup stop
  INFO: Shutdown procedure finished
  </code></pre>