[JBoss JIRA] Created: (CDITCK-67) test applications failed to deploy due to "unresolvable ambiguous EL name exists"
by Hong Zhang (JIRA)
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
14 years, 3 months
[JBoss JIRA] Created: (WELD-442) Session event listener throws javax.ejb.NoSuchEJBException after certain time of inactivity in a session
by Martin Gencur (JIRA)
Session event listener throws javax.ejb.NoSuchEJBException after certain time of inactivity in a session
--------------------------------------------------------------------------------------------------------
Key: WELD-442
URL: https://jira.jboss.org/jira/browse/WELD-442
Project: Weld
Issue Type: Bug
Reporter: Martin Gencur
When using stateful session beans, the following exception is thrown after approximately 11 minutes of inactivity in a session. I'm not using any specific settings - just defaults. My SFSB class in the stacktrace is org.jboss.weld.examples.pastecode.session.History
13:40:23,427 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/weld-pastecode]] org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
13:51:08,812 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/weld-pastecode]] Session event listener threw exception: javax.ejb.NoSuchEJBException: Could not find Stateful bean: 3j011-vkamuu-g5s27uvi-1-g5s42hod-ac
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.remove(SimpleStatefulCache.java:544)
at org.jboss.ejb3.stateful.StatefulContainer.destroySession(StatefulContainer.java:1452)
at org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl.destroySession(EndpointImpl.java:61)
at org.jboss.weld.integration.ejb.JBossSessionObjectReference.remove(JBossSessionObjectReference.java:62)
at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:108)
at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
at org.jboss.weld.examples.pastecode.session.History_$$_javassist_54.destroy(History_$$_javassist_54.java)
at org.jboss.weld.bean.SessionBean.destroy(SessionBean.java:329)
at org.jboss.weld.context.ForwardingContextual.destroy(ForwardingContextual.java:34)
at org.jboss.weld.context.AbstractMapContext.destroy(AbstractMapContext.java:146)
at org.jboss.weld.context.AbstractMapContext.destroy(AbstractMapContext.java:163)
at org.jboss.weld.context.AbstractThreadLocalMapContext.destroy(AbstractThreadLocalMapContext.java:68)
at org.jboss.weld.context.ContextLifecycle.endSession(ContextLifecycle.java:80)
at org.jboss.weld.servlet.ServletLifecycle.endSession(ServletLifecycle.java:96)
at org.jboss.weld.servlet.WeldListener.sessionDestroyed(WeldListener.java:141)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:686)
at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:581)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:690)
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:675)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1383)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1675)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1684)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1684)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1664)
at java.lang.Thread.run(Thread.java:619)
--
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
14 years, 3 months