报错Error configuring application listener of class jdbc.ContextListener 解决办法之一
这两天在用MyEclipse + Tomcat5.5开发过程中,启动工程的时候突然出现这个报错信息,前两天一直是好的,怎么突然出现这问题呢,我还怀疑电脑是不是中毒了。
报错信息如下
2011-4-26 14:39:52 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(E:\java\Tomcat5\webapps\pmis-center\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2011-04-26 14:39:53,843 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/center]] - <Error configuring application listener of class jdbc.ContextListener>
java.lang.Error: Unresolved compilation problems:
The hierarchy of the type ContextListener is inconsistent
Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor
The type java.util.EventListener cannot be resolved. It is indirectly referenced from required .class files
at jdbc.ContextListener.<init>(ContextListener.java:4)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
在这之前而且还报WEB-INF/lib/servlet-api.jar not loaded. See Servlet Spec 2.3, section 9.7.2 的错
之前在网上找了很久,有说问题出在 servlet-api.jar上的,也有说要 重装环境的,后来所的方法都试了,连系统都重装了,还没有用,最后静下心一想,把MyEclipse中的运行环境中的JRE包内容看了一下,发现jar包全是jdk的jar包,把jar包改过来,重新编译,结果就好了。
就此问题给自己提醒。问题往往在最微不足道的地方,发现问题了,好好想想之前做了哪些改动就一定有收获。
分享到:
相关推荐
stuts2项目启动tomcat报错:Error configuring application listener of class org.apache.struts2.dispatcher.ng.listener.StrutsListener,缺少的是这个javassist-3.11.0.GA.jar
严重: Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener java.lang.ClassNotFoundException: ...
解决异常:Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener java.lang.ClassNotFoundException: ...
* Error configuring application listener of class org.springframework.web.context.ContextLoaderListener错误的解决方法 结论: Maven构建项目发布到Tomcat服务器可能会遇到一些困难,但是通过正确地配置...
MCTS 70-643 Configuring Windows Server 2008 Application Infrastructure.part1
MCTS 70-643 Configuring Windows Server 2008 Application Infrastructure.part2
再者,如果在配置监听器时遇到`Error configuring application listener of class org.springframework.web.context.ContextLoaderListener`,可能是因为Eclipse在生成项目时遗漏了一些必要的Spring库。此时,应手动...
Configuring SAP R3 FICO The Essential Resource for Configuring the Financial and Controlling Modules.part3
sap press doc 解压密码:abap_developer
接下来,关于IntelliJ IDEA的问题,错误“Error configuring application listener of class org.springframework.web.context.ContextLoaderListener”通常意味着Spring MVC应用的配置不完整。解决方法是确保IDEA的...
The book covers everything from simple to enterprise-class deployments, with emphasis on enterprise-level requirements and coverage of cloud and hybrid-cloud scenarios. Many books cover how to ...
4.1.1.11 Packet Tracer - Configuring Extended ACLs Scenario 2.pka
Microsoft.Press.MCTS.Self.Paced.Training.Kit.Exam.70.680.Configuring.Windows.7.Oct.2009.rar
Examples of dependency injection ............................................................. 36 Dependencies and configuration in detail ........................................................... ...
英文书籍,排版及页面清晰度不错,对SAP SD的相关知识还是比较全面的,个人建议有一定英语基础的人并且具备SAP基础知识的人去学习。