poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57947] New: "No such file or directory" after upgrade to poi-ooxml 3.12
Date Mon, 25 May 2015 08:49:23 GMT
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


Mime
View raw message