1

您好 Worklight 团队和开发人员!

我们已经完成了我们的开发项目,并且在本地开发服务器(Tomcat)中一切正常。现在我们正在尝试构建要部署到测试 WAS ND 8.0.3 服务器的项目。我们一直在关注信息中心中的手册,并根据需要修改了每个必需的文件(worklight.properties 和 application-descriptor.xml)

我们对 worklight.properties 文件进行了以下更改:

publicWorkLightHostname=working.hostname.com
# http or https
publicWorkLightProtocol=http
# For default port leave empty
publicWorkLightPort=ourport
publicWorkLightContext=/worklight
wl.db.jndi.name=jdbc/WorklightDS
wl.db.type=DB2
wl.db.url=jdbc:db2:Worklight
wl.db.username=wluser
wl.db.password=passwd

我们在 WAS 控制台中测试了 jdbc 源代码,它运行良好。我们继续构建战争、适配器和 wlapp (ALL),我们得到这个错误:

[2013-05-21 12:48:44] FWLSE4001W: Failed to resolve JNDI name: "jdbc/WorklightDS".
Application may fail to access the database in runtime. If building for remote server - ignore this warning.
[2013-05-21 12:48:44] FWLST0011E: ====== Worklight Project BPMWorklight-project-customization failed to start: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
[2013-05-21 12:48:44]             Activation failed. Bundle didn't start:C:pathto\BPMWorklight-customization.jar

这发生在开发人员工作站中,如果我们在创建 jdbc 源的服务器中安装 Studio,也会发生同样的情况。我猜 Worklight 正在尝试在 TOMCAT 而不是 WAS 中“获取”一个 JDBC 源,但我们正在为 WAS 构建,因此构建失败并且错误后没有更改任何文件。NO BUILD 被执行。

我们还尝试在 Studio 中使用 ANT 执行 build.xml,但出现此错误:

Buildfile: C:\Users\Primary User\IBM\Worklight\LIS_SampleCollection\BPMWorklight\build.xml
BUILD FAILED
C:\Pathtofile\BPMWorklight\build.xml:3: Cannot find ../../common.xml imported from
C:\Pathtofile\BPMWorklight\build.xml

Total time: 62 milliseconds

非常感谢您的帮助!非常感谢!!

最好的,

尼古拉斯·E。

4

1 回答 1

1

如果您只需要在 WebSphere 中部署 updated-for-WAS .war 文件,则无需在 Worklight 中执行任何构建操作。更新 Worklight Studio(Eclipse 插件)中 server\ 文件夹下的任何文件后,将自动重新创建 .war 文件。

构建操作主要用于创建二进制文件并部署到 Worklight Server(数据库)(同样,当使用 Eclipse 插件时)。

所以我的建议是:

  1. 首先使用 worklightServerRootURL 中的上下文根值更新 application-descriptor.xml,并将 .wlapps 放在一边
  2. 更新 worklight.properties 并保存它们。

现在您已准备好部署应用程序,并且准备好部署 .war 文件。

  1. 移至 WAS,部署 .war 文件
  2. 希望现在一切正常,因此您可以加载 Worklight Console 并部署 .wlapp 和 .adapter 文件。

我不知道您在 IBM 信息中心读到了什么,但您也可以尝试查看 IBM Worklight Getting Started中的以下培训模块。


笔记:

  • 以上不是那么方便,但它是一种从您的开发环境转移到另一个暂存环境或应用程序服务器的方法......
  • 即使按照我的上述步骤,该问题也可能发生,这表明真正的问题出在 worklight.properties 中的 DB2 声明中。

明天我将更新这个答案,对可能的 DB2 声明问题有所了解。

于 2013-05-21T18:32:31.983 回答