[weld-issues] [JBoss JIRA] Resolved: (WELD-304) test applications failed to deploy due to "unresolvable ambiguous EL name exists"

David Allen (JIRA) jira-events at lists.jboss.org
Tue Dec 29 08:14:31 EST 2009

     [ https://jira.jboss.org/jira/browse/WELD-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Allen resolved WELD-304.

    Resolution: Done

This test works fine with the trunk version of Weld.  The code being used for resolution and validation is the same for both managed beans and session beans.

> test applications failed to deploy due to "unresolvable ambiguous EL name exists"
> ---------------------------------------------------------------------------------
>                 Key: WELD-304
>                 URL: https://jira.jboss.org/jira/browse/WELD-304
>             Project: Weld
>          Issue Type: Bug
>          Components: Bootstrap and Metamodel API, Class Beans (Managed and Session), Producers (Methods, Fields and Disposers)
>    Affects Versions: 1.0.0.GA
>         Environment:  Ubuntu/X86
>            Reporter: Hong Zhang
>            Assignee: David Allen
>            Priority: Critical
>             Fix For: 1.0.1.CR1
> I am investigation the test failures for org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest class. The deployment failed for the application due to some validation failure in weld RI code.
> From the stack trace, it found two beans with name "farmer":
> Caused by: org.jboss.weld.DeploymentException: An unresolvable ambiguous EL name exists for farmer; found [org.jboss.weld.bean-/home/hzhang/files/sun/glassfishv3/glassfish/domains/domain1/applications/org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest/org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest_jar/-SessionBean-LazyFarmer, org.jboss.weld.bean-/home/hzhang/files/sun/glassfishv3/glassfish/domains/domain1/applications/org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest/org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest_jar/-SessionBean-Farmer]
>       at org.jboss.weld.Validator.validateBeanNames(Validator.java:321)
>       at org.jboss.weld.Validator.validateDeployment(Validator.java:273)
>       at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:389)
>       at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:166)
> So I tried to step into weld RI code to see why this happened.
> This is what I found so far:
> 1. The Farmer class has a @Named annotation, and AbstractBean.initName() would set its name as the default name (the simple name of the class): "farmer".
> 2. The LazyFarmer class extends from Farmer class and does not have a @Named annotation, so AbstractBean.initName() does not assign any name to it. Its name is later assigned in AbstractBean.postSpecialize using its specialized bean's name (this.name = getSpecializedBean().getName()). Its specialized bean is its super class Farmer, and Farmer's name is "farmer". So now LazyFarmer's name is also "farmer".
> Seems from the RI code, it's expected these two beans will have the same name "farmer".  So not sure how this test would pass with the current TCK/RI.
> This is also the cause of the deployment failure for org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationIntegrationTest

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the weld-issues mailing list