[Tomcat]org.apache.catalina.loader.webappclassloader Validatejarfile

Source: Internet
Author: User
Tags tomcat tomcat server

Cause of the problem:

Application packaging was deployed to the Tomcat server, the applications failed to start, and Tomcat reported an exception:

2012-9-21 15:09:46 Org.apache.catalina.loader.WebappClassLoader Validatejarfile
Info: Validatejarfile (/home/xx/xx/portal/web-inf/lib/servlet-api.jar)-jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending Class:javax/servlet/servlet.class

Problem Analysis:

Tomcat exception indicates that a jar package is illegal and this jar package fails to load, so it should be that the jar package failed to load and the application failed to start

Look under, find the application Web-inf/lib directory exists Servlet-api.jar, while the Common/lib directory of Tomcat also exists Servlet-api.jar (using tomcat-5.5.23)

When Tomcat starts, it reads all of the jar packages in the Tomcat/common/lib directory into memory, and if the application Web-inf/lib directory has the same jar package, it will fail to load, and it may also cause similar problems between different versions of JAR packages.

How to resolve:

Remove Servlet-api.jar from the Web-inf/lib directory in the application, recompile the packaged deployment, the application starts successfully and Tomcat does not report an exception

Therefore, it is recommended to try not to put the jar package into the Tomcat/common/lib directory, in order to avoid and the application in the Web-inf/lib directory of the jar package duplication caused the jar package load failure


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.