[weld-issues] [JBoss JIRA] Created: (CDITCK-67) test applications failed to deploy due to "unresolvable ambiguous EL name exists"

Hong Zhang (JIRA) jira-events at lists.jboss.org
Thu Nov 19 17:24:29 EST 2009


test applications failed to deploy due to "unresolvable ambiguous EL name exists"
---------------------------------------------------------------------------------

                 Key: CDITCK-67
                 URL: https://jira.jboss.org/jira/browse/CDITCK-67
             Project: CDI TCK
          Issue Type: CTS Challenge
      Security Level: Public (Everyone can see)
    Affects Versions: 1.0.0.GA
         Environment:  Ubuntu/X86
            Reporter: Hong Zhang
            Priority: Critical


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