You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org> on 2012/05/25 13:03:23 UTC

[jira] [Created] (CXF-4342) NullPointerException in CachedOutputStream

Sergey Zhemzhitsky created CXF-4342:
---------------------------------------

             Summary: NullPointerException in CachedOutputStream
                 Key: CXF-4342
                 URL: https://issues.apache.org/jira/browse/CXF-4342
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.4.2
            Reporter: Sergey Zhemzhitsky


The following error occurs from time to time in the CachedOutputStream

{code}
java.lang.NullPointerException
        at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
        at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
{code}

The problem is in the following method
{code}
private void maybeDeleteTempFile(Object stream) {
    streamList.remove(stream);
    if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
        if (currentStream != null) {
            try {
                currentStream.close();
                postClose();
            } catch (Exception e) {
                //ignore
            }
        }
        tempFile.delete();
        tempFile = null;
        currentStream = new LoadingByteArrayOutputStream(1024);
        inmem = true;
    }
}
{code}

NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284210#comment-13284210 ] 

Sergey Zhemzhitsky commented on CXF-4342:
-----------------------------------------

Hi Daniel,

As I saw on the trunk only *deleteTempFile* is synchronized.
To be sure that all threads will see the modifications of *tempFile* I suppose all accesses to this field must be synchronized.

I've attached the patch that makes all reads and writes of *tempFile* synchronized.
                
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Gonçalo Rodrigues (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288449#comment-13288449 ] 

Gonçalo Rodrigues commented on CXF-4342:
----------------------------------------

Hi,

I've another problem that could be related to this issue. Sometimes (randomly) maybeDeleteTempFile is called before getInputStream that obviously returns me an empty stream ! I tried the attached patch but it didn't resolve my problem - but it happens less often. The finalize method (which calls maybeDeleteTempFile) is still called from time to time before the end of the process.

Regards.
                
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.3.11, 2.4.8, 2.5.4, 2.6.1
>
>         Attachments: CachedOutputStream.java.patch
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4342.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.11
                   2.4.8
                   2.5.4
                   2.6.1
         Assignee: Daniel Kulp


Hope I got this resolved.  Also found a situation where the temp file could be locked and then not deleted.  
                
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283618#comment-13283618 ] 

Sergey Zhemzhitsky edited comment on CXF-4342 at 5/27/12 6:53 PM:
------------------------------------------------------------------

Hi Daniel,

Thanks a lot. I will give it a try a little bit later.
                
      was (Author: szhemzhitsky):
    Hi Daniel,

Thanks a lot. I will give at a try a little bit later.
                  
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Zhemzhitsky updated CXF-4342:
------------------------------------

    Attachment: CachedOutputStream.java.patch
    
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>         Attachments: CachedOutputStream.java.patch
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Sergey Zhemzhitsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283618#comment-13283618 ] 

Sergey Zhemzhitsky commented on CXF-4342:
-----------------------------------------

Hi Daniel,

Thanks a lot. I will give at a try a little bit later.
                
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4342) NullPointerException in CachedOutputStream

Posted by "Gonçalo Rodrigues (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gonçalo Rodrigues updated CXF-4342:
-----------------------------------

    Comment: was deleted

(was: Hi,

I've another problem that could be related to this issue. Sometimes (randomly) maybeDeleteTempFile is called before getInputStream that obviously returns me an empty stream ! I tried the attached patch but it didn't resolve my problem - but it happens less often. The finalize method (which calls maybeDeleteTempFile) is still called from time to time before the end of the process.

Regards.)
    
> NullPointerException in CachedOutputStream
> ------------------------------------------
>
>                 Key: CXF-4342
>                 URL: https://issues.apache.org/jira/browse/CXF-4342
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Sergey Zhemzhitsky
>            Assignee: Daniel Kulp
>             Fix For: 2.3.11, 2.4.8, 2.5.4, 2.6.1
>
>         Attachments: CachedOutputStream.java.patch
>
>
> The following error occurs from time to time in the CachedOutputStream
> {code}
> java.lang.NullPointerException
>         at org.apache.cxf.io.CachedOutputStream.maybeDeleteTempFile(CachedOutputStream.java:487)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:187)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1561)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1494)[85:org.apache.cxf.bundle:2.4.2]
>         at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[85:org.apache.cxf.bundle:2.4.2]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
>         at java.lang.Thread.run(Thread.java:662)[:1.6.0_29]
> {code}
> The problem is in the following method
> {code}
> private void maybeDeleteTempFile(Object stream) {
>     streamList.remove(stream);
>     if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile) {
>         if (currentStream != null) {
>             try {
>                 currentStream.close();
>                 postClose();
>             } catch (Exception e) {
>                 //ignore
>             }
>         }
>         tempFile.delete();
>         tempFile = null;
>         currentStream = new LoadingByteArrayOutputStream(1024);
>         inmem = true;
>     }
> }
> {code}
> NPE occurs executing the following code *tempFile.delete();*, so we can conclude that exception is connected with multithreading because before deleting the file there is a check *tempFile != null*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira