[jboss-jira] [JBoss JIRA] (WFLY-3196) Confusing IllegalStateException: WELD-000340: A request must be associated with the context when mixing JSF/CDI

Jozef Hartinger (JIRA) issues at jboss.org
Fri Jun 6 05:00:16 EDT 2014


     [ https://issues.jboss.org/browse/WFLY-3196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jozef Hartinger resolved WFLY-3196.
-----------------------------------

    Fix Version/s: 8.2.0.CR1
                   9.0.0.Alpha1
       Resolution: Done


> Confusing IllegalStateException: WELD-000340: A request must be associated with the context when mixing JSF/CDI
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-3196
>                 URL: https://issues.jboss.org/browse/WFLY-3196
>             Project: WildFly
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld, JSF
>    Affects Versions: 8.0.0.Final
>         Environment: [clock-jsf-test 846]$ uname -a
> Darwin scotts-imac 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
> [clock-jsf-test 847]$ java -version
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build 1.8.0-b132)
> Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
> Also seen with:
> java version "1.7.0_45"
> Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
> Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
>            Reporter: Scott Stark
>            Assignee: Jozef Hartinger
>             Fix For: 8.2.0.CR1, 9.0.0.Alpha1
>
>
> I have a simple web app doing injection into a JSF managed bean using @EJB. When the managed bean lifecycle and duration is described using the JSF @ManagedBean and @ApplicationScoped I get a "IllegalStateException: WELD-000340 ..." error when loading the welcome page. The only workaround I have seen is to disable implicit CDI usage, but the web app is using CDI, so that is not appropriate.
> The problem seems to be a lack of understanding what is going on between the weld and jsf containers. I understand that the JSF @ManagedBean is deprecated in favor of CDI @Named, but it would be nice if we can provide better feedback when @ManagedBean is used along with CDI.
> The following git repo provides a complete test application along with the steps to cause the error as well as how to fix it by only using CDI annotations.
> https://github.com/starksm64/clock-jsf-test



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list