If an exception occurs during plugin initialization,
the currently open Log4j2Plugins.dat file is not closed, because
the call to inputstream.close is not in a finally block.
o.a.l.l.c.c.p.PluginManager#decode(ClassLoader) line 234
This may cause the issue reported by Fabian in the log4j-user mailing list:
From: Fabien Sanglard <fsanglard <at> timeplay.com>
Subject: Issue with Tomcat auto-redeploy on Windows.
Date: 2013-04-17 20:28:37 GMT (4 days, 13 hours and 8 minutes ago)
It seems there is an issue with log4j 2 not closing the core JAR handle on Windows.
It prevents Tomcat from auto redeploying an app.
Upon updating an hypothetical DiscoveryService.war in the 'webapps' folder, the redeploy will fail:
SEVERE: [C:\Program Files\apache-tomcat-7.0.39\webapps\DiscoveryService\WEB-INF\lib] could
not be completely deleted. The presence of the remaining files may cause problems
Upon inspection it looks like:
Cannot be deleted :/ ! Is there anything special to do so log4j 2 close the JAR handle ?
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Fix Version/s||2.0-beta6 [ 12324340 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|4d 7h 1m||1||Remko Popma||26/Apr/13 17:43|
|1m 9s||1||Remko Popma||26/Apr/13 17:44|