I have been encountering a mysterious exception (mysterious to me) while using Poco's SQLite support, and Poco as my infrastructure as a general.
The program is running several threads that access an SQLite database very often and are synchronized by SQLite itself.
Everything seems to work just fine most of time (usually days - weeks) but I do get an occasional exception:
SQL Statement invalid: SQL error or missing database: Iterator Error: trying to check if there is a next value
The backtrace of these exceptions usually leads to very simple SQL statements such as:
session << "BEGIN IMMEDIATE", now;
session << "UPDATE
This specific code runs numerous times before an exception occurs (if occurs at all) and I cannot think of any reason for it to fail later rather than sooner.
It is pretty obvious that this situation occurs due to some rare thread state, but I could not find any information that gives me any hint as to what this state might be.
So what I am asking is:
1) Does anyone know why this sort of exception occurs?
2) Can anyone think of a reason for such an exception to occur in the situation I have described?
additional info:
1) I am usually beginning and committing my own transactions
2) I am using a different session for each thread (all are taken from the Poco::SessionPool)
3) the session is passed between functions as a reference.
Thanks in advance,
Nadav.





