java - MFP 7.0 Java 适配器构建错误

标签 java ibm-mobilefirst mobilefirst-adapters mobilefirst-server mobilefirst-cli

我正在使用基于 Java 的 MFP 7.0 适配器,当我尝试通过 CLI 和 Eclipse 进行构建时,出现以下错误:

Error: 
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:133: The following error occurred while executing this line:
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:159: /wlp/dev does not exist.

我可以很好地构建基于 JavaScript 的适配器,这只是在尝试构建 Java 适配器时。

编辑:

这是我在 Eclipse 中使用 MFP Studio 插件时遇到的构建错误:

The installation directory is not valid. Check that the path points to a Liberty profile runtime environment (e.g. <path>/wlp).

Here's a gist对于我们的 JavaSampleAdapterResource.java 实现。

最佳答案

我在 Mobile First 7.1 版本中遇到了同样的错误。 经过深入调试,我找到了根本原因。

我的错误是,成功安装 MobileFirst 7.1 后,我将 eclipse 移至新文件夹。

因此,每当我尝试启动服务器或部署适配器时,都会收到此错误 安装目录无效。检查路径是否指向 Liberty 配置文件运行时环境(例如/wlp)。

我按照以下步骤解决了该问题:

  • 在服务器部分,点击添加新服务器
  • 在 IBM 部分中选择 WebSphere Application Server 版本 x.x。
  • 点击“配置运行时环境”
  • 选择第一个显示“Mobile First Development Server”的条目
  • 点击“编辑”
  • 现在在路径中输入\plugins\com.worklight.worklight-artifacts_xxxx\liberty\wlp
  • 点击“完成”
  • 现在启动您的服务器。

关于java - MFP 7.0 Java 适配器构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31014315/

相关文章:

java - 通过 MobileFirst Adapter 下载 PDF 文件

java - 从不同计算机启动时,6.0.0.CR1 infinispan 服务器集群未形成

java - 如何将现有的 Firefox 首选项导出到 WebDriver?

java - 异步任务android后返回JSON数据

java - Guice - 相同返回类型的多个提供者方法

java - IBM 移动第一 : Invoking adapter from Java- InvokeProcedure

android - IBM Worklight 使用多个 HTML 文件

java - MobileFirst APNS 推送通知失败并出现 java.net.SocketException(连接被远程主机关闭)

ibm-mobilefirst - Worklight JSONStore 拒绝某些用户密码,而不拒绝其他用户密码

javascript - IBM MobileFirst 7.0 - 适配器调用