-
Bug
-
Resolution: Done
-
Critical
-
JWS 3.0.3 GA
The /usr/bin/tomcat{7,8} startup scripts are always setting the LOGGING_CONFIG variable to the default logging.properties. If I switch to log4j, I would like to be able to delete the logging.properties file but if I do, it results in this:
java.io.FileNotFoundException: /usr/share/tomcat7/conf/logging.properties (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at java.io.FileInputStream.<init>(FileInputStream.java:101) at org.apache.juli.ClassLoaderLogManager.readConfiguration(Unknown Source) at org.apache.juli.ClassLoaderLogManager.readConfiguration(Unknown Source) at java.util.logging.LogManager$2.run(LogManager.java:320) at java.util.logging.LogManager$2.run(LogManager.java:318) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:318) at java.util.logging.LogManager.getLogManager(LogManager.java:300) at java.util.logging.Logger.<init>(Logger.java:265) at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1468) at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1466) at java.util.logging.LogManager$1.run(LogManager.java:204) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.<clinit>(LogManager.java:181) at java.util.logging.Logger.demandLogger(Logger.java:339) at java.util.logging.Logger.getLogger(Logger.java:393) at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55) at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:823) at sun.management.Agent.startAgent(Agent.java:260) at sun.management.Agent.startAgent(Agent.java:456)
Side note: the ZIP installation of JWS does not have this issue and actually has a conditional around the LOGGING_CONFIG variable:
if [ -z "$LOGGING_CONFIG" ]; then if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties" else # Bugzilla 45585 LOGGING_CONFIG="-Dnop" fi fi