title: Why the arquillian gives me that : Could not read active container configuration?
body: <p>I try to integrate the arquillian solution into my maven EJB project which contains juste the EJBs which I uses in other separate projects.</p>
  
  <p>I use Jboss EAP6.</p>
  
  <p>So i have make it as the following :</p>
  
  <p>I made the arquillian.xml into ejbModule/src/test/resources/:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;container qualifier="jboss" default="true"&gt;
      &lt;configuration&gt;
          &lt;property name="jbossHome"&gt;D:\jbdevstudio\jboss-eap-6.2&lt;/property&gt;
      &lt;/configuration&gt;
  &lt;/container&gt; 
  </code></pre>
  
  <p>in the pom of my project i added the following dependencies:</p>
  
   <pre class="lang-xml prettyprint-override"><code>&lt;dependency&gt;
     &lt;groupId&gt;org.jboss.arquillian.container&lt;/groupId&gt;
      &lt;artifactId&gt;arquillian-jbossas-embedded-6&lt;/artifactId&gt;
     &lt;version&gt;1.0.0.Alpha5&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
     &lt;groupId&gt;org.jboss.arquillian&lt;/groupId&gt;
     &lt;artifactId&gt;arquillian-junit&lt;/artifactId&gt;
     &lt;version&gt;1.0.0.Alpha5&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
     &lt;groupId&gt;org.jboss.arquillian.junit&lt;/groupId&gt;
     &lt;artifactId&gt;arquillian-junit-container&lt;/artifactId&gt;
     &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
     &lt;groupId&gt;org.jboss.arquillian.protocol&lt;/groupId&gt;
     &lt;artifactId&gt;arquillian-protocol-servlet&lt;/artifactId&gt;
    &lt;scope&gt;test&lt;/scope&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.8.2&lt;/version&gt;
  &lt;/dependency&gt; 
  </code></pre>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;profiles&gt;
     &lt;profile&gt;
          &lt;id&gt;jbossas-embedded-6&lt;/id&gt;
          &lt;activation&gt;
          &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
          &lt;/activation&gt;
     &lt;/profile&gt;
  
     &lt;profile&gt;
          &lt;id&gt;arq-jbossas-managed&lt;/id&gt;
               &lt;dependencies&gt;
                    &lt;dependency&gt;
                         &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
                         &lt;artifactId&gt;jboss-as-arquillian-containermanaged&lt;/artifactId&gt;
                         &lt;scope&gt;test&lt;/scope&gt;
                    &lt;/dependency&gt;
               &lt;/dependencies&gt;
     &lt;/profile&gt;
  
     &lt;profile&gt;
          &lt;id&gt;arq-jbossas-remote&lt;/id&gt;
          &lt;dependencies&gt;
               &lt;dependency&gt;
                    &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
                    &lt;artifactId&gt;jboss-as-arquillian-containerremote&lt;/artifactId&gt;
                    &lt;scope&gt;test&lt;/scope&gt;
               &lt;/dependency&gt;
          &lt;/dependencies&gt;
     &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p>The Test Class :</p>
  
  <pre class="lang-java prettyprint-override"><code>import javax.inject.Inject;
  import org.jboss.arquillian.api.Deployment;
  import org.jboss.arquillian.junit.Arquillian;
  import org.jboss.shrinkwrap.api.ShrinkWrap;
  import org.jboss.shrinkwrap.api.asset.EmptyAsset;
  import org.jboss.shrinkwrap.api.spec.JavaArchive;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.oap.subscription.AbstractSubscription;
  
  @RunWith(Arquillian.class)
      public class SubscriptionFactoryTest {   
  
      @Inject
      private SubscriptionFactory subscriptionFactory;
  
      @Deployment
      public static JavaArchive getDeployement() {
          System.out.println("### testSayHelloEJB");
          return ShrinkWrap.create(JavaArchive.class, "subscriptionFactory.jar")
              .addClasses(AbstractSubscription.class,SubscriptionFactory.class);
  
      }
  
  
  
      @Test
      public void getSubscriptionByIdTest() {
          System.out.println("### testSayHelloEJB");
      }
  }
  </code></pre>
  
  <p>The EJB Class:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Remote(ISubscriptionFactoryRemote.class)
  @Local(ISubscriptionFactoryLocal.class)
  @Stateless
  public class SubscriptionFactory extends AbstractSubscription implements ISubscriptionFactoryRemote {
  
      @Override
      public AbstractSubscription getSubscriptionById(final Integer id) {
  
          AbstractSubscription ret = null;
          if (id != null) {
              // create query
              final StringBuilder queryString = new StringBuilder("select c from AbstractSubscription c ");           
  
              try {
                  queryString.append("where c.id = :id");
  
                  // create query
                  Query query = this.getEntityManager().createQuery(queryString.toString());
  
                  // set parameter
                  query = query.setParameter("id", id);
  
                  // recovers refCountry
                  ret = (AbstractSubscription) query.getSingleResult();
  
              } catch (final Exception exc) {
  
              }
  
          }
  
          return ret;
  
      }
  }
  </code></pre>
  
  <p>When i run the class test as Junit test , it gives me the errors : </p>
  
  <pre><code> janv. 20, 2015 12:15:34 PM org.jboss.arquillian.impl.client.container.ContainerRegistryCreator getActivatedConfiguration
   Infos: Could not read active container configuration: null 
  </code></pre>
  
  <p>the Faillure Trace: </p>
  
  <pre><code> java.lang.NoClassDefFoundError: Lorg/jboss/embedded/api/server/JBossASEmbeddedServer;
   at java.lang.Class.getDeclaredFields0(Native Method)
   at java.lang.Class.privateGetDeclaredFields(Class.java:2397)
   at java.lang.Class.getDeclaredFields(Class.java:1806)
   at org.jboss.arquillian.impl.core.Reflections.getFieldInjectionPoints(Reflections.java:74)
   ... 79 more
  </code></pre>
  
  <p>Any idea.</p>