当我尝试更新jboss 6.0 eap以使用jsf 2.2时,我收到以下错误。我已将javax / faces / api / main和com / sun / jsf-impl / main中的jar和相应的module.xml文件更新为jsf-impl-2.2.4和jsf-api-2.2.4。
15:54:11,888 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Critical error during deployment: : 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:578) [weld-core-1.1.10.Final-redhat-1.jar:1.1.10.Final-redhat-1]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:323) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:303) [jsf-impl-2.2.4.jar:2.2.4]
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jsf-api-2.2.4.jar:2.2]
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.4.jar:2.2.4]
at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.4.jar:2.2.4]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
15:54:11,888 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/DWP]] (MSC service thread 1-5) Exception sending context initialized event to listener instance 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.4.jar:2.2.4]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.17.Final-redhat-1.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
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:578) [weld-core-1.1.10.Final-redhat-1.jar:1.1.10.Final-redhat-1]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:323) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationAssociate$PostConstructApplicationListener.processEvent(ApplicationAssociate.java:303) [jsf-impl-2.2.4.jar:2.2.4]
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) [jsf-api-2.2.4.jar:2.2]
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) [jsf-impl-2.2.4.jar:2.2.4]
at org.jboss.as.weld.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:288) [jboss-as-weld-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:691) [jsf-impl-2.2.4.jar:2.2.4]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) [jsf-impl-2.2.4.jar:2.2.4]
... 8 more
15:54:11,888 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Error listenerStart
15:54:11,888 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Context [/DWP] startup failed due to previous errors
15:54:11,904 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.web.deployment.default-host./DWP: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./DWP: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:94)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
答案 0 :(得分:0)
JBoss WELD容器不是最新的,无法使用JSF 2.2。
升级JSF的方式大致相同通过在
中添加模块的新版本(插槽)来升级WELD1. $JBOSS_HOME/modules/system/layers/base/org/jboss/weld/api,
2. $JBOSS_HOME/modules/system/layers/base/org/jboss/weld/core and
3. $JBOSS_HOME/modules/system/layers/base/org/jboss/weld/spi
在进行更改之前,请小心备份当前模块,而不是替换“主”版本(插槽),而是创建新插槽(版本)。
找到
请注意,所选版本为2.1,这是撰写本文时最常见的版本。
有关模块的更多信息,请尝试浏览the official docs。
答案 1 :(得分:0)
我在standalone.xml中添加了以下内容
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<global-modules>
<module name="javax.faces.api" slot="main"/>
<module name="com.sun.jsf-impl" slot="main"/>
</global-modules>
...
</subsystem>