Re: MySQL Connector/J 3.1.8 and EOGeneralAdaptorException on UPDATE
Re: MySQL Connector/J 3.1.8 and EOGeneralAdaptorException on UPDATE
- Subject: Re: MySQL Connector/J 3.1.8 and EOGeneralAdaptorException on UPDATE
- From: Denis Frolov <email@hidden>
- Date: Fri, 27 May 2005 13:13:19 +0400
on 5/26/05 7:46 PM, Arturo Perez at email@hidden wrote:
> Well, one thing is you probably don't want to use longtext as a locking
> attribute. This may cause performance problems similar to using a BLOB.
> That's one way to fix your exception.
>
> The fundamental cause may be an issue with how the encoding is being
> done. If MySQL is not good about using the canonical encoding method of
> UTF-8 there are some strings that can be encoded a few different (valid)
> ways with UTF-8.
Any ideas on how to debug this? I've searched mysql.com and tried different
configuration and connection options without luck...
> Denis Frolov wrote:
>
>> My setup:
>> WO 5.2.3
>> MySQL 4.1.12 (utf8 is used everywhere - database, connection url)
>> Connector/J 3.1.8
>>
>> I've just moved to the new version of Connector/J (3.1.8) and have come
>> across a problem that appears when I try to update an EO that has a String
>> attribute (corresponding to a MySQL longtext field without limit) with a
>> mixture of Russian and English letters. Another interesting observation is
>> that an exception occurs when the content of the field is long enough (e.g.
>> a couple of text passages) and doesn't occur when we have a combination of a
>> few Russian and English words. It also doesn't occur when we have no Russian
>> letters in field. The exception occurs with objects of different entities.
>>
>> I've searched the mysql.com but haven't found a solution. Has anyone used
>> this version of Connector/J with utf8? Switching back to Connector/J 3.0.15
>> solves the problem but this version seems to have a bug that we randomly get
>> and that is fixed in the latest recommended version.
>>
>> SQL:
>>
>> UPDATE leftcol_banner SET url = ? WHERE (_rowid = ? AND url = ? AND
>> is_blocked = ? AND dm_rule_id is NULL AND name_id = ? AND info_id = ? AND
>> priority = ? AND position = ? AND is_new_window = ? AND component_name is
>> NULL)" withBindings: 1:"????????test... test"(url), 2:4(rowid),
>> 3:"????????test...testtestteset"(url), 4:false(isBlocked), 5:24111(nameId),
>> 6:24112(infoId), 7:50(priority), 8:1(position), 9:false(isNewWindow)>
>>
>> NOTE: Question marks above in 1: and 3: are really russian letters (? appear
>> in log only). I guess, this strings (1: and 2: above) do not match the data
>> in DB and this causes an exception.
>>
>> EXCEPTION:
>>
>> com.webobjects.eoaccess.EOGeneralAdaptorException:
>> updateValuesInRowDescribedByQualifier --
>> com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in
>> database
>> at
>> com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContextInfor
>> mationAdded(EODatabaseContext.java:4676)
>> at
>> com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseContext.j
>> ava:6384)
>> at
>> com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContex
>> t(EOObjectStoreCoordinator.java:415)
>> at
>> com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:
>> 3165)
>> at er.extensions.ERXEC.saveChanges(ERXEC.java:467)
>>
>> ...
>>
>> ---
>> Denis Frolov
>> Media-agency DesignMaximum
>>
>> Tel: +7 863 2648211
>> Fax: +7 863 2645229
>> Web: http://www.demax.ru
>> Web: http://www.mactime.ru
>>
>>
>>
>> _______________________________________________
>> 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
>>
>
>
---
Denis Frolov
Media-agency DesignMaximum
Tel: +7 863 2648211
Fax: +7 863 2645229
Web: http://www.demax.ru
Web: http://www.mactime.ru
_______________________________________________
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