推送通知收到错误

时间:2013-04-11 02:23:14

标签: android push-notification ibm-mobilefirst

我已经下载了推送通知模块的示例应用程序(我基于push notifications sample app),当我启动worklight服务器时,我得到错误 " Class com.mysql.jdbc.Driver not found in Worklight bundles.",然后我导入“mysql- connector-java-5.1.24-bin.jar“并再次尝试启动worklight服务器,我有错误 " FWLSE4002E: Failed to connect to MYSQL database : Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) [2013-04-11 09:05:33] FWLST0011E: ====== Worklight Project module_07_05_NativeAPIForAndroidPush-project-customization failed to start: Connection refused: connect"

我尝试在谷歌搜索但没有得到答案,有人帮我解决这个问题吗?。

1 个答案:

答案 0 :(得分:0)

您需要将MySQL Connector / J文件放在server \ lib文件夹下。如果您打算使用MySQL,还需要使用MySQL设置更新worklight.properties。

您应该阅读Worklight入门材料,解释并演示where SQL adapter development and setup

连接到MySQL服务器并确保有Worklight数据库。还要确保有一个“Worklight”用户,并且该用户有权访问“Worklight”数据库。

还要确保在适配器的XML中指定用户名和密码:

<dataSourceDefinition>
    <driverClass>com.mysql.jdbc.Driver</driverClass>
    <url>jdbc:mysql://localhost:3306/mydb</url>
    <user>myUsername</user>
    <password>myPassword</password> 
</dataSourceDefinition>
相关问题