Bug 59206

Summary: When catalina.base is not specified, ConfigFileLoader throws an NPE in a static initializer
Product: Tomcat 7 Reporter: asheldon
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: asheldon
Priority: P2    
Version: 7.0.68   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description asheldon 2016-03-21 21:11:37 UTC
Using Tomcat 7 as an embedded servlet and updating to Tomcat 7.0.68, we found our application no longer started due to an ExceptionInInitializerError.

This problem was introduced by the change for https://bz.apache.org/bugzilla/show_bug.cgi?id=56777, which includes https://github.com/apache/tomcat70/blob/trunk/java/org/apache/tomcat/util/file/ConfigFileLoader.java. This file, on line 37, loads the system property "catalina.base" and, when it is not set, throws a NullPointerException.

It seems like it would be preferable if, when catalina.base is not specified, to avoid this NPE.
Comment 1 Violeta Georgieva 2016-03-22 20:45:34 UTC
Hi,

Thanks for the report.
The fix will be available from 9.0.0.M5, 8.5.1, 8.0.34 and 7.0.69 onwards.

Regards,
Violeta
Comment 2 asheldon 2016-03-22 20:51:17 UTC
Thank you!