Re: Problem re-executing adaptor operations
Re: Problem re-executing adaptor operations
- Subject: Re: Problem re-executing adaptor operations
- From: Chuck Hill <email@hidden>
- Date: Thu, 18 Feb 2010 10:23:54 -0800
On Feb 18, 2010, at 8:20 AM, Jean-Francois Veillette wrote:
For no obvious reason, eof tries to save operations twice to the
bd, all within the same 'saveChanges'.
hand-crafted log reduction for simplicity (full log at the end) ...
"ReclRepresentantLegal"@13255337 expression took 3 ms: INSERT
INTO recl_representant_legal(pk) VALUES ( ?) withBindings:
1:4239[pk]
"ReclDossierReclamationLoi73_2009"@13255337 expression took 5 ms:
INSERT INTO recl_reclamation( pk) VALUES (?) withBindings:
18:815[pk]
"ReclEcritureG2"@13255337 expression took 2 ms: INSERT INTO
recl_ecriture_g2(pk) VALUES (?) withBindings: 5:11338[pk]
"ReclRepresentantLegal"@13255337 expression took 3 ms: INSERT
INTO recl_representant_legal(pk) VALUES ( ?) withBindings:
1:4239[pk]
com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression failed:
<com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression:
"INSERT INTO recl_reclamation(pk) VALUES (?)" withBindings:
18:815(pk)>:
It does look like it fails after the ReclEcritureG2 and try to
rerun the whole list of adaptor operations.
It might do that if it thought it lost connection to the database.
Does it open a new transaction?
I'm on WO5.3.x (latest), a recent checkout of Wonder, MS-SQLServer
08.00.2055, fresh copy of sqljdbc.jar.
Strange thing is that it does sometime work, when I run it in the
debugger, it sometimes get through. I have not found anything
different from a success-run and the usual failed-run other than
the time spent in the debugger.
Does anyone have any idea where it could come from ?
Any clue where I could look at ?
Can you look at the database log (not the EOF log from EOF) and see
if any errors are being returned?
The problem actually came from a hidden sql command.
Only hidden because my log was showing successuf sql request with
the entity and time something wonder does.
When Pascal figured out to log SQL before they where sent to the db,
I was able to debug and see which one failed. It was a problem with
some new tables.
Is there a way to 'raise' instead of 'swallow-and-retry' when there
is a db exception ?
It should raise already. Maybe this happens because of the "hidden
SQL command"? What exactly are you doing?
Is it a problem with my plugin ? the mssql jdbc adaptor ?
I have not seen this happen my MS SQL, but I may not have caused this
exact situation. It could be that the MS SQL adaptor is mis-
interpreting the database errors as a "lost database connection" error.
Are you doing anything in your code that is not simple, ordinary EOF?
Thanks Chuck for pointing me in the right direction,
You are most welcome. I am happy to hear that you figured this out.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden