Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2214

WELD-00143 Pseudo scoped bean has circular dependencies

XMLWordPrintable

      Trying to use WeldJUnit4Runner to unit test a JEE application that uses a CDI container. Upon running the Junit test I get the following error message:

      Exception 0 : org.jboss.weld.exceptions.DeploymentException: WELD-001443: Pseudo scoped bean has circular dependencies. Dependency path: - Managed Bean [class com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestService] with qualifiers [@Any @Default],

      Is there any kind of fix or workaround for a problem like this?

      Full error message:

      java.lang.ExceptionInInitializerError at com.my.own.WeldJUnit4Runner.createTest(WeldJUnit4Runner.java:18) at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 102 exceptions: Exception 0 : org.jboss.weld.exceptions.DeploymentException: WELD-001443: Pseudo scoped bean has circular dependencies. Dependency path: - Managed Bean [class com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestService] with qualifiers [@Any @Default], - [BackedAnnotatedField] @Inject private com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestService.listener, - Managed Bean [class com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestListener] with qualifiers [@Any @Default], - [BackedAnnotatedField] @Inject private com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestListener.clientCommPriorizedAcceptRequestRepository, - Managed Bean [class com.my.own.bounded_contexts.client.repositories.ClientCommPriorizedAcceptRequestRepository] with qualifiers [@Any @Default], - [BackedAnnotatedField] @Inject @ClientCommPriorizedAcceptRequestCache private com.my.own.bounded_contexts.client.repositories.ClientCommPriorizedAcceptRequestRepository.clientCallPriorizedAcceptRequestCache, - Producer Method [RemoteCache] with qualifiers [@ClientCommPriorizedAcceptRequestCache @Any] declared as [[BackedAnnotatedMethod] @Produces @ClientCommPriorizedAcceptRequestCache public com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestService.getClientCommPriorizedAcceptRequestRemoteCache()], - Managed Bean [class com.my.own.bounded_contexts.client.cache.cacheClientCommPriorizedAcceptRequestService] with qualifiers [@Any @Default] at org.jboss.weld.bootstrap.Validator.reallyValidatePseudoScopedBean(Validator.java:897)

              Unassigned Unassigned
              BruceSpringfield Bruce Springfield (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: