You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2012/04/22 04:54:34 UTC

[jira] [Closed] (OPENEJB-1824) TomEE wrongly detecte disabled beans as broken

     [ https://issues.apache.org/jira/browse/OPENEJB-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-1824.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0.0
         Assignee: Mark Struberg

Thank you, Mark!!
                
> TomEE wrongly detecte disabled beans as broken
> ----------------------------------------------
>
>                 Key: OPENEJB-1824
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1824
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: tomee
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 4.0.0
>
>         Attachments: OPENEJB-1824.patch
>
>
> The latest TomEE build detects disabled beans as broken and reports a Serialization check issue.
> org.apache.webbeans.exception.WebBeansConfigurationException: Passivation scoped defined bean must be passivation capable, but bean : TissClientConfig, Name:null, WebBeans Type:MANAGED, API Types:[org.apache.myfaces.extensions.cdi.jsf.api.config.ClientConfig,at.ac.tuwien.tiss.core.fe.codi.TissClientConfig,java.io.Serializable,java.lang.Object], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default] is not passivation capable
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:392)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:253)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:215)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:286)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:108)
> 	at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:50)
> The bean looks like the following:
> @SessionScoped
> @Alternative
> public class TissClientConfig extends ClientConfig implements Serializable {
> The problem is that in my case the Alternative is not enabled via beans.xml. Thus it is disabled, in which case the WebBeansUtil#isPassivationCapable(Contextual<?> contextual) returns null.
> This works as documented:
> > @return the uniqueId if it is {@link PassivationCapable} and enabled
> The solution: Someone removed the following lines from the class you copied from owb to openejb:
> if (bean instanceof OwbBean && !((OwbBean)bean).isEnabled())
> {
>     // we skip disabled beans
>     continue;
> }
> Disabled beans do not need to be valid in a CDI sense at all. That might be the reason why they got disabled during the boot.
> I will provide a patch to fix this. Just doing some 7up and testing.

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