At last, I cracked it!
Here is the story:
Sometime back when I deploy my web application( named: myApp) in Tomcat 5.5.23 installed on JDK 1.5 Update 14, I used to stuck with the following issue and I was not able to access my application.
Tomcat log will show something like below:
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\myApp\WEB-INF\lib\servlet-api.jar) — jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
28/05/2006 21:03:39 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\myApp\WEB-INF\lib\servlet.jar) — jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
SEVERE: Error listenerStart
Dec 5, 2007 10:24:10 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/myApp] startup failed due to previous errors.
Today I found the solution for this issue.
Just delete the servlet.jar and servlet-api.jar files from C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\myApp\WEB-INF\lib.
These files, anyways will be in C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib folder of Tomcat.
I found this solution by little bit of Googling. Earlier also I Googled for this like anything but could not find any solution.I also posted it in popular forums at javaranch.com, thescripts.com, p2pwrox.com etc. but to my disappointment.
I also tested this solution in three of my team’s systems.It worked for two systems and it didn’t work for one system. But I am sure the above is the cause and fix of this issue.The reason for not working in one system is something else which I have to investigate further.
This issue consumed lot of my time/energy/hope and frustrated and depressed me a lot.I didn’t get help from anyone. Now I am glad that I found the solution all by myself.
Leave a Reply