当我尝试将JBoss 7.1应用程序迁移到JSF 2.2时,JSTL jar的ClassNotFoundException

时间:2014-01-23 06:11:58

标签: java jsf jboss jstl jsf-2.2

我正在尝试在JBoss 7.1.1 Final中迁移JSF 2.2。

我已经安装了本网站建议的模块(JSF 2.2inJBoss 7.1.1 Final)。

模块

javax.servlet-api-3.0.1.jar
javax.servlet.jsp.jstl-api-1.2.1.jar
jsf-api-2.2.1.jar
jsf-impl-2.2.1.jar

当我使用javax.servlet.jsp.jstl-api-1.2.1.jar作为JSTL模块时,我遇到以下异常:

Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.ConditionalTagSupport from [Module "javax.servlet.jstl.api:main" from local module loader @84da23 (roots: D
:\java\JBoss-7.1.1\modules)]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
    ... 26 more

12:37:15,915 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."jsf-cdi.war".POST_MODULE: org.jboss.msc.service.St
artException in service jboss.deployment.unit."jsf-cdi.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "jsf-cdi.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    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: java.lang.RuntimeException: Error getting reflective information for class org.apache.taglibs.standard.tag.common.fmt.BundleSupport with ClassLoader ModuleClassLoader fo
r Module "javax.servlet.jstl.api:main" from local module loader @84da23 (roots: D:\java\JBoss-7.1.1\modules)
    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 5 more
Caused by: java.lang.NoClassDefFoundError: Ljavax/servlet/jsp/jstl/fmt/LocalizationContext;
    at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_25]
    at java.lang.Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.6.0_25]
    at java.lang.Class.getDeclaredFields(Unknown Source) [rt.jar:1.6.0_25]
    at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
    ... 10 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.fmt.LocalizationContext from [Module "javax.servlet.jstl.api:main" from local module loader @84da23 (roots: D:\j
ava\JBoss-7.1.1\modules)]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
    ... 15 more

然后,我再次尝试使用jboss-jstl-api_1.2_spec-1.0.3.Final.jar作为JSTL模块,但是,我得到如下:

12:28:25,928 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jsf-cdi]] (MSC service thread 1-2) 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:578) [weld-core-1.1.10.Final.jar:2012-10-12 10:00]
    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]
    ... 8 more

我在迁移中缺少什么?

0 个答案:

没有答案