logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-1445) OnStartupTriggeringPolicyTest fails on Windows saying the file is used by another process
Date Thu, 23 Jun 2016 23:36:31 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory resolved LOG4J2-1445.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.6.2

Thank you for your suggestion. A fix is in Git master. Can you please verify and close this
ticket if the fix works on your set up?

I works for me with:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: E:\Java\apache-maven-3.3.9
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_79\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Thank you,
Gary

> OnStartupTriggeringPolicyTest fails on Windows saying the file is used by another process
> -----------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1445
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1445
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.6.2
>         Environment: Windows 10, JDK 8
>            Reporter: Ludovic HOCHET
>            Priority: Trivial
>             Fix For: 2.6.2
>
>
> I saw some mention on the mailing list that some tests were failing on Windows and thought
I'd give a look.
> Effectively OnStartupTriggeringPolicyTest is failing on Windows with:
> java.nio.file.FileSystemException: 
> target\testfile: Le processus ne peut pas accéder au fichier car ce fichier est utilisé
par un autre processus.
> at org.apache.logging.log4j.core.appender.rolling.OnStartupTriggeringPolicyTest.cleanup(OnStartupTriggeringPolicyTest.java:77)
> This can be solved by ending the test with:
> manager.release();
> And is due to RollingFileManagerFactory.createManager(..) using new FileOutputStream(..)
which eventually calls Windows API CreateFileW(..) without the FILE_SHARE_DELETE flag which
prevent other calls to delete the file.
> (Files.newOutputStream(..) eventually does the opposite)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message