• 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
Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1


  • Subject: Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1
  • From: Lars Sonchocky-Helldorf <email@hidden>
  • Date: Thu, 14 Jul 2011 19:23:23 +0200

Hi everybody!


When running one of our application on our staging server I get Database Exceptions like this:

Jul 14 16:57:23 PortalWonderTest[2100] DEBUG NSLog  -  === Begin Internal Transaction
Jul 14 16:57:23 PortalWonderTest[2100] DEBUG NSLog  -  evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE TERMIN SET mailToInterviewer = ? WHERE TERMINID = ?" withBindings: 1:2011-07-14 16:57:23(mailToInterviewer), 2:14478(terminid)>
Jul 14 16:57:23 PortalWonderTest[2100] INFO  er.transaction.adaptor.Exceptions  - Database Exception occured: com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE TERMIN SET mailToInterviewer = ? WHERE TERMINID = ?" withBindings: 1:2011-07-14 16:57:23(mailToInterviewer), 2:14478(terminid)>:
   Next exception:SQL Warning:22001 -- error code: 0 -- msg: Data truncation: Data truncated for column 'mailToInterviewer' at row 1
Jul 14 16:57:23 PortalWonderTest[2100] DEBUG NSLog  -  === Rollback Internal Transaction
Jul 14 16:57:23 PortalWonderTest[2100] ERROR er.extensions.appserver.ERXApplication  - Exception caught: java.lang.reflect.InvocationTargetException

full log here:

Attachment: Data truncation.log
Description: Binary data



The strange thing about this is that when I am trying to reproduce this locally I don't run into an Exception, the same SQL is generated and processed nicely. Also, if I run the SQL:

UPDATE TERMIN SET mailToInterviewer = '2011-07-14 16:57:23' WHERE TERMINID = '14478'

in Sequel Pro I get the expected result without any problems.


The column is of type DATE.


Previously, the attribute was defined like the following in the EOModel:

       {
            allowsNull = Y;
            columnName = mailToInterviewer;
            externalType = DATE;
            name = mailToInterviewer;
            prototypeName = creationDate;
        },

where creationDate was erroneously chosen as prototype:

        {
            allowsNull = Y;
            columnName = ERSTELLTAM;
            externalType = DATETIME;
            name = creationDate;
            valueClassName = NSCalendarDate;
        },

So I thought that the definition of creationDate as DATETIME conflicted with the column type DATE (and causes the truncation of "2011-07-14 16:57:23")

So I changed this to:

        {
            allowsNull = Y;
            className = "com.webobjects.foundation.NSTimestamp";
            columnName = mailToInterviewer;
            externalType = DATE;
            name = mailToInterviewer;
        },

but it still didn't work. Changing it to

        {
            allowsNull = Y;
            className = NSCalendarDate;
            columnName = mailToInterviewer;
            externalType = DATE;
            name = mailToInterviewer;
        },

like all the other date attributes in the model doesn't work either. As I said only on the staging and live machine. Everything of the above DID WORK on my development machine.



Has somebody any clues?


cheers,

	Lars

 _______________________________________________
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: Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1
      • From: David Holt <email@hidden>
    • Re: Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1
      • From: David Holt <email@hidden>
  • Prev by Date: Re: "You backtracked too far" error after closing AjaxModalDialog and clicking on a link on the page
  • Next by Date: Re: Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1
  • Previous by thread: Re: Occasional hang loading a particular large page
  • Next by thread: Re: Strange behavior of com.webobjects.jdbcadaptor.MySQLPlugIn: Data truncated for column 'mailToInterviewer' at row 1
  • Index(es):
    • Date
    • Thread