Kapil S Raina
Kapil S Raina

Reputation: 27

Worklight wlapp deployment SQL error for GADGETS table on MYSQL

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].

Upvotes: 1

Views: 210

Answers (2)

Pulkit-aggarwal
Pulkit-aggarwal

Reputation: 101

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.

Upvotes: 0

Idan Adar
Idan Adar

Reputation: 44516

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.

Upvotes: 1

Related Questions