将Primefaces应用程序部署到tomcat时出错

时间:2014-03-11 08:12:23

标签: jsf-2 primefaces tomcat7

我们在从eclipse将Tomfaces JSF应用程序部署到Tomcat时遇到了问题。

使用过的库是:

  • tomcat 7
  • eclipse 4.3
  • mojarra 2.2
  • primefaces 4.0
  • eclipselink 2.5

启动服务器后,我们得到以下stacktrace:

java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    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:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
    at java.lang.ClassLoader.findBootstrapClass(Native Method)
    at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:926)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1617)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:249)
    at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:591)
    at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:482)
    at javax.faces.FactoryFinder.access$400(FactoryFinder.java:138)
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:989)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
    at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
    at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
    ... 10 more

在将primefaces库添加到项目后立即发生此错误。有没有人知道primefaces的这个问题?

0 个答案:

没有答案