Please ignore previous mail. It contains some error due to the mail agent... a new mail will follow. tnx AF
> -----Original Message----- > From: Andrea Faustini [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 27, 2005 11:49 AM > To: Slide Users Mailing List > Subject: [Slide Client API] Cannot delete source file after > WebDavResource creation > > > I can reproduce this error only on Windows 2000. On Linux all works fine: > > My servlet runs on Tomcat and uses the Jakarta Slide Client API. > I created a WebDavResource using a File from local filesystem..... > > [CODE] > File fileSchema = getFile(theRequest.getInputStream()); > WebDavSchema webDav = new WebDavSchema(pathSchemaWeb, userWeb, > passwordWeb, > nameSchema,fileSchema); > > [/CODE] > > > > > > > > > > > The getFile Method comes from a perfectly-tested servlet.... > > [CODE] > public File getFile(InputStream theStream) throws Exception { > File file =3D File.createTempFile(SCHEMA, EXT_SCHEMA, new = > File(".")); > FileOutputStream fileOut =3D new FileOutputStream(file); > byte[] buffer =3D new byte[LEN_BUFFER]; > int byteRead; > while ( (byteRead =3D theStream.read(buffer, 0, buffer.length)) !=3D > =-1) { > fileOut.write(buffer, 0, byteRead); > } > fileOut.close(); > return file; > } > [/CODE] > > > > > > > > > > WebDavSchema is the following.... > > [CODE] > public WebDavSchema(String theUrl, String theUser, String thePassword, > String theNameSchema, File theSchema) { > HttpURL hrl = new HttpURL(theUrl); > hrl.setUserinfo(theUser, thePassword); > WebdavResource wdr = new WebdavResource(hrl); > wdr.putMethod( (wdr.getPath() + "/" + theNameSchema), theSchema); > wdr.close(); > } > [/CODE] > > > > > > > > > > > > The file on WebDav was succesfully wrote, but i cannot delete the > temporary > File 'fileschema' ... > > [CODE] > boolean isWritable = fileSchema.canWrite(); > log_.debug("isWritable: " + isWritable); > boolean isDelete = fileSchema.delete(); > log_.debug("isDelete: " + isDelete); > [/CODE] > > > > > > > > > The debugger returns: > > isWritable = TRUE > isDelete = FALSE > > > > > > In fact file was'n't deleted ! > Any idea?!?!?!?!? > > All comments are welcome. > Thanks > AF > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.9.5/58 - Release Date: 25/07/2005 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.9.5/58 - Release Date: 25/07/2005 > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.9.5/58 - Release Date: 25/07/2005 > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.5/58 - Release Date: 25/07/2005 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]