myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo Breijo (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-4127) Unexpected exception thrown when FlowMap is injected on a RequestScoped bean
Date Fri, 08 Sep 2017 14:34:00 GMT

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

Eduardo Breijo edited comment on MYFACES-4127 at 9/8/17 2:33 PM:
-----------------------------------------------------------------

Source code provided on ELImplicitObjectsViaCDI.war.zip


was (Author: eduardobreijo):
Source code

> Unexpected exception thrown when FlowMap is injected on a RequestScoped bean
> ----------------------------------------------------------------------------
>
>                 Key: MYFACES-4127
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4127
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.3.0-beta
>            Reporter: Eduardo Breijo
>            Priority: Minor
>             Fix For: 2.3.0
>
>         Attachments: ConfigItems.java, ELImplicitObjectsViaCDI.war, ELImplicitObjectsViaCDI.war.zip
>
>
> When @FlowMap is injected on a RequestScoped bean, and you try to use that object (which
should be null since we are not inside of a flow), an unexpected exception is thrown. This
was noted after JIRA issue: https://issues.apache.org/jira/browse/MYFACES-4126
> Caused by: org.jboss.weld.exceptions.IllegalProductException: WELD-000052: Cannot return
null from a non-dependent producer method: Producer for Producer Method [Map<Object, Object>]
with qualifiers [@FlowMap @Any] declared as [[UnbackedAnnotatedMethod] @Produces @FlowMap
@ApplicationScoped public org.apache.myfaces.cdi.faces.ApplicationScopeObjectProducer.getFlowMap()]
declared on Managed Bean [class org.apache.myfaces.cdi.faces.ApplicationScopeObjectProducer]
with qualifiers [@Any @Default]
> 	at org.apache.myfaces.cdi.faces.ApplicationScopeObjectProducer.getFlowMap(ApplicationScopeObjectProducer.java:73)
>   StackTrace:
> 	at org.jboss.weld.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:136)
> 	at [internal classes]
> 	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
> 	at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
> 	at [internal classes]
> 	at java.lang.String.valueOf(String.java:2994)
> 	at java.lang.StringBuilder.append(StringBuilder.java:131)
> 	at com.ibm.ws.jsf23.fat.beans.ELImplicitObjectBean.execute(ELImplicitObjectBean.java:163)
> On Mojarra 2.3, we get a different exception which looks more appropriate.
> org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for
scope type javax.faces.flow.FlowScoped
> 	org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:623)
> 	org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
> 	org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
> 	org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
> 	org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
> 	org.jboss.weld.util.Map$1302817811$Proxy$_$$_WeldClientProxy.toString(Unknown Source)
> 	java.lang.String.valueOf(String.java:2994)
> 	java.lang.StringBuilder.append(StringBuilder.java:131)
> 	com.ibm.ws.jsf23.fat.beans.ELImplicitObjectBean.execute(ELImplicitObjectBean.java:163)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message