In my Android application I have to insert data into several SQLite tables from different threads (one thread for insertion into one table and there are 5 tables). There are a lot of data so I use beginTransaction() -> setTransactionSuccessful() -> endTransaction(); in every thread and all the threads start simultaneously, but in second or sometimes third thread I always got this exception:

I use single SQLite connection (singleton) as was mentioned here but nevertheless this problem remains.So I hope for some help.Thanks in advance!
P.S And if I have race conditions what other way should I use for multithreaded insertion?