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

David Allen (JIRA) jira-events at lists.jboss.org
Thu Dec 24 06:06:30 EST 2009

    [ https://jira.jboss.org/jira/browse/WELD-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12501601#action_12501601 ] 

David Allen commented on WELD-304:

The real bug is somewhere with sessions beans.  The validator code is OK and already works fine with simple managed beans.  The session beans should also behave exactly the same, but apparently the types being used in the specialized beans map do not match exactly what is being resolved.  Basically the resolution algorithm should be returning only one bean and thus the validator would not raise any errors.

Further work on this is on hold till I get a working AS server with Weld for running incontainer tests.

> 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