Description
When calling transferTo and the renameTo method returns false, the current alternative in the code is very likely to throw a StackOverflowError or cause the JVM to run out of file handles.
Example stack trace:
17:12:40,776 ERROR [com.redhat.gss.mtom.HashServer] (http-/127.0.0.1:8080-1) : java.io.IOException: Cached file was deleted, java.io.FileNotFoundException: /tmp/cxf-tmp-747794/cos2503467255223534504tmp (Too many open files) at org.apache.cxf.io.CachedOutputStream.getInputStream(CachedOutputStream.java:546) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1] at org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1] at org.apache.cxf.helpers.IOUtils.transferTo(IOUtils.java:212) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1] at org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1] at org.apache.cxf.helpers.IOUtils.transferTo(IOUtils.java:212) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1] at org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
Attachments
Issue Links
- relates to
-
CXF-5489 Add 'transferTo' functionality to Attachments
- Closed