Bug 1236297

Summary: log4j not working on tomcat
Product: [Fedora] Fedora Reporter: Edward <edwardquick>
Component: tomcatAssignee: Ivan Afonichev <ivan.afonichev>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: alee, coolsvap, edwardquick, ivan.afonichev, java-sig-commits, krzysztof.daniel
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tomcat-7.0.68-3.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-25 22:22:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Edward 2015-06-27 12:57:09 UTC
Description of problem: 
After configuring tomcat to work with log4j, there are no logs.


Version-Release number of selected component (if applicable): 
tomcat-7.0.59-4.fc22.noarch
tomcat-log4j-7.0.59-4.fc22.noarch

How reproducible: 
Always

Steps to Reproduce:
1. dnf install tomcat tomcat-log4j
2. cp /etc/tomcat/log4j.properties /usr/share/tomcat/lib/log4j.properties
3. cp /usr/share/java/tomcat/log4j.jar /usr/share/tomcat/lib
4. echo "LOGGING_PROPERTIES=/usr/share/tomcat/lib/log4j.properties" > /etc/tomcat/tomcat.conf
5. systemctl start tomcat

Actual results:
tomcat.log does not exist in /var/log/tomcat

Expected results:
tomcat.log should exist in /var/log/tomcat with debug logging



Additional info:
I followed the information at https://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j and got this to work by replacing tomcat-juli.jar in /usr/share/tomcat/bin and adding tomcat-juli-adapaters.jar to /usr/share/tomcat/lib

Here is the tomcat process I ran

[root@fedora22 lib]# ps -ef | grep java
tomcat    4128 31665  4 12:54 pts/0    00:00:02 /usr/lib/jvm/jre/bin/java -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/lib/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.file=/usr/share/tomcat/lib/log4j.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start

Comment 1 Ivan Afonichev 2015-10-04 20:10:12 UTC
It seems they are rebranding commons lib.
      <replacefilter token="org.apache.commons"
            value="org.apache.juli" />

I don't think it is acceptable for fedora to ship such duplicates.

Comment 2 Fedora Update System 2016-02-23 10:05:35 UTC
tomcat-8.0.32-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5e0bb2f21a

Comment 3 Fedora Update System 2016-02-23 17:36:01 UTC
tomcat-7.0.68-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-62619c1bda

Comment 4 Fedora Update System 2016-02-24 21:51:51 UTC
tomcat-8.0.32-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5e0bb2f21a

Comment 5 Fedora Update System 2016-02-25 10:53:20 UTC
tomcat-7.0.68-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-62619c1bda

Comment 6 Fedora Update System 2016-02-27 15:43:49 UTC
tomcat-7.0.68-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b19c75d748

Comment 7 Fedora Update System 2016-02-28 13:51:06 UTC
tomcat-7.0.68-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b19c75d748

Comment 8 Fedora Update System 2016-03-11 06:49:24 UTC
tomcat-7.0.68-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e6651efbaf

Comment 9 Fedora Update System 2016-03-12 16:53:28 UTC
tomcat-7.0.68-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e6651efbaf

Comment 10 Fedora Update System 2016-03-25 22:21:33 UTC
tomcat-7.0.68-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.