Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039800Openbravo ERPA. Platformpublic2018-12-13 17:192022-02-01 08:07
jarmendariz 
Triage Platform Base 
normalminoralways
acknowledgedopen 
5
 
 
Core
No
0039800: Log4j configuration is not found when shutting down Tomcat
During shutdown process the following error message appears in the logs:

INFO: Stopping service Catalina
2018-12-13 17:15:07,914 localhost-startStop-1 ERROR No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html [^] for instructions on how to configure Log4j 2

It is caused by Weld, that creates a Logger object during context destroy just after log4j configuration is destroyed. As there is no log4j config file using their default names, configuration cannot be found and error appears to indicate the default one will be used.
- Start Tomcat with Openbravo
- Stop Tomcat
- See the log file
No tags attached.
related to feature request 0039504 closed jarmendariz Upgrade Log4j to version 2 
patch issue-39800.patch (2,336) 2018-12-13 17:23
https://issues.openbravo.com/file_download.php?file_id=12435&type=bug
Issue History
2018-12-13 17:19jarmendarizNew Issue
2018-12-13 17:19jarmendarizAssigned To => platform
2018-12-13 17:19jarmendarizModules => Core
2018-12-13 17:19jarmendarizTriggers an Emergency Pack => No
2018-12-13 17:23jarmendarizFile Added: issue-39800.patch
2018-12-13 17:25jarmendarizNote Added: 0108593
2018-12-13 17:25jarmendarizRelationship addedrelated to 0039504
2018-12-14 09:34alostaleStatusnew => acknowledged
2022-02-01 08:07alostaleAssigned Toplatform => Triage Platform Base

Notes
(0108593)
jarmendariz   
2018-12-13 17:25   
This issue have been asked in Stack Overflow: https://stackoverflow.com/questions/53740087/logging-not-working-in-contextlistener-at-application-shutdown [^]

Also, a minimal scenario to reproduce this bug have been created: https://github.com/katanagari7c1/tomcat-shutdown-test [^]