Tomcat6源代码启动时报错java.lang.ClassNotFoundException: listeners.ContextListener
来源:互联网 发布:xampp怎么配置mysql 编辑:程序博客网 时间:2024/05/23 02:06
报这个错误的原因是在web.xml文件的配置中,配置如下:
<listener>
<listener-class>listeners.ContextListener</listener-class>
</listener>
<listener>
<listener-class>listeners.SessionListener</listener-class>
</listener>
中配置的ContextListener.java类、和SessionListener.java这两个文件找不到,这两个类其实在webapps/WEB-INF/classes/listeners下,解决方法,把这两个文件拷贝到java/目录下,我在本地机器上这么做的,新建package:org.apache.classes.listeners,然后把这两个文件放进去,把web.xml中的配置改为:
<listener>
<listener-class>org.apache.classes.listeners.ContextListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.classes.listeners.SessionListener</listener-class>
</listener>
当然,这样还会报其他几个文件找不到的错误,比如filters.ExampleFilter找不到,只要按照上面的方法将java文件拷贝到源代码目录中,并修改web.xml中的路径即可。
- Tomcat6源代码启动时报错java.lang.ClassNotFoundException: listeners.ContextListener
- java.lang.ClassNotFoundException: listeners.ContextListener
- maven项目启动时报java.lang.ClassNotFoundException
- tomcat6启动报错java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler
- Solars10环境下ActiveMQ项目启动时报java.lang.ClassNotFoundException
- Myeclipse 配置jetty7启动时报java.lang.ClassNotFoundException解决
- 启动Tomcat时报Caused by: java.lang.ClassNotFoundException: FilterConfig异常
- Tomcat启动时报ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException: com.xxx.pojo.Admin错误
- Tomcat6启动报错java.lang.IllegalArgumentException:
- 启动报错:java.lang.ClassNotFoundException:
- 运行app时报java.lang.ClassNotFoundException
- Tomcat启动时报错“java.lang.NullPointException”
- Eclipse启动时报错java.lang.NumberFormatException
- tomcat启动时报Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.ActionSupport
- 解决在tomecat启动时报 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListen
- 解决在tomecat启动时报 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListen
- 启动Tomcat时报监听器类(实现这个 ServletContextListener接口)引起的java.lang.ClassNotFoundException错误
- tomcat6报错——java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
- Android OTA 升级(二): 脚本 ota_from_target_files
- 新浪微博,腾讯微博另一种实现方式--pull
- 在APK里 截获 系统按键 并处理
- Win7下怎么同时打开多个独立的Excel窗口
- vs2012的性能分析
- Tomcat6源代码启动时报错java.lang.ClassNotFoundException: listeners.ContextListener
- Ubuntu上安装Apache、MySql和PHP
- 用状态机实现XML解析器 - C++环境
- Java性能优化技巧集锦 .
- Statement和PreparedStatement之间的区别
- python time,datetime,string转换
- 黑马程序员_JAVA语言基础 语句、函数
- Android OTA 升级(三):生成recovery.img
- MFC属性页对话框的编程