Error configuring application listener of class jdbc.ContextListener [One of the solutions]

Error configuring application listener of class jdbc.ContextListener One of the solutions

In the process of developing with MyEclipse + Tomcat 5.5 these two days, this error message suddenly appeared when starting the project. The previous two days have been good. How can this problem suddenly appear?I still doubt whether the computer is poisoned.

The error message is as follows

 

2011-4-26 14:39:52 org.apache.catalina.loader.WebappClassLoader validateJarFile
Message: 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)

 

 

 

Before that, we also reported WEB-INF/lib/servlet- api.jar Error in not loaded. See servlet spec 2.3, section 9.7.2

Before looking for a long time on the Internet, there is a problem servlet- api.jar Later, all the methods were tried, even the system was reinstalled, but it didn’t work. Finally, I calm down and take a look at the JRE package content in the running environment of MyEclipse. I found that all the jar packages are JDK jars. Change the jar package and recompile it. The result is good.

Remind yourself of this problem. The problem is often in the most trivial place. If you find the problem, you will get something if you think about what changes you have made before.

 

Read More: