如何授予Worklight Server访问MySQL(SQL适配器)的权限 [英] How to give Worklight Server access to MySQL (SQL adapter)

查看:72
本文介绍了如何授予Worklight Server访问MySQL(SQL适配器)的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Worklight应用程序从5.0.3迁移到5.0.6.

I'm migrating a worklight app from 5.0.3 to 5.0.6.

我尝试添加

mysql-connector-java-5.1.22-bin.jar **到worklight.war

mysql-connector-java-5.1.22-bin.jar** to worklight.war

文件,但出现以下错误:

过程调用错误.运行时:java.lang.ClassNotFoundException: 在Worklight平台或项目中找不到com.mysql.jdbc.Driver类 /worklight

Procedure invocation error. Runtime: java.lang.ClassNotFoundException: Class com.mysql.jdbc.Driver not found in Worklight platform or project /worklight

有任何解决方法吗?

推荐答案

为什么要使用.war文件?向您的问题添加更多信息:您是在Eclipse还是在应用程序服务器(Tomcat/Liberty/WAS)上运行Worklight?

Why to the .war file? Add more information to your question: are you running Worklight in Eclipse or on an application Server (Tomcat/Liberty/WAS)?

如果您使用的是Worklight Developer Edition(基本上是Eclipse的插件下载):

If you are using the Worklight Developer Edition (essentially plug-in download for Eclipse):

  • 您需要将mysql-connector-java-5.1.22-bin.jar放置到\ lib 项目的文件夹...位于:yourProject\server\lib.
  • 确保还更新适配器XML中的数据源定义:
  • You need to place mysql-connector-java-5.1.22-bin.jar to the \lib folder of your project... located at: yourProject\server\lib.
  • Make sure to also update the datasource definitions in the adapter XML:
<dataSourceDefinition>
    <driverClass>com.mysql.jdbc.Driver</driverClass>
    <url>jdbc:mysql://localhost:3306/mydb</url>
    <user>myUsername</user>
    <password>myPassword</password> 
</dataSourceDefinition>

如果通过将Worklight部署到应用服务器(Tomcat/Libery/WAS)来使用它,则上述操作还将更新位于yourProject\bin中的.war文件,您需要将其重新部署到您的应用服务器.

If you are using Worklight by deploying it to an Application Server (Tomcat/Libery/WAS), the above actions will also update the .war file, located in yourProject\bin, which you will need to redeploy to your application server.

这篇关于如何授予Worklight Server访问MySQL(SQL适配器)的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆