You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2012/04/20 23:15:32 UTC

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

Mark Struberg created OPENEJB-1824:
--------------------------------------

             Summary: 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


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

        

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

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264785#comment-13264785 ] 

David Blevins commented on OPENEJB-1824:
----------------------------------------

2012-04-21 - http://svn.apache.org/viewvc?view=revision&revision=1328783 - dblevins

                
> 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

        

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

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OPENEJB-1824:
-----------------------------------

    Attachment: OPENEJB-1824.patch

This patch fixes the problem.

Please note that we should revisit classes which got forked from OWB to TomEE and check what can be merged back/fixed. I'd rather have a bit less duplicated code, otherwise we will soon be in a maintenance hell ;)
                
> 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
>         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