Hi All! My gut feeling still tells me it is something related to concurrency/multithreading. As it occurs rarely, Alain can't you just start several threads in your java app/test which calls your event insert method in a loop as if there is a real event to handle? Maybe we can force the error to appear more frequently (well, or your database explodes, but nevertheless something will happen)...
Jens And I am really curious what the root cause might be Von meinem iPad gesendet Am 04.03.2013 um 12:12 schrieb Alain Becam <[email protected]>: > Hi Rainer, > I fully agree with you, it's a good idea to log and wait, as it seems very > hard to reproduce. Anyway it is not critical (it's an insert used for > statistic, so if the failure is rare that does not matter much). I will do > that and inform you if I get something (I am assuming you are as curious as > me to know what might happen?). > > I did not have time to used prepared statement yet, but I read about them and > looked at the example. But I was wondering if setting > PreparedStatementsEnabled to true is enough to get the prepared statement to > work with an insert or an update (I mean not preparing the statement at each > call), i.e. if I can still do at each call: > > rec.create(GeneralApp.db.T_SEARCH_TERMS_LOG); > rec.setValue(GeneralApp.db.T_SEARCH_TERMS_LOG.C_SEARCH_TERMS, searchTerms); > ... > rec.update(conn); > > Or if I have to prepare something first, then set some parameter at each > insert and do the update. That I could not find in the documentation (for the > query it is very clear from the examples). > > //Alain > > On 04/03/2013 09:49, Rainer Döbele wrote: >> Hi Alain, >> >> as far as I can tell we have not deliberately fixed this. >> As with most problems: if we cannot find a way to reproduce it - it will be >> almost impossible to fix. >> >> At the moment I cannot see, how a statement for Oracle without the TO_DATE() >> phrase can be generated at all. >> I.E. for the DATE_TIME type is should always look like this: >> TO_DATE('2013-03-03 14:22:33', 'YYYY-MM-DD HH24:MI:SS') >> >> What you can do: >> 1. subclass the DBDatabaseDriverOracle class >> 2. override getSQLDateTimeString, call the base implementation and log the >> result. You may even check for TO_DATE and set a breakpoint if it is missing. >> e.g.: >> @Override >> protected String getSQLDateTimeString(Object value, int sqlTemplate, int >> sqlPattern, int sqlCurrentDate) >> { >> String res = super.getSQLDateTimeString(value, sqlTemplate, >> sqlPattern, sqlCurrentDate); >> if (res.indexOf('TO_DATE'))<0) >> { >> log.warn("Something's wrong here: "+value); >> } >> return res; >> } >> >> I'd be curious to know if it even gets in there. >> >> Regards >> Rainer >> >> BTW: Have to tried with prepared statements yet? >>
