Kapil S Raina
Kapil S Raina

Reputation: 27

.wlapp file deployment error in Worklight

I am migrating a Worklight application from my development environment in Eclise to a Testing environment on Tomcat 7, with MySQL as my Worklight database.

I followed the instructions given @ Worklight Guide and IBM Guide for setting up MySql for Worklight.

When deploying via Worklight Console, the console deploys adapters without a problem, but while deploying the .wlapp files, there is a DB error:

[ERROR while deploying .wlapp of size 4.5MB ]

Failed to deploy application 'XXXXXXXX.wlapp'. : Parameter of prepared statement which is set through mysql_send_long_data() is longer than 'max_allowed_packet' bytes {prepstmnt 940490894 INSERT INTO APP_SYNC_DATA (appDeployableKey, deployable, deployableHash, lastPersistentPropertyChange) VALUES (?, ?, ?, ?) [params=(String) jqmMultipageSite1-android-1.0, (InputStream) java.io.ByteArrayInputStream@5083c762, (String) 4acdb5054a0bd4ec908ad282bb95d183bbbdd217, (long) 1369395093111]} [code=1105, state=HY000]

[ ERROR while deploying wlapp for iPhone of size 1.5 MB ]

Failed to deploy application 'xxxxxxxxx.wlapp'. : Data truncation: Incorrect datetime value: '' for column 'LAST_UPDATE_TIME' at row 1 {prepstmnt 362762411 INSERT INTO GADGETS (DISP_IN_GALLERY, LAST_UPDATE_TIME, NAME) VALUES (?, ?, ?) [params=(int) 1, (Timestamp) 2013-05-24 17:10:06.322, (String) jqmMultipageSite1]} [code=0, state=22001

Upvotes: 1

Views: 814

Answers (1)

Idan Adar
Idan Adar

Reputation: 44516

The error is pretty much straight forward. The deployment of the .wlapp files fails because the value of the property max_allowed_packet in MySQL is too low (by default it is 1MB).

It seems like the MySQL guide you've linked to misses some (important) steps.
Try these instructions:

  1. Locate the file my.ini belonging to your MySQL installation
  2. In it, find the section [mysqld]
  3. Underneath the section name, paste this: max_allowed_packet=500M
  4. Re-start the MySQL service
  5. Re-deploy the .wlapp files

Deployment should now pass.

Upvotes: 1

Related Questions