Hi Dirk,

 

 

Indeed, you’re absolutely right, this has nothing to do with basex, obviously some streams using the file are not cleaned up correctly in our java application. Sorry for bothering you…

 

 

Mit freundlichen Grüßen / With kind regards,

Julien Charon

 

Avitech GmbH

Engineering AxL

Tel.: +49 (0)7541/282-177

Fax: +49 (0)7541/282-199

e-mail: julien.charon@avitech.aero

________________________________________________

Avitech GmbH

Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany

Court Registration: Amtsgericht Ulm | HRB 728293

Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza

http://avitech.aero

 

This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

 

Von: Dirk Kirsten [mailto:dk@basex.org]
Gesendet: Freitag, 9. Oktober 2015 15:01
An: Julien Charon
Cc: basex-talk@mailman.uni-konstanz.de
Betreff: Re: [basex-talk] ADD command

 

Hello Julien,

you might have to include more details here what is not working with File.delete(). It does not really sound like a BaseX problem to me, as you can do what you want successfully using the GUI version. You are correct with your assumption that the file is copied (and stored in an internal format) when it is added to the database. The same thing should haben when you use BaseX emebedded in your java application.
Why File.delete() on your original XML data fails seems to me to be unrelated to BaseX (because it is just a file in the file system), maybe it is a permission problem?! However, as the original file isn't touched by BaseX and can't see a conflict here with BaseX.

Cheers
Dirk

On 10/09/2015 02:54 PM, Julien Charon wrote:

  Hi,

 

 

I have some trouble using the ADD command, but maybe I’m not understanding the command correctly.

We have a java application that runs basex (7.7) embedded. I’m using the Add class/command to add an XML file to the database. After that, I’d like to delete that XML file from the local file system because I assume it has somehow be imported or copied to my database. However, from within my java application, I am not able to delete the file (File.delete() will always return false and the file won’t be deleted).

I tried the same thing with basex GUI: create a DB, add multiple files, delete those files (while DB is still open), do some queries (which works fine), close the DB, reopen it, do some queries again (which still works fine).

Do I miss or misunderstand something? Do I need to release the XML file resource when using the java API?

Any help would be appreciated.

 

 

Mit freundlichen Grüßen / With kind regards,

Julien Charon

 

Avitech GmbH

Engineering AxL

Tel.: +49 (0)7541/282-177

Fax: +49 (0)7541/282-199

e-mail: julien.charon@avitech.aero

________________________________________________

Avitech GmbH

Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany

Court Registration: Amtsgericht Ulm | HRB 728293

Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza

http://avitech.aero

 

This message may contain confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

 



-- 
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22