[weld-issues] [JBoss JIRA] (WELD-1133) Session EJB deployment failure

Joseph Snyder (JIRA) jira-events at lists.jboss.org
Mon May 14 15:27:18 EDT 2012


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

Joseph Snyder commented on WELD-1133:
-------------------------------------

There are actually more failures:  In 1.1.5.Final there are these 3:
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest.testSpecializingBeanHasNameOfSpecializedBean
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest.testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationIntegrationTest.testSpecializedBeanNotInstantiated
 
and in 1.1.8.Final there are these 13 failures:
 org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest.testSpecializingBeanHasNameOfSpecializedBean
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testProducerFieldBeanCreate
org.jboss.jsr299.tck.tests.implementation.producer.method.definition.ProducerMethodDefinitionTest.testNonStaticProducerMethodInheritedBySpecializingSubclass
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testProducerFieldForNullValueNotDependent
org.jboss.jsr299.tck.tests.inheritance.specialization.simple.SimpleBeanSpecializationTest.testProducerMethodOnSpecializedBeanCalledOnSpecializingBean
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testProducerFieldReturnsNullIsDependent
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testSpecializedBeanAlwaysUsed
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testProducerFieldReturnsNullIsNotDependent
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationIntegrationTest.testSpecializedBeanNotInstantiated
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testProducerStaticFieldBean
org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle.ProducerFieldLifecycleTest.testProducerFieldNotAnotherBean
org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest.testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean
org.jboss.jsr299.tck.tests.implementation.producer.method.definition.enterprise.EnterpriseProducerMethodDefinitionTest.testNonStaticProducerMethodInheritedBySpecializingSubclass

I looked at sections 4.9.7 and 4.9.11 and yes session beans can have interfaces that have superinterfaces but according to section 4.9.2.1 a session bean needs to explicitly include a super interface in its set of exposed views for that interface to apply as a local business interface.

It's interesting in that if I change the GlassFish code to include super interfaces in the session beans local interface view then all of these tests pass.  So it appears that weld is expecting super interfaces for session beans when it shouldn't (and it appears this change happened in 1.1.5.Final as all of these tests pass in 1.1.4.Final. 
                
> Session EJB deployment failure
> ------------------------------
>
>                 Key: WELD-1133
>                 URL: https://issues.jboss.org/browse/WELD-1133
>             Project: Weld
>          Issue Type: Bug
>          Components: GlassFish Integration, Infrastructure
>    Affects Versions: 1.1.5.Final, 1.1.6.Final, 1.1.7.Final, 1.1.8.Final
>         Environment: linux
>            Reporter: Joseph Snyder
>            Assignee: Marko Lukša
>
> Starting with Weld 1.1.5.Final there are several CTS failures when running CTS against GlassFish.  One specific test failure is org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationIntegrationTest.  When the application associated with this test is deployed the deployment fails (see "Deployment Failure" below).  I investigated the specs and it appears that weld is expecting the type of the session ejb (Office) to include the interface defined by the session bean that it extends (Building).
> The CDI spec states in section "4.3.1 Direct and indirect specialization" 
> ...
> Furthermore, X must have all the bean types of Y. If X does not have some bean type of Y, the container automatically detects the problem and treats it as a definition error.
> ..
> However this is in direct violation of the ejb 3.1 specification section 4.9.2.1 Session Bean Superclasses:
> ...
> As an example, the client views exposed by a particular session bean are not inherited by a subclass that also happens to define a session bean.
> @Stateless
> public class A implements Foo { ... }
> @Stateless
> public class B extends A implements Bar { ... }
> Assuming Foo and Bar are local business interfaces and there is no associated deployment descriptor, session bean A exposes local business interface Foo and session bean B exposes local business interface Bar, but not Foo.
> ...
> Deployment Failure:
> [#|2012-05-09T18:19:20.875-0400|SEVERE|44.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=12;_ThreadName=Thread-2;|WELD-001511 Specializing bean Session bean [class org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.Office with qualifiers [@Any @Default]; local interfaces are [OfficeLocal] does not have bean type interface org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.BuildingLocal of specialized bean Session bean [class org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.Building with qualifiers [@Any @Default]; local interfaces are [BuildingLocal]
> org.glassfish.deployment.common.DeploymentException: WELD-001511 Specializing bean Session bean [class org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.Office with qualifiers [@Any @Default]; local interfaces are [OfficeLocal] does not have bean type interface org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.BuildingLocal of specialized bean Session bean [class org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.Building with qualifiers [@Any @Default]; local interfaces are [BuildingLocal]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the weld-issues mailing list