[ 
https://issues.apache.org/jira/browse/OWB-738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535399#comment-13535399
 ] 

Denis Forveille commented on OWB-738:
-------------------------------------

Now this is clear that this is an OWB problem, I've just opened a PMR by IBM as 
AFAIK, the OWB implementation inside WAS v8.5.0.1 is not "plain vanilla OWB" 
and we will need an official WAS patch to go on further. We cannot just 
override the CDI implementation of WAS (Same thing for the EJB implementation 
but we can for the JSF or the JPA implemenation..). Hope to get some news back 
soon from them..
Would be curious to know if my ear cause the same problem in TomEE or any other 
JEE+OWB server with the current version of OWB..
                
> CDI Custom Scopes + @Stateful in a bean = java.lang.StackOverflowError
> ----------------------------------------------------------------------
>
>                 Key: OWB-738
>                 URL: https://issues.apache.org/jira/browse/OWB-738
>             Project: OpenWebBeans
>          Issue Type: Bug
>    Affects Versions: 1.1.6
>         Environment: WebSphere v8.5.0.1 on Windows
>            Reporter: Denis Forveille
>            Priority: Critical
>         Attachments: CODITest.ear
>
>
> In WebSphere v8.5.0.1 this very simple bean causes a 
> java.lang.StackOverflowError :
> @Named("codiTestConversationCtrl")
> @ConversationScoped
> @Stateful
> public class CODITestConversationCtrl implements Serializable {
>    private static final long serialVersionUID = 1L;
>    private Integer valeur;
> <whatever code from here, getters/setters etc>
> It is simply referenced in a page with
>    #{codiTestConversationCtrl.valeur}
> This causes a StackOverflowError after an endless recursive loop .
> If I use the CDI @ConversationScoped standard annotation instead of the CODI 
> one, it works
> If I remove the @Stateful annotation to use a plain POJO instead of a SFSB, 
> it works too..
> Check the initial diagnostic by Gerhard Petracek  from  the Apache CODI 
> project there : https://issues.apache.org/jira/browse/EXTCDI-304
> This seems to happen with any custom scope. At least is has been tested for 
> the same result with the following CODI Custom Scopes:
> - @ConversationScoped
> - @WindowScoped
> - @RestScoped 
> Seems to be a problem between the OWB EJB handling and CDI custom scopes
> Here are some part of the traceback:
>         ...
>         at 
> org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:174)
>         at 
> org.apache.webbeans.container.SerializableBean.create(SerializableBean.java:128)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.createNewInstanceOfBean(CodiUtils.java:69)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.createNewBeanInstance(AbstractConversationBeanEntry.java:139)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.getBeanInstance(AbstractConversationBeanEntry.java:84)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultConversation.getBean(DefaultConversation.java:163)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.GroupedConversationContext.resolveBeanInstance(GroupedConversationContext.java:185)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.resolve(AbstractGroupedConversationContext.java:114)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.ConversationContextAdapter.get(ConversationContextAdapter.java:98)
>         at 
> org.apache.webbeans.context.CustomContextImpl.get(CustomContextImpl.java:48)
>         at 
> org.apache.webbeans.context.CustomPassivatingContextImpl.get(CustomPassivatingContextImpl.java:47)
>         at 
> org.apache.webbeans.ejb.component.WSEjbBean.getInstance(WSEjbBean.java:196)
>         at 
> org.apache.webbeans.ejb.common.component.BaseEjbBean.createComponentInstance(BaseEjbBean.java:104)
>         at 
> org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:134)
>         at 
> org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:117)
>         at 
> org.apache.webbeans.component.AbstractOwbBean.createNewInstance(AbstractOwbBean.java:216)
>         at 
> org.apache.webbeans.portable.creation.AbstractProducer.produce(AbstractProducer.java:82)
>         at 
> org.apache.webbeans.component.InjectionTargetWrapper.produce(InjectionTargetWrapper.java:145)
>         at 
> org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:174)
>         at 
> org.apache.webbeans.container.SerializableBean.create(SerializableBean.java:128)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.createNewInstanceOfBean(CodiUtils.java:69)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.createNewBeanInstance(AbstractConversationBeanEntry.java:139)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.AbstractConversationBeanEntry.getBeanInstance(AbstractConversationBeanEntry.java:84)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultConversation.getBean(DefaultConversation.java:163)
>         at 
> org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.GroupedConversationContext.resolveBeanInstance(GroupedConversationContext.java:185)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.AbstractGroupedConversationContext.resolve(AbstractGroupedConversationContext.java:114)
>         at 
> org.apache.myfaces.extensions.cdi.core.impl.scope.conversation.ConversationContextAdapter.get(ConversationContextAdapter.java:98)
>         at 
> org.apache.webbeans.context.CustomContextImpl.get(CustomContextImpl.java:48)
>         at 
> org.apache.webbeans.context.CustomPassivatingContextImpl.get(CustomPassivatingContextImpl.java:47)
>         at 
> org.apache.webbeans.ejb.component.WSEjbBean.getInstance(WSEjbBean.java:196)
>         at 
> org.apache.webbeans.ejb.common.component.BaseEjbBean.createComponentInstance(BaseEjbBean.java:104)
>         at 
> org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:134)
>         at 
> org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:117)
>         at 
> org.apache.webbeans.component.AbstractOwbBean.createNewInstance(AbstractOwbBean.java:216)
>         at 
> org.apache.webbeans.portable.creation.AbstractProducer.produce(AbstractProducer.java:82)
>         at 
> org.apache.webbeans.component.InjectionTargetWrapper.produce(InjectionTargetWrapper.java:145)
>         at 
> org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:174)
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to