Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.0.0.Final
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Having two @Producer methods in an application which are @Named throws a deployment error. If you remove the @Named it deploys fine. The two producers are in different classes with different method names.
WELD-001414 Bean name is ambiguous. Name resolves to beans [org.jboss.seam.solder.unwraps.UnwrapsProducerBean@eb3516, org.jboss.seam.solder.unwraps.UnwrapsProducerBean@923822]
Looking at this error and the source it does appear that the UnwrapsProducer doesn't read the producer method name if the value is not defined in the annotation as it should. However even If I explicitly set the name in the @Named Weld still fails to deploy
org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name newServiceReturn resolves to beans [org.jboss.seam.solder.unwraps.UnwrapsProducerBean@8807d7, Producer Method [ServiceReturn] with qualifiers [@Any @CreateBean @Named] declared as [[method] @Produces @Unwraps @CreateBean @Named public co.domain.service.returns.ServiceReturnUtil.newServiceReturn()]]
Something like this will reproduce - https://gist.github.com/1173849