You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2009/07/02 12:20:50 UTC

DO NOT REPLY [Bug 47465] New: Reading configuration files from a JAR locks the JAR file

https://issues.apache.org/bugzilla/show_bug.cgi?id=47465

           Summary: Reading configuration files from a JAR locks the JAR
                    file
           Product: Log4j
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Configurator
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: markt@apache.org


If a log4j configuration file is found by the classpath search inside a JAR
file, the file will be loaded from the JAR. However, the initial
URLConnection.getDefaultUseCaches() setting means that caching is used and the
JAR file is locked.

This is a particular problem for container environments like Tomcat, as it
prevents a web application from being removed. Whilst the workaround is simple
- don't put your log4j configuration in a JAR - it impacts a large number of
users.

I have a patch and test case for PropertyConfigurator. I still need to test
DOMConfigurator. I will update this bug report with the results of that test
(and a patch if necessary) later today.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 47465] Reading configuration files from a JAR locks the JAR file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47465





--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-07-02 03:45:08 PST ---
Created an attachment (id=23919)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23919)
Patch and test cases

Test cases to demonstrate the issue and a patch to fix the issue attached.

Note the test cases use files paths that work on my machine. These do not
appear to be consistent with the other test cases so a few tweaks may be
required.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 47465] Reading configuration files from a JAR locks the JAR file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47465

Scott Deboy <sd...@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Scott Deboy <sd...@iname.com> 2009-10-03 15:06:23 PDT ---
Patch applied to svn trunk in r821433.

Thanks Mark!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org