Tomcat监听器启动错误

Posted

技术标签:

【中文标题】Tomcat监听器启动错误【英文标题】:Tomcat listenerStart error 【发布时间】:2011-06-14 11:57:59 【问题描述】:

当尝试部署我的 WAR 文件时,tomcat 给了我以下错误日志:

2011-jan-24 13:16:04 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2011-jan-24 13:16:04 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
2011-jan-24 13:19:09 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
2011-jan-24 13:19:09 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
2011-jan-24 13:19:14 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2011-jan-24 13:19:14 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
2011-jan-24 13:21:14 org.apache.catalina.core.StandardContext listenerStart
ALLVARLIG: Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1488)
 at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
 at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
 at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4458)
 at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
 at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
 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)
2011-jan-24 13:21:14 org.apache.catalina.core.StandardContext listenerStart
ALLVARLIG: Skipped installing application listeners due to previous error(s)
2011-jan-24 13:24:22 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
2011-jan-24 13:24:22 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()

这是我的 web.xml:

    <?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >

  <servlet>
   <servlet-name>HSR-backend</servlet-name>
 <servlet-class>org.springframework.web.servlet.DispacherServlet</servlet-class>
 <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
   <servlet-name>HSR-backend</servlet-name>
   <url-pattern>*.htm</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>
      index.jsp
    </welcome-file>
  </welcome-file-list>

</web-app>

我该如何解决这个问题?

【问题讨论】:

异常属于 ClassNotFound。检查所有实现的类。它说找不到 com.sun.faces.config.ConfigureListener 类。检查它的可用性。 【参考方案1】:

您忘记将 JSF-RI jar 放入您的 /WEB-INF/lib/

【讨论】:

以上是关于Tomcat监听器启动错误的主要内容,如果未能解决你的问题,请参考以下文章

Tomcat 无法启动8080端口监听

maven+SpringMVC框架开发启动tomcat报监听异常

问啥我的web.xml一加Listener,启动tomcat就出错

oracle11g出现错误,监听服务启动后停止。某些服务未由其他服务或程序使用时将自动停止

tomcat启动错误

XAMPP tomcat 服务未以错误启动,因为“Tomcat 启动/停止并出现错误,返回代码:1”