Summary: | tomcat cannot startup since version 6.0.39,7.0.52,8.0 on some machines. | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | kean12 <kean12> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 7.0.52 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | error log |
Description
kean12
2014-03-08 16:30:51 UTC
incate the tomcat version (In reply to kean12 from comment #0) > > INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 >(...) > SEVERE: Error deploying web application directory C:\server\tomcat > 7\webapps\docs >(...) > Caused by: java.lang.NullPointerException > at > org.apache.tomcat.util.descriptor.DigesterFactory.idFor(DigesterFactory.java: > 107) > at > org.apache.tomcat.util.descriptor.DigesterFactory.<clinit>(DigesterFactory. > java:59) > This should have been fixed in the versions that you are using! (Thanks to bugs 56045 and 56016 that have been reported for 7.0.50). This behaviour of DigesterFactory is a result of our work on blocking CVE-2013-4590. Essentially, DigesterFactory populates a table with resource URLs of schema and DTD files bundled in Tomcat's servlet-api.jar. This NPE happens when classloader cannot locate those files and returns 'null' instead of a valid URL. My guess is that you have a mess either in your CLASSPATH or in CATALINA_BASE/lib, CATALINA_HOME/lib directories. Essentially that you have a rogue Servlet API jar file that does not belong to Tomcat. That is that a classloader has loaded a wrong "javax.servlet.ServletContext" class that does not belong to our servlet-api.jar. Dear Konstantin Kolinko thank you for your suggestion. your suggestion is correct after I clean up java folder and reinstall java. Have a nice day The behaviour was changed in 8.0.4, 7.0.53 (and proposed for 6.0.x) to log a warning instead of failing fatally with an NullPointerException. The text of the warning will be: The XML schema [{0}] could not be found. This is very likely to break XML validation if XML validation is enabled. Note though that in my opinion any configuration that uses wrong servlet-api JAR at runtime is a broken one. Discussion: http://marc.info/?t=139055909300001&r=1&w=2 [quote] For example, Cookie.java relies on certain configuration properties defined by Tomcat documentation to provide secure and specification-compliant behaviour. You cannot swap that implementation with random other. [/quote] (In reply to Konstantin Kolinko from comment #4) > The behaviour was changed in 8.0.4, 7.0.53 (and proposed for 6.0.x) to log a > warning instead of failing fatally with an NullPointerException. > Applied to Tomcat 6 as well in r1578369, will be in 6.0.40. > Note though that in my opinion any configuration that uses wrong > servlet-api JAR at runtime is a broken one. |