You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/14 22:57:51 UTC

[jira] Commented: (AXIS-1573) No error message when attachment temporary file cannot be created

The following comment has been added to this issue:

     Author: Davanum Srinivas
    Created: Thu, 14 Oct 2004 1:56 PM
       Body:
Any suggestions on how to fix this?
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1573?page=comments#action_54103

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1573

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1573
    Summary: No error message when attachment temporary file cannot be created
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Alex Karshakevich

    Created: Fri, 24 Sep 2004 1:14 PM
    Updated: Thu, 14 Oct 2004 1:56 PM
Environment: Current CVS Axis-j, Tomcat 5.0.27, Win2K, SOAP client is Axis 1.1

Description:
By default Axis saves attachments in temporary files in the default temp directory. If I forget to create this directory there will be no temp file created, and Axis will quietly lose the contents of the attachment.
If I create the temp directory everything works well.

The problematic method appears to be org.apache.axis.attachments.ManagedMemoryDataSource.flushToDisk() which only catches SecurityException.

After failing to create the temp file the attachment behaves incorrectly when I try to read from the DataHandler's input stream. In the call to ManagedMemoryDataSource.Instream.read(), memorybuflist is null (since content should be on disk), and diskCacheFile is null (since the file has not been created), it returns 0 as the number of bytes read instead of -1 or some exception.

In my particular case the attachment is a zipped file, and trying to call getNextEntry() causes an infinite loop as it tries to read the stream.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira