title: java.lang.RuntimeException: Could not inject members
body: <p>I'm trying since some time to get Arquillian running with JPA.</p>
  
  <p>I had some DAO tests working, but while a continued to write the remaining tests this error started and affected both the ones I was writing and the ones that were fine before.</p>
  
  <p>java.lang.RuntimeException: Could not inject members</p>
  
  <pre><code>at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:117)
  at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:71)
  at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:51)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
  at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
  at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
  at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:116)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
  at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:115)
  at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:200)
  at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:350)
  at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
  at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:215)
  at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:279)
  at org.jboss.arquillian.container.test.impl.execution.BeforeLifecycleEventExecuter.on(BeforeLifecycleEventExecuter.java:34)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
  at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
  at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
  at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:116)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
  at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
  at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:273)
  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
  at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:166)
  at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:350)
  at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
  at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:177)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
  at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:115)
  at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
  at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
  at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:61)
  at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:139)
  at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:117)
  at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:86)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
  at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
  at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
  at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
  at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
  at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
  at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
  at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
  at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
  at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
  at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
  at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
  at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
  at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
  at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
  at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
  at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
  at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
  at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
  at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
  at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
  at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
  at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
  at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  
  <p>Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.jboss.weld.exceptions.IllegalArgumentException : WELD-001408: Unsatisfied dependencies for type MorphologicalAnalysisPersistenceFacade with qualifiers @Default
    at injection point [BackedAnnotatedField] @Inject br.com.cpmh.beacon.persistence.MorphologicalAnalysisPersistenceFacadeTest.morphologicalAnalysisPersistenceFacade
    at br.com.cpmh.beacon.persistence.MorphologicalAnalysisPersistenceFacadeTest.morphologicalAnalysisPersistenceFacade(MorphologicalAnalysisPersistenceFacadeTest.java:0)
   [Proxied because : Original exception caused: class java.lang.ClassNotFoundException: org.jboss.weld.exceptions.IllegalArgumentException]
      at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:83)
      at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:70)
      at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1025)
      at org.jboss.weld.util.ForwardingBeanManager.createInjectionTarget(ForwardingBeanManager.java:204)
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectNonContextualInstance(CDIInjectionEnricher.java:124)
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:110)
      ... 135 more
  Caused by: org.jboss.arquillian.test.spi.ArquillianProxyException: org.jboss.weld.exceptions.DeploymentException : WELD-001408: Unsatisfied dependencies for type MorphologicalAnalysisPersistenceFacade with qualifiers @Default
    at injection point [BackedAnnotatedField] @Inject br.com.cpmh.beacon.persistence.MorphologicalAnalysisPersistenceFacadeTest.morphologicalAnalysisPersistenceFacade
    at br.com.cpmh.beacon.persistence.MorphologicalAnalysisPersistenceFacadeTest.morphologicalAnalysisPersistenceFacade(MorphologicalAnalysisPersistenceFacadeTest.java:0)
   [Proxied because : Original exception caused: class java.lang.ClassNotFoundException: org.jboss.weld.exceptions.DeploymentException]
      at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
      at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
      at org.jboss.weld.bootstrap.Validator.validateProducer(Validator.java:425)
      at org.jboss.weld.injection.producer.InjectionTargetService.validateProducer(InjectionTargetService.java:36)
      at org.jboss.weld.manager.InjectionTargetFactoryImpl.validate(InjectionTargetFactoryImpl.java:153)
      at org.jboss.weld.manager.InjectionTargetFactoryImpl.createInjectionTarget(InjectionTargetFactoryImpl.java:81)
      ... 140 more</p>
  
  <p>My tests look all the same:</p>
  
  <pre><code>import org.junit.Test;
  import org.junit.runner.RunWith;
  
  import javax.inject.Inject;
  import javax.persistence.EntityManager;
  import javax.persistence.PersistenceContext;
  import javax.transaction.UserTransaction;
  
  @RunWith(Arquillian.class)
  public class MorphologicalAnalysisPersistenceFacadeTest
  {
      @Inject
      MorphologicalAnalysisPersistenceFacade morphologicalAnalysisPersistenceFacade;
  
      @Inject
      private UserTransaction userTransaction;
  
      @PersistenceContext(unitName = "BeaconAnalysis")
      EntityManager entityManager;
  
      @Deployment
      public static Archive&lt;?&gt; createDeployment()
      {
          JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "morphological-analysis-data-access-object-test.jar");
          archive.addPackages(true, "br.com.cpmh.beacon");
          archive.addAsResource("test-persistence.xml", "META-INF/persistence.xml");
          archive.addAsResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
  
          return archive;
      }
  
      @Before
      public void setUp() throws Exception
      {
          //morphologicalAnalysisPersistenceFacade = new MorphologicalAnalysisPersistenceFacade();
      }
  
      @After
      public void tearDown() throws Exception
      {
      }
  
      @Test
      public void create()
      {
      }
  </code></pre>