Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-399

LOGGING_CONFIG always set to logging.properties in RPM

XMLWordPrintable

    • Hide

      1. Install tomcat7 or tomcat8 from RPM
      2. Configure log4j
      3. rm /usr/share/tomcat{7,8}/conf/logging.properties
      4. Start up tomcat and see exception in logs

      Show
      1. Install tomcat7 or tomcat8 from RPM 2. Configure log4j 3. rm /usr/share/tomcat{7,8}/conf/logging.properties 4. Start up tomcat and see exception in logs

      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
      

              rhn-support-csutherl Coty Sutherland
              rhn-support-rbost Robert Bost
              Jan Onderka Jan Onderka
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified