1

I did the instruction from this website (JSF 2.2 in JBoss 7.1.1 Final). After I overcome the problem posted :

I get new issue.

No active contexts for scope type javax.faces.flow.builder.FlowDefinition

Stack Trace :

14:57:33,400 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-8) Critical error during deployment: : org.jboss.weld.context.ContextNotActiveExceptio
n: WELD-001303 No active contexts for scope type javax.faces.flow.builder.FlowDefinition
    at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:607) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]
    at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:322) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:302) [jsf-impl-2.2.1.jar:2.2.1]
    at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jsf-api-2.2.1.jar:2.2]
    at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.1.jar:2.2.1]
    at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
    at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:739) [jsf-api-2.2.1.jar:2.2]
    at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.1.jar:2.2.1]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_25]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_25]

14:57:33,416 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jsf-cdi]] (MSC service thread 1-8) Exception sending context initialized event to listener i
nstance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type
 javax.faces.flow.builder.FlowDefinition
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273) [jsf-impl-2.2.1.jar:2.2.1]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_25]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_25]
Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.faces.flow.builder.FlowDefinition
    at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:607) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]
    at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:322) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:302) [jsf-impl-2.2.1.jar:2.2.1]
    at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jsf-api-2.2.1.jar:2.2]
    at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.1.jar:2.2.1]
    at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
    at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:739) [jsf-api-2.2.1.jar:2.2]
    at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.1.jar:2.2.1]
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.1.jar:2.2.1]

I tried to change weld-core module in JBoss 7 with the following jar fils.

weld-core-1.1.8.Final.jar
weld-core-2.1.1.Final.jar

It does not effect, error is the same. How can I resolve it?

Community
  • 1
  • 1
Zaw Than oo
  • 9,651
  • 13
  • 83
  • 131
  • AFAIK, you need JBoss 8 to get JSF 2.2 fully working. – Gimby Jan 23 '14 at 08:51
  • @Gimby: Out the box, yes. But JSF 2.2 is (should be) backwards compatible with Java EE 6. CycDemo: Mojarra 2.2.1 is half a year old already. It's currently at 2.2.5. Give it a try first. Then we can exclude old Mojarra bugs from being the cause. – BalusC Jan 26 '14 at 20:13

1 Answers1

0

One of the things that JBoss EAP 7 (and I assume Wildfly 10) also needs is a beans.xml file in the war project WEB-INF directory.

We have a number of EAR projects, with an EJB project containing the java code. It used to be that the beans.xml in this EJB project was sufficient to have JSF use CDI scopes, but with EAP 7 / JSF 2.2 this isn't enough anymore and the war project itself also needs this marker file.

I assume this is more standard compliant, but can lead to interesting bug chases if you don't realize this.

Geert-Jan Hut
  • 140
  • 2
  • 5