gpt4 book ai didi

jsf-2 - Tomcat7 中带有小面的 JSF

转载 作者:行者123 更新时间:2023-12-04 22:50:30 30 4
gpt4 key购买 nike

我正在尝试将带有 Facelets 1.1.14 的 JSF 2.0 应用程序部署到 Tomcat7。我收到以下异常:

INFO: Initializing Mojarra 2.0.0 (FCS b23) for context '/AdminUI'

3 Aug, 2011 7:44:32 PM com.sun.faces.spi.InjectionProviderFactory createInstance

INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
3 Aug, 2011 7:44:33 PM com.sun.faces.config.ConfigManager initialized
INFO: Unsanitized stacktrace from failed start...
java.lang.NullPointerException
at com.sun.faces.util.Util.loadClass(Util.java:200)
at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:312)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:416)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:370)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:313)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:262)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:337)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:219)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
3 Aug, 2011 7:44:33 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
3 Aug, 2011 7:44:33 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/AdminUI] startup failed due to previous errors
3 Aug, 2011 7:44:33 PM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:104)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:305)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext$4.run(StandardContext.java:5472)
at java.lang.Thread.run(Thread.java:662)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5481)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:225)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1233)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1391)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1401)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1380)
at java.lang.Thread.run(Thread.java:662)
3 Aug, 2011 7:44:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/AdminUI] appears to have started a thread named [Mojarra-ResourceCache-1-thread-1] but has failed to stop it. This is very likely to create a memory leak.

我在/WEB-INF/lib/下有以下 jar
activation-1.1.jar
antlr-2.7.6.jar
asm-3.1.jar
cglib-2.2.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
hibernate-commons-annotations-3.2.0.final.jar
hibernate-core-3.6.5.final.jar
hibernate-entitymanager-3.6.5.final.jar
hibernate-jpa-2.0-api-1.0.0.final.jar
hibernate-validator-4.0.2.GA.jar
javassist-3.12.0.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.3.jar
jsf-api-2.0.jar
jsf-impl-2.0.0.jar
jta-1.1.jar
slf4j-api-1.6.1.jar
stax-api-1.0-2.jar

如何解决这个问题?

最佳答案

JSF 2.0 附带了 Facelets 2.0。 Facelets 1.x JAR 文件只会与此冲突。您应该删除 Facelets 1.x JAR 文件。

在 Tomcat 上使用 Facelets 开发 JSF 2.0 所需的所有 JAR 文件是 jsf-api.jarjsf-impl.jar .

关于jsf-2 - Tomcat7 中带有小面的 JSF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6924523/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com