java - WELD-00143 Pseudo scoped bean has circular dependencies -
using weldjunit4runner , getting 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] qualifiers [@any @default],
any known solution problem in weld?
more error message: java.lang.exceptionininitializererror @ com.my.own.weldjunit4runner.createtest(weldjunit4runner.java:18) @ org.junit.runners.blockjunit4classrunner$1.runreflectivecall(blockjunit4classrunner.java:244) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.blockjunit4classrunner.methodblock(blockjunit4classrunner.java:241) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:70) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:50) @ org.junit.runners.parentrunner$3.run(parentrunner.java:238) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:63) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:236) @ org.junit.runners.parentrunner.access$000(parentrunner.java:53) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:229) @ org.junit.runners.parentrunner.run(parentrunner.java:309) @ org.eclipse.jdt.internal.junit4.runner.junit4testreference.run(junit4testreference.java:86) @ org.eclipse.jdt.internal.junit.runner.testexecution.run(testexecution.java:38) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests(remotetestrunner.java:459) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests(remotetestrunner.java:675) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.run(remotetestrunner.java:382) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.main(remotetestrunner.java:192) caused by: org.jboss.weld.exceptions.deploymentexception: exception list 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] 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] 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] qualifiers [@any @default], - [backedannotatedfield] @inject @clientcommpriorizedacceptrequestcache private com.my.own.bounded_contexts.client.repositories.clientcommpriorizedacceptrequestrepository.clientcallpriorizedacceptrequestcache, - producer method [remotecache] qualifiers [@clientcommpriorizedacceptrequestcache @any] declared [[backedannotatedmethod] @produces @clientcommpriorizedacceptrequestcache public com.my.own.bounded_contexts.client.cache.cacheclientcommpriorizedacceptrequestservice.getclientcommpriorizedacceptrequestremotecache()], - managed bean [class com.my.own.bounded_contexts.client.cache.cacheclientcommpriorizedacceptrequestservice] qualifiers [@any @default] @ org.jboss.weld.bootstrap.validator.reallyvalidatepseudoscopedbean(validator.java:897)
weld complies specification in respect.
from cdi spec, section 5:
the container required support circularities in bean dependency graph @ least 1 bean participating in every circular chain of dependencies has normal scope, defined in normal scopes , pseudo-scopes. container not required support circular chains of dependencies every bean participating in chain has pseudo-scope.
try rid of dependency cycle in application, or @ least give normal scope 1 of beans involved.
Comments
Post a Comment