Worklight Studio 和 Local Development,有时无法使用 Java 类,有时无法使用 HTML 文件

Worklight Studio and Local Development, sometimes unable to use Java classes, sometimes the HTML files

我们将 worklight studio 与 Eclipse Luna 结合使用。而且有时是Java适配器代码不会运行。从这个意义上说,我们引用的 Java 代码在适配器中不可用。

版本: 在 Java HotSpot(TM) 客户端 VM,版本 1.6 上启动 worklight (WebSphere Application Server 8.5.5.1/wlp-1.0.4.cl50120131011-1639)。0_18-b07 (en_US)

(我们使用的是来自 Eclipse Marketplace 的 Worklight 6.2 studio)

所以当我们尝试引用 Java 代码时,我们可能会看到这样的错误:

[错误] FWLSE0099E:调用过程 [project 类型错误:无法在对象 [Java 包 com.worklight.util.ServerUtils] 中调用 属性 getClientIpAddress。它不是一个函数,它是"object"。 (MyAdapter-impl.js#63)

此外,有时当我们在公共目录中进行 HTML 或 Java 脚本更改时,这些更改不会反映出来。

基本上,是否存在某种我们应该清理的 Worklight 缓存。我们从 bin 目录中删除 war 并尝试清理和重建,但未反映更改。

此外,有时我会使用 Worklight 控制台并以这种方式部署应用程序。我注意到我的应用程序的旧版本在那里。例如。当我查看日期时,它显示了上周的修订。该应用程序部署在哪里?我可以在控制台中删除旧版本吗?

[ERROR ] FWLSE0099E: An error occurred while invoking procedure [project TypeError: Cannot call property getClientIpAddress in object [JavaPackage com.worklight.util.ServerUtils]. It is not a function, it is "object". (MyAdapter-impl.js#63)

您可能需要检查以下内容:

  • Worklight adapter It is not a function, it is "object". error
  • ECMA TypeError calling Java class from Worklight adapter
  • Ecma Error: TypeError: Cannot call property
  • IBM Worklight 6.1 - "Ecma Error: TypeError: Cannot call property <function> in object"
  • 我还听说开始一个新项目可以解决这个问题。请注意,这更多地与 Eclipse 设置有关。

Also, sometimes when we make HTML or JavaScript changes in the common directory, those changes aren't reflected.

您是否在开发过程中使用多个不同版本的 Studio PC/Mac?无论哪种方式,请尝试以下操作。请注意,这在以后的版本中得到了改进。看看你是否可以升级...

尝试删除 wlBuildResources 文件夹。
在这里查看我的回答:IBM Worklight 6.1 - Failed re-generating the iPhone native folder

  1. 关闭 Eclipse
  2. 找到您的临时文件夹 (Windows, OS X)
  3. 删除 wlBuildResources 文件夹
  4. 打开 Eclipse
  5. 重建