axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferruh Zamangoer" <>
Subject AW: [jira] Commented: (AXIS-2181) After sending an Attachments the local File can not removed from the filesystem ==> cause File is locked by axis?
Date Mon, 22 Aug 2005 16:27:06 GMT
Hi Davanum, 

here is the code to delete the content after sending the attachment, I had
tried your suggestion it doesn't work.

public boolean registerContent(
        String pseudonym,
        String password,
        ContentInfo contentInfo)
        throws IllegalArgumentException, AuthenticationException
        boolean status                 = false;
        CopyOfCContentService contentService =

            	FileDataSource fds = new FileDataSource(new
                DataHandler contentHandler =
                    new DataHandler(fds

                status =
                catch(IOException io)
            catch (ProcessingException poe)
                return this.registerContent(pseudonym, password,
            catch (PermanentException pe)
            catch (IllegalArgumentException ia)
                throw ia;
            catch (AuthenticationException ae)
                throw ae;
            catch (RemoteException re)
                return this.registerContent(pseudonym, password,
        return status;


-----Urspr√ľngliche Nachricht-----
Von: Davanum Srinivas (JIRA) [] 
Gesendet: Sonntag, 21. August 2005 05:05
Betreff: [jira] Commented: (AXIS-2181) After sending an Attachments the
local File can not removed from the filesystem ==> cause File is locked by


Davanum Srinivas commented on AXIS-2181:

can't recreate the problem. could you please try closing the inputstream of
fds (fds.getInputStream())? lowering the priority on this.

-- dims

> After sending an Attachments the local File can not removed from the
filesystem ==> cause File is locked by axis?
>          Key: AXIS-2181
>          URL:
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2
>  Environment: Client: Windows 2000, PIII 800 MHz, 512 MB RAM.
> Server Windows 2003 Server, 512 MB.
>     Reporter: Ferruh Zamangoer
>     Priority: Blocker

> Hi, 
> we are using AXIS WS to send some MP3 files to an server where we register
these files. The problem which occurred in our scenario is that after we
have send the file we want to delete the local file on the filesystem. But
we can?t delete the file because anything references or blocks the file. We
have localized that the problem occurs in the part after the webservice
call. When we uncomment the the part of the call the removing works. For
sending our file as attachment we use the following code lines.
>                         boolean  status = ws.registerContent("trebun",
"password", ci); //call service
> 			System.out.println("status: " + status);
> 			File file = new
File("MP3/RENCBER_DEWRANO_10_ELE__WWW.MP3"); //delete file
> 			boolean deleteState = file.delete(); ==> error
occurs here?
> We cause for the error could be that a Stream are opened and not closed.
> FileDataSource fds = new FileDataSource(new File(filename));
>                 DataHandler contentHandler =
>                     new DataHandler(fds
>                         );
> The scenario can reproduced easily.
> 1. send and file to a server with attachment
> 2. After the Call of the webserice try to remove the local file without to
shutdown your app.
> We are using on the client side the following Java Version:
> java version "1.4.2_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
> Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message