[logback-user] ReconfigureOnChangeFilter throws ConcurrentModificationException when launching up.

Zhangguangchao zhangguangchao at huawei.com
Tue Nov 20 13:41:36 CET 2012

I met ConcurrentModificationException exception when launching my app. Here is the stack :
2012-11-20 11:37:07,020|ERROR|osgi_launcher>Exception in thread "Thread-21" java.util.ConcurrentModificationException
2012-11-20 11:37:07,034|ERROR|osgi_launcher>    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
2012-11-20 11:37:07,034|ERROR|osgi_launcher>    at java.util.AbstractList$Itr.next(AbstractList.java:343)
2012-11-20 11:37:07,034|ERROR|osgi_launcher>    at ch.qos.logback.classic.Logger.recursiveReset(Logger.java:375)
2012-11-20 11:37:07,035|ERROR|osgi_launcher>    at ch.qos.logback.classic.LoggerContext.reset(LoggerContext.java:220)
2012-11-20 11:37:07,035|ERROR|osgi_launcher>    at ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter$ReconfiguringThread.run(ReconfigureOnChangeFilter.java:157)

My circumstance is as follows :
Suse 11 + felix3.2 + slf4j1.6.1 + logback0.9.28.

Of course, this exception is not thrown every time. After reading the source code, I think perhaps here is the point.  When my app is first launched, logback.xml will be modified by app asynchronizingly. At the same time, the logback.xml is configured by JoranConfigurator. Then that's the point. So I think the childrenList in ch.qos.logback.classic. Logger should be synchronized accessed. Right?

This problem cause the log record is not logged into log file sometimes. Does this exception affect the logging?

Thanks for your response.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20121120/648c9f0c/attachment.html>

More information about the Logback-user mailing list