Cleanup is a problem when there is multiple instances of the driver used in the same JVM
In Logstash (an OS ETL application) we have JDBC inputs.
If a user supplied configuration (a DSL based text file) has multiple JDBC inputs using SQLite, then the last input that initialises deletes the .so files from java.io.tmpdir before it does. This causes the previous inputs to fail.
We have told our users that they can't do this. Any extra inputs will have have to be run in another Logstash instance and hence another JVM.
This is a hard problem to solve. I am simply registering this in the hope that you might have a solution when you next look at that piece of the code.
I prefer to remove this cleanup() phase to make sure it works. Though removing this will create lot of garbage files in tmp directory.
Can you use a -Dsqlite_disable_cleanup=true custom property to indicate that the user does not want cleaning? We can get our user to set that in our JVM startup options.
Is this still happening on the latest version?