2017-10-17 128 views
0

我是JSF的新手,有noob問題。我正在玩教程http://javatutorialspot.com/jsf2/primefaces/primefaces-hello-world/。當我在Tomcat 7上運行它時,一切正常。當我切換目標運行時環境到Tomcat 8我得到下面的異常Tomcat 8找不到com.sun.faces.config.ConfigureListener類

java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener 
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332) 
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) 
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518) 
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499) 
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4764) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 

我的構建路徑有兩個jar文件:JSF-API-2.2.0的jar和JSF的IMPL-2.2.0.jar作爲用戶庫的一部分。

運行時配置也有我的用戶庫。

任何想法爲什麼Tomcat 8找不到com.sun.faces.config.ConfigureListener類?

回答