.wlapp file deployment error in Worklight

与世无争的帅哥 提交于 2019-12-02 12:34:38

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/16734471/wlapp-file-deployment-error-in-worklight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!