Hi Gennady, As you suggested I put back the 3.2.0 connector, I also made sure to add com.mysql.jdbc.Driver into the Driver field of the connection wizard. Removed the useUnicode=true&characterEncoding=UTF-8 also has it should be using it anyway on 4.1.X. The database are also created using DEFAULT CHARSET=utf8.
So now it works perfectly on my development machine. But, there is a but: On my deployment machine: If I add a new item, not all fields are sent to the database like in the following log: --- evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "INSERT INTO ITEM(C_ITEM_DATEPOSTED, C_ITEM__PERF_COMMENT, C_ITEM_ISFROMHOME, C_ITEM_BIRTH, C_ITEM_IMAGE, C_ITEM_HARAS, C_ITEM_RACE_FID, C_ITEM_COMMENT, C_ITEM_PK, C_ITEM_DEATH, C_ITEM_TYPE_FID, C_ITEM_ROBE_FID, C_ITEM_DATEUPDATED, C_ITEM_SIRE, C_ITEM_FORSALE, C_ITEM_NAME) VALUES (?, ?, ?, NULL, NULL, ?, ?, ?, ?, NULL, ?, ?, NULL, NULL, ?, NULL)" withBindings: 1:2005-08-29 10:50:02(itemDatePosted), 2:"un commentaire perf"(itemPerformanceComment), 3:true(itemIsFromHome), 4:2(itemHarasFID), 5:24(itemRaceFID), 6:"un commentaire pr^?sentation"(itemComment), 7:35(itemPK), 8:5(itemTypeFID), 9:28(itemRobeFID), 10:true(itemForSale)> ---
And if I update a previous item, the same fields get nullify! --- evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE ITEM SET C_ITEM_FATHER_FID = NULL, C_ITEM_DATEUPDATED = ?, C_ITEM_SIRE = NULL, C_ITEM_BIRTH = NULL, C_ITEM_MOTHER_FID = NULL, C_ITEM_COMMENT = ?, C_ITEM_NAME = NULL WHERE (C_ITEM_PK = ? AND C_ITEM_DATEUPDATED = ? AND C_ITEM_IMAGE is NULL AND C_ITEM_ISFROMHOME = ? AND C_ITEM_BIRTH = ? AND C_ITEM_HARAS = ? AND C_ITEM_ROBE_FID = ? AND C_ITEM_TYPE_FID = ? AND C_ITEM_DEATH is NULLĀ AND C_ITEM_COMMENT = ? AND C_ITEM__PERF_COMMENT is NULL AND C_ITEM_FORSALE = ? AND C_ITEM_NAME = ? AND C_ITEM_MOTHER_FID = ? AND C_ITEM_RACE_FID = ? AND C_ITEM_SIRE = ? AND C_ITEM_FATHER_FID = ? AND C_ITEM_DATEPOSTED = ?)" withBindings: 1:2005-08-29 10:42:40(itemDateUpdated), 2:"H^?ra d'hurl'vent (1m... de B'nville^MUpd^?t^?"(itemComment), 3:12(itemPK), 4:2005-07-30 12:13:13(itemDateUpdated), 5:true(itemIsFromHome), 6:1995-04-10 00:00:00(itemBirthdate), 7:2(itemHarasFID), 8:24(itemRobeFID), 9:1(itemTypeFID), 10:"H^?ra d'hurl'vent (1m...ar Cap de B'nville^M"(itemComment), 11:false(itemForSale), 12:"H^?ra d'hurl'vent"(itemName), 13:5(itemMotherFID), 14:19(itemRaceFID), 15:"95 475 884 P"(itemSire), 16:11(itemFatherFID), 17:2005-07-30 12:07:08(itemDatePosted)> --- Can someone tell me why it would work on development and gets that behavior on deployment?
At least the connector/Database is corrected now (I'll make some tests using InnoDB instead of MyISAM), but I don't understand the behavior now, and I don't know where to look at...
What is very strange is that the text isn't crop to 255, but truncated by a couple characters whatever is length is ( when more than 255).
Someone mentioned a driver/adaptor problem...
I tried 3.1.10 and the 3.2.0 alpha, and it seems like the problem's still here...
Hello. I've bumped into the same problem with MySQL 4.1.13 and Connector/J 3.1.10 the problem was successfully solved switching to Connector/J 3.2.0. alpha Strange, that didn't work for you.
Am I right to remember that it was you who had problems with unicode characters? Maybe this problem is also concerned with unicode... It works with my configuration today. MySQL 4.1.13, Connector/J 3.2.0, Mac OS X 10.4.2, xCode 2.0 + WO 5.2.4 on Dev and WO 5.3 + xCode 2.1 on deployment. and the main thing: database on MySQL is created using "DEFAULT CHARACTER SET utf8".
Regards Gennady
|