1
votes

Failed to deploy application 'xxxx.wlapp'. : Data truncation: Incorrect datetime value: '' for column 'LAST_UPDATE_TIME' at row 1 {prepstmnt 24265963 INSERT INTO GADGETS (DISP_IN_GALLERY, LAST_UPDATE_TIME, NAME) VALUES (?, ?, ?) [params=(int) 1, (Timestamp) 2013-05-25 17:21:49.806, (String) xxxxxxxx]} [code=0, state=22001]

is coming for all .wlapp uploads in Worklight console. This is a Worklight war on Tomcat 7 and MySQL 5.6.

It seems from the error that the INSERT statement is trying to insert a value of datatype TIMESTAMP into a column that is of type datetime [LAST_UPDATE_TIME in gadgets table].

2
Have you tried with a clean database?Idan Adar
Yes. I deleted the WRKLGHT table and recreated it using the ** create-worklight-mysql.sql ** shipped with Worklight Server. I believe that is the right way to clean up ? Failed to deploy application 'jqmMultipageSite1-android-1.0.wlapp'. : Data truncation: Incorrect datetime value: '' for column 'LAST_UPDATE_TIME' at row 1 {prepstmnt 1028454292 INSERT INTO GADGETS (DISP_IN_GALLERY, LAST_UPDATE_TIME, NAME) VALUES (?, ?, ?) [params=(int) 1, (Timestamp) 2013-05-26 15:34:53.463, (String) jqmMultipageSite1]} [code=0, state=22001]Kapil S Raina
I meant WRKLGHT Schema instance.Kapil S Raina
@IdanAdar Is there any issues with WL 5.0.6 ? Now I get SQL errors while uploading Android application using the application center shipped with the server. [link]stackoverflow.com/questions/16785075/…Kapil S Raina

2 Answers

1
votes

As suggest in: Worklight Appcenter Application Android App upload SQL Error

Since IBM Worklight does not support MySQL 5.6, please install MySQL 5.1 or 5.5 (do not forget to edit my.ini with the max_allowed_packet change), and see if deployment passes.

0
votes

Please follow below steps.

  • Locate the file my.ini belonging to your MySQL installation In it, find the section [mysqld]
  • Under the section name, paste this: max_allowed_packet=500M if does not exist, Or if exist then increase the size by 500M.
  • Under the section name, paste this: innodb_log_buffer_size=30M if does not exist, Or if exist then increase the size by 30M.
  • Re-start the MySQL service
  • Re-deploy the .wlapp files
  • Deployment should now pass.