SQLite Forum

SQLite temp file is removed but still kept by java process
Login
I think what people are trying to say is this:

We do not believe this is a bug in SQLite. No one is reporting such a problem, and given that SQLite is used in billions and billions of installations, it probably would have come up.

As a consequence of that, you should probably direct your question to the sqlite-jdbc team to see if they can help.

That being said, it certainly is possible that SQLite has some issue that no one but you has discovered up until now. Unfortunately, without a program that uses only the C API to reproduce the issue (not jdbc), it will be difficult or impossible to fix.

Please contact the jdbc project. It is very likely that they open files in the background as part of their jdbc to SQLite translation layer, and do not expect anyone to try to delete a file once it has been opened.

Note: https://github.com/xerial/sqlite-jdbc/issues/80 talks about deleting open files and jdbc not cooperating in some way. It was a simple Google search for "sqlite jdbc keeps deleted file open" and it was a few items from the top of the page. That does not mean it is exactly the cause of your problem, but it illustrates that other people have seen similar issues when using jdbc.

It is also possible that the fault is elsewhere, maybe some logic problem in your own code that you can't see at the moment. But I would check with the jdbc people next while continuing to review my own code.