Bug 59206 - When catalina.base is not specified, ConfigFileLoader throws an NPE in a static initializer
Summary: When catalina.base is not specified, ConfigFileLoader throws an NPE in a stat...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.68
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-21 21:11 UTC by asheldon
Modified: 2019-06-21 06:44 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!