tags:

views:

59

answers:

1

I am running a JSP/Servlet Web application and out of nowhere we experienced some random problems that don't make any sense. I checked the catalina.out file to check the log files, and I noticed it contained some of the following messages

    SEVERE: Error starting static Resources
            java.lang.IllegalArgumentException: Invalid or unreadable
            WAR file : error in opening zip file

         INFO: validateJarFile(/home/weremo/appservers/
           apache-tomcat-6.0.26/webapps   /WMA/WEB-INF/lib/
           servlet-api.jar) - jar not loaded. See Servlet Spec 
           2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

I am aware of what this message means, but am in the dark as to what could have caused it, or what effects it could have on the application.

+4  A: 

Make sure that the servlet-api.jar file is not included in your webapp, if it is, just remove it.

The servlet api is provided by the servlet container. Webapps are not allowed to load classes in the javax.servlet package, and that's what's causing the error.

mdma
the servlet-api.jar file is included in my WEB-INF/lib directory. Am I supposed to remove it from the lib directory completely?
CitadelCSAlum
That's correct. You don't want to see WEB-INF/lib/servlet-api.jar in your webapp.
mdma