an interesting lockRowComparingAttributes:
an interesting lockRowComparingAttributes:
- Subject: an interesting lockRowComparingAttributes:
- From: Johan Henselmans <email@hidden>
- Date: Wed, 2 Apr 2008 00:06:19 +0200
I have an interesting time with the following error:
Error:
com.webobjects.eoaccess.EOGeneralAdaptorException:
lockRowComparingAttributes -- com.webobjects.jdbcadaptor.JDBCChannel:
lock operation failed to select any rows
The situation:
I am using ERProtoypes and a Postgresql database (latest jdbc- plugin,
latest version of postgresql, latest version of postgresql.jar,
webobjects5.3.3 on Leopard).
Suddenly, after adding some attributes to a table the database (and
migrating from mysql to postgresql), I got the following error, while
using directToWeb to update some info in the database. The EOModel is
in a separate framework.
I suspected it had something to do with locking, as the error said
that the lock operation failed (don't you think this sentence could
come directly from a police investigation?)
To find out what the problem was, I unlocked all the suspected fields,
and then added them one by one.
So far so good. There were two fields that caused the problem, both
text fields in Postgresql SQL lingo, which I thought would be longText
in ERPrototypes. Other text fields did not give the problem. I then
removed the text that was in it, (still unlocked) and added text from
a field via copy and paste in a D2W app into the field, so that it
contains exactly the same info as the other fields.
Now I lock the field again, and once again, the error pops up.
I tried removing the prototype going from longText (String (RTRIM) -
String c) to just String -String S, no avail.
I know it's still fool's day, but why me?
Is there a debug option to turn on to get all the SQL information and
anything related out of the framework, or something I should look at?
Some of the EOMOdel info:
{
allowsNull = Y;
columnName = "confirmation_text";
name = confirmationText;
prototypeName = longText;
},
{
allowsNull = Y;
columnName = "duration_text";
name = durationText;
prototypeName = longText;
},
confirmationText lock creates error, durationText is fine.
In the lock section:
attributesUsedForLocking = (
amount,
amountOneExtra,
bankDetails,
conditionURL,
conditions,
confirmationText,
durationText,
[etc]
);
postgresql:
nidfhaarlem=# \d training;
Table "public.training"
Column | Type
| Modifiers
-------------------------+------------------------
+----------------------------------------------------
amount | numeric(18,2) |
amount_one_extra | numeric(18,2) |
bank_details | text |
condition_url | character varying(255) |
conditions | text |
confirmation_text | text |
duration_text | text |
[etc]
Indexes:
"training_pk" PRIMARY KEY, btree (show_id)
Regards,
Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6279159
_______________________________________________
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