Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 13889E64A for ; Mon, 25 Feb 2013 23:50:13 +0000 (UTC) Received: (qmail 20983 invoked by uid 500); 25 Feb 2013 23:50:12 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 20949 invoked by uid 500); 25 Feb 2013 23:50:12 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 20940 invoked by uid 99); 25 Feb 2013 23:50:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 23:50:12 +0000 Date: Mon, 25 Feb 2013 23:50:12 +0000 (UTC) From: "Jed Wesley-Smith (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LOG4J2-169) LogManager.getLogger doesn't work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-169?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jed Wesley-Smith updated LOG4J2-169: ------------------------------------ Summary: LogManager.getLogger doesn't work (was: ConfigurationFactory = is not thread-safe) =20 > LogManager.getLogger doesn't work > --------------------------------- > > Key: LOG4J2-169 > URL: https://issues.apache.org/jira/browse/LOG4J2-169 > Project: Log4j 2 > Issue Type: Bug > Components: Core > Affects Versions: 2.0-beta4 > Reporter: Jed Wesley-Smith > Priority: Critical > Labels: thread-safety > > We randomly get the following: > java.util.ConcurrentModificationException > =09at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.g= etConfiguration(ConfigurationFactory.java:377) > =09at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.g= etConfiguration(ConfigurationFactory.java:361) > =09at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerConte= xt.java:266) > =09at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.jav= a:134) > =09at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(L= og4jContextFactory.java:75) > =09at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(L= og4jContextFactory.java:30) > =09at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:165) > =09at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:174) > =09at =E2=80=A6 > factories is defined as: > private static List factories =3D new ArrayList= (); > The simple fix is to use a java.util.concurrent.CopyOnWriteArrayList: > private static final List factories =3D new Cop= yOnWriteArrayList(); > https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/core/src/main= /java/org/apache/logging/log4j/core/config/ConfigurationFactory.java -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org