1

我做了这个网站的说明(JBoss 7.1.1 Final 中的 JSF 2.2)。在我克服了发布的问题后:

我得到新问题。

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

堆栈跟踪 :

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]

我尝试使用以下 jar 文件更改weld-core模块。JBoss 7

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

它不影响,错误是一样的。我该如何解决?

4

1 回答 1

0

JBoss EAP 7(我假设是 Wildfly 10)还需要一个beans.xml在 war 项目WEB-INF目录中的文件。

我们有许多 EAR 项目,其中一个 EJB 项目包含 java 代码。过去,beans.xml在这个 EJB 项目中,让 JSF 使用 CDI 范围就足够了,但是对于 EAP 7 / JSF 2.2,这已经不够了,war项目本身也需要这个标记文件。

我认为这更符合标准,但如果您没有意识到这一点,可能会导致有趣的错误追逐。

于 2016-11-07T09:05:43.617 回答