You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/05/25 10:49:23 UTC

[Bug 57947] New: "No such file or directory" after upgrade to poi-ooxml 3.12

https://bz.apache.org/bugzilla/show_bug.cgi?id=57947

            Bug ID: 57947
           Summary: "No such file or directory" after upgrade to poi-ooxml
                    3.12
           Product: POI
           Version: 3.12-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: OPC
          Assignee: dev@poi.apache.org
          Reporter: laimutis.ignatavicius@asseco.lt

After poi-ooxml version upgrade from 3.10-FINAL to 3.12, tests of our software,
which are running parallelly, began failing randomly:

java.io.IOException: No such file or directory
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:1006)
    at java.io.File.createTempFile(File.java:1989)
    at
org.apache.poi.util.TempFile$DefaultTempFileCreationStrategy.createTempFile(TempFile.java:105)
    at org.apache.poi.util.TempFile.createTempFile(TempFile.java:60)
    at org.apache.poi.openxml4j.opc.ZipPackage.closeImpl(ZipPackage.java:347)
    at org.apache.poi.openxml4j.opc.OPCPackage.close(OPCPackage.java:426)


We found changes in ZipPackage.closeImpl():

poi-ooxml 3.10-FINAL:
org.apache.poi.openxml4j.opc.ZipPackage.closeImpl()
line 343:  File tempFile =
File.createTempFile(generateTempFileName(FileHelper.getDirectory(targetFile)),
".tmp");

o poi-ooxml 3.12:
org.apache.poi.openxml4j.opc.ZipPackage.closeImpl()
line 347:   File tempFile =
TempFile.createTempFile(generateTempFileName(FileHelper.getDirectory(targetFile)),
".tmp");

In TempFile.createTempFile method temp files are creating in 'poifiles'
subdirectory, which is marked with "deleteOnExit".

When multiple applications in same computer are running simultaneously, some of
them began failing.

We tried to set system property "poi.keep.tmp.files" values where possible, but
we are still getting failures...

Our recommendations:
a) not to try delete poifiles temp files directory that is used by multiple
applications with poi integration; or
b) create random poifilesxxxx temp files subdirectories for each application
with poi integration.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57947] "No such file or directory" after upgrade to poi-ooxml 3.12

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEEDINFO                    |RESOLVED

--- Comment #3 from Dominik Stadler <do...@gmx.at> ---
I am closing this as duplicate of bug 57200, we likely will not remove the
poifiles directory in the future to avoid these types of problems when multiple
applications are running in parallel.

*** This bug has been marked as a duplicate of bug 57200 ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57947] "No such file or directory" after upgrade to poi-ooxml 3.12

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

--- Comment #2 from htung@palantir.com ---
Should this be fused with #57200 as duplicate?  This bug makes it clear that
the problem extends beyond the SXSSF component, but it's almost certainly the
same bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57947] "No such file or directory" after upgrade to poi-ooxml 3.12

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
The poi.keep.tmp.files property should prevent POI from cleaning those files
completely, so it is strange that it does not solve the problem completely for
you. Either some other process is removing this directory on your setup, e.g.
temp-file-cleanup scripts or there are still POI-related processes running
without that system property being set.

In addition, according to how the deleteOnExit-hook in the JVM is implemented
and the javadoc of File.delete(), it should suffice to put an unrelated file
into the poifiles-directory to prevent it from being removed. Can you try if
that is a workaround in your case?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57947] "No such file or directory" after upgrade to poi-ooxml 3.12

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression

-- 
You are receiving this mail because:
You are the assignee for the bug.

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