[
https://issues.apache.org/jira/browse/TOMEE-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved TOMEE-1863.
------------------------------------
Resolution: Auto Closed
Hi there!
We wanted to reach out and let you know that we're currently working on
cleaning up open issues in Jira that specifically impact unsupported versions,
including 1.7.x, 7.0.x, and 7.1.x.
If you had previously reported this issue on one of these unsupported versions,
we kindly ask you to check if the problem still persists and can be reproduced
on a supported version such as 8.0.x or 9.0.x. If you find that it is indeed
reproducible on a supported version, you're more than welcome to re-open this
issue.
Thanks!
> Log4J initialized twice for web app
> -----------------------------------
>
> Key: TOMEE-1863
> URL: https://issues.apache.org/jira/browse/TOMEE-1863
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 1.7.3
> Environment: Windows Server 2012, Windows 7
> Reporter: loua
> Priority: Major
>
> The web application uses slf4j for logging. The logging implementation is
> log4j. The application contains a log4j.properties file in the
> WEB-INF\classes directory. The application uses JAX-RS and Stateless EJBs.
> Log4j is initialized by the TempClassLoader and then again when the webapp is
> loaded. This results in two OS file handles referencing the same log file
> (RollingLogFileAppender) that prevents the log file from rolling over. TomEE
> logging uses the default java.util.logging.
> Log4j Debug Output
> =======================================================
> INFO: Deploying web application archive
> D:\apps\clean\apache-tomee-plus-1.7.3\webapps\log4jweb.war
> Jul 11, 2016 2:05:48 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
> INFO: ------------------------- localhost -> /log4jweb
> Jul 11, 2016 2:05:48 PM org.apache.openejb.config.ConfigurationFactory
> configureApplication
> INFO: Configuring enterprise application:
> D:\apps\clean\apache-tomee-plus-1.7.3\webapps\log4jweb
> log4j: Trying to find [log4j.xml] using context classloader
> org.apache.openejb.core.TempClassLoader@2e341234.
> log4j: Trying to find [log4j.xml] using
> org.apache.openejb.core.TempClassLoader@2e341234 class loader.
> log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
> log4j: Trying to find [log4j.properties] using context classloader
> org.apache.openejb.core.TempClassLoader@2e341234.
> log4j: Using URL
> [file:/D:/apps/clean/apache-tomee-plus-1.7.3/webapps/log4jweb/WEB-INF/classes/log4j.properties]
> for automatic log4j configuration.
> log4j: Reading configuration from URL
> file:/D:/apps/clean/apache-tomee-plus-1.7.3/webapps/log4jweb/WEB-INF/classes/log4j.properties
> log4j: Parsing for [root] with value=[DEBUG, file].
> log4j: Level token is [DEBUG].
> log4j: Category root set to DEBUG
> log4j: Parsing appender named "file".
> log4j: Parsing layout options for "file".
> log4j: Setting property [conversionPattern] to [%d{MM-dd HH:mm:ss,SSS} %-5p
> %32.32c{1}:%3.3L - %m%n].
> log4j: End of parsing for "file".
> log4j: Setting property [maxBackupIndex] to [9].
> log4j: Setting property [file] to
> [D:/apps/clean/apache-tomee-plus-1.7.3/logs/log4jweb.log].
> log4j: Setting property [maxFileSize] to [10KB].
> log4j: setFile called:
> D:/apps/clean/apache-tomee-plus-1.7.3/logs/log4jweb.log, true
> log4j: setFile ended
> log4j: Parsed "file" options.
> log4j: Parsing for [simple] with value=[DEBUG].
> log4j: Level token is [DEBUG].
> log4j: Category simple set to DEBUG
> log4j: Handling log4j.additivity.simple=[null]
> log4j: Finished configuring.
> ...
> INFO: Enterprise application
> "D:\apps\clean\apache-tomee-plus-1.7.3\webapps\log4jweb" loaded.
> Jul 11, 2016 2:05:48 PM org.apache.openejb.assembler.classic.Assembler
> createApplication
> INFO: Assembling app: D:\apps\clean\apache-tomee-plus-1.7.3\webapps\log4jweb
> log4j: Trying to find [log4j.xml] using context classloader
> LazyStopWebappClassLoader
> context: /log4jweb
> delegate: false
> repositories:
> /WEB-INF/classes/
> ----------> Parent Classloader:
> org.apache.catalina.loader.StandardClassLoader@51521cc1
> .
> log4j: Trying to find [log4j.xml] using LazyStopWebappClassLoader
> context: /log4jweb
> delegate: false
> repositories:
> /WEB-INF/classes/
> ----------> Parent Classloader:
> org.apache.catalina.loader.StandardClassLoader@51521cc1
> class loader.
> log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
> log4j: Trying to find [log4j.properties] using context classloader
> LazyStopWebappClassLoader
> context: /log4jweb
> delegate: false
> repositories:
> /WEB-INF/classes/
> ----------> Parent Classloader:
> org.apache.catalina.loader.StandardClassLoader@51521cc1
> .
> log4j: Using URL
> [file:/D:/apps/clean/apache-tomee-plus-1.7.3/webapps/log4jweb/WEB-INF/classes/log4j.properties]
> for automatic log4j configuration.
> log4j: Reading configuration from URL
> file:/D:/apps/clean/apache-tomee-plus-1.7.3/webapps/log4jweb/WEB-INF/classes/log4j.properties
> log4j: Parsing for [root] with value=[DEBUG, file].
> log4j: Level token is [DEBUG].
> log4j: Category root set to DEBUG
> log4j: Parsing appender named "file".
> log4j: Parsing layout options for "file".
> log4j: Setting property [conversionPattern] to [%d{MM-dd HH:mm:ss,SSS} %-5p
> %32.32c{1}:%3.3L - %m%n].
> log4j: End of parsing for "file".
> log4j: Setting property [maxBackupIndex] to [9].
> log4j: Setting property [file] to
> [D:/apps/clean/apache-tomee-plus-1.7.3/logs/log4jweb.log].
> log4j: Setting property [maxFileSize] to [10KB].
> log4j: setFile called:
> D:/apps/clean/apache-tomee-plus-1.7.3/logs/log4jweb.log, true
> log4j: setFile ended
> log4j: Parsed "file" options.
> log4j: Parsing for [simple] with value=[DEBUG].
> log4j: Level token is [DEBUG].
> log4j: Category simple set to DEBUG
> log4j: Handling log4j.additivity.simple=[null]
> log4j: Finished configuring.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)