• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ConnectorJ and MySQL4.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ConnectorJ and MySQL4.1


  • Subject: Re: ConnectorJ and MySQL4.1
  • From: Riccardo De Menna <email@hidden>
  • Date: Wed, 10 Aug 2005 08:59:37 +0200

Hi guys,

I'm not sure if I can be of any help, but I had simillar problems even if not related to a connector-J upgrade. In the end they where all related to my wrong understanding of how to implement UTF-8 encoding and some ambiguous data in my db.
In particular I had thousands of crashes with "can't update row in db" because of a series of null values in date fields. My db had come from openbase first, frontbase after and via a text dump had finally arrived to mysql. You can immagine every one of these has it's own way of treating things so no surprise when I found out that null dates are often different from db to db.
Anyway, the connector-J option zeroDateTimeBehavior=convertToNull saved my ....


Further on, a good way to find out what's wrong is an old style test and trial method I did use as well. Turn on adaptor logging adding - EOAdaptorDebugEnabled YES to your executable. Reach the place where the error occurs and note down the sql line that causes the crash. Then access your db via a manual sql client of some sort and try the line. Remove one after the other, all the fields till you get the line working and you'll know who is the culprit. Usually all these errors are caused by some unexpected type casting/coercion/conversion done by java or the db itself. In the end, any value you give in a way and get back in a different way could be a problem and in most cases, you don't need to optimisticly lock ALL the fields of a db.

Finally about special characters... I have no experience with cyrillic as the most strange thing I deal with are the various italian accents, but it took ages before I did really understand how to correctly implement utf8 encoding.
Someone posted the following link on this list: http:// wodev.spearway.com/cgi-bin/WebObjects/WODev.woa/2/wa/Main? wosid=false&wikiPage=InternationalCharacters ... I'll never be grateful enough :-)


If it can be of any help, my connection string for connector-J is:
jdbc:mysql://localhost/dbname? capitalizeTypeNames=true&zeroDateTimeBehavior=convertToNull&useUnicode=t rue&characterEncoding=UTF-8


I hope anyone of these things can help you fixing your problem...

Regards,
Riccardo De Menna

On 9 ago 2005, at 16:45, Müller, Michael wrote:

Do you mind asking them if they use special dictionary attributes
(like useUnicode, characterEncoding or useOldUTFBehavior)?


They don't use any special attributes, just a plain mySQL-JDBC-URL without parameters. I've been told that accented and special characters like the Euro character "just work" now again since they just changed the jdbc driver to the alpha version.

Cheers,--micha

--
-----------------------------------------------------
Michael Müller, Dipl.-Math. (mailto:email@hidden)
Projektleiter, Condat AG
Alt-Moabit 91 D, D-10559 Berlin
Fon: +49.30.3949-1227; Fax: +49.30.3949-1300
http://www.condat.de/



-----Original Message-----
From: Dev WO [mailto:email@hidden]
Sent: Tuesday, August 09, 2005 1:35 PM
To: Müller, Michael
Cc: WebObjects Development
Subject: Re: ConnectorJ and MySQL4.1


Thanks a lot Michael, I'll try that:) Do you mind asking them if they use special dictionary attributes (like useUnicode, characterEncoding or useOldUTFBehavior)?

Thanks again

Xavier




Hi Xavier,



-MySQL 4.1.13 Debug (the installer of the standard version just
didn't work)
-Connector/J 3.1.10, not the "g" one (mysql-connector-java-3.1.10-
bin.jar)



Colleagues of mine experienced the same issue with a similar setup as yours. Today, they reported that they have "fixed" it for the time being just by upgrading their jdbc driver to the current alpha version (mysql-connector-java-3.2.0-alpha-bin.jar). I don't know when there will be the stable version of it,

but at least

we know there will be a solution for use in production in the
future. ;)

HTH
Cheers,--micha

--
-----------------------------------------------------
Michael Müller, Dipl.-Math. (mailto:email@hidden)
Projektleiter, Condat AG
Alt-Moabit 91 D, D-10559 Berlin
Fon: +49.30.3949-1227; Fax: +49.30.3949-1300
http://www.condat.de/




-----Original Message-----
From: Dev WO [mailto:email@hidden]
Sent: Monday, August 08, 2005 6:32 PM
To: WebObjects Development; WO-Dev (Omni)
Subject: ConnectorJ and MySQL4.1


Hi list, I really can't believe I'm the only one with this issue in

fact, but

debugging it may help someone soon as it must happen...
So far I'm still having issues related to the migration, so as I
don't want to keep posting all the time about this, I'll try
to be as
clear as I can.
I installed a MySQL 4.1.13 on my local machine to try to figure out
what was wrong.
In fact the previous trick about using the

"useOldUTF8Behavior=true"

wasn't good enough as the adminitration application crashes
everytime
I try to update a row (and even adding one).
I red the debugging of jdbc connection from Chuck's book, but I
couldn't figure out...In fact I even tried to put the jdbc

connector

in /Library/WebObjects/Extensions, but then EOModeler

would complain

about having no driver in the classpath...
So here's my setup:
-MySQL 4.1.13 Debug (the installer of the standard version just
didn't work)
-Connector/J 3.1.10, not the "g" one (mysql-connector-java-3.1.10-
bin.jar)
-Latest WO and Xcode 2.1

Here's the previous setup that worked:
-MySQL 4.0.x
-Connector/J 3.1.8 (mysql-connector-java-3.1.8-bin.jar) with the
following values "useUnicode=true&characterEncoding=utf8"
-Latest WO and Xcode 2.1

My first question would be: should I use this version of the
connector/J?
My second question would be: anyone with this setup (or something
with MySQL 4.1.x) with accentuated characters (UTF-8) that works?

Thanks for your support... I can't believe I wasted one more day on
this and it's still not fix...I still don't even know if

the problem

comes from the data (MySQL) or the connector:(

Xavier

PS: and sorry for so many post relating to this... next ones next
year with Leopard;)
 _______________________________________________
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







_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
michael.mueller@cond
at.de


This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
web.com


This email sent to email@hidden




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: ConnectorJ and MySQL4.1
      • From: Dev WO <email@hidden>
References: 
 >RE: ConnectorJ and MySQL4.1 (From: "Müller, Michael" <email@hidden>)

  • Prev by Date: Re: Inheriting from EO Generated Classes
  • Next by Date: Re: ConnectorJ and MySQL4.1
  • Previous by thread: RE: ConnectorJ and MySQL4.1
  • Next by thread: Re: ConnectorJ and MySQL4.1
  • Index(es):
    • Date
    • Thread