数据库
首页 > 数据库> > mysql-Worklight中的.wlapp文件部署错误

mysql-Worklight中的.wlapp文件部署错误

作者:互联网

我正在将Worklight应用程序从Eclise中的开发环境迁移到Tomcat 7上的Testing环境,并且将MySQL作为Worklight数据库.

我按照@ Worklight Guide IBM Guide for setting up MySql for Worklight的说明进行操作.

通过Worklight Console进行部署时,该控制台可以毫无问题地部署适配器,但是在部署.wlapp文件时,会出现数据库错误:

[部署大小为4.5MB的.wlapp时出错]

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]

[部署大小为1.5 MB的iPhone的wlapp时发生错误]

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

解决方法:

该错误非常简单. .wlapp文件的部署失败,因为MySQL中属性max_allowed_pa​​cket的值太低(默认值为1MB).

您似乎已链接到MySQL指南,似乎错过了一些(重要)步骤.
请尝试以下说明:

>找到属于您的MySQL安装的文件my.ini
>在其中找到[mysqld]部分
>在部分名称下,粘贴以下内容:max_allowed_pa​​cket = 500M
>重新启动MySQL服务
>重新部署.wlapp文件

部署现在应该通过了.

标签:ibm-mobilefirst,mysql
来源: https://codeday.me/bug/20191013/1906134.html