简体   繁体   English

示例IBM MFP Java适配器导致导入错误。 FWLSE2302E压缩内容格式错误

[英]Sample IBM MFP Java adapter causes an error on import. FWLSE2302E Malformed ziped content

After downloading the sample java adapter from the MobileFirst Operations console I tried to import it and received the following error: 从MobileFirst Operations控制台下载示例Java适配器后,我尝试导入它并收到以下错误:

FWLSE3051E: Invalid payload. FWLSE3051E:无效的负载。 See additional messages for details. 有关详细信息,请参见其他消息。

FWLSE2302E: Can't read the content: failed to extract data from the zip format. FWLSE2302E:无法读取内容:无法从zip格式提取数据。 Malformed ziped content. 压缩内容格式错误。

Steps to reproduce: 重现步骤:

  1. Navigate to your-mfpserver:9080/mfpconsole/index.html#/downloads#samples and click on the "Hello World" link under "Java Adapter Samples". 导航到your-mfpserver:9080 / mfpconsole / index.html#/ downloads#samples,然后单击“ Java适配器示例”下的“ Hello World”链接
  2. Save javaAdapter.zip to disk. 将javaAdapter.zip保存到磁盘。
  3. Navigate to your-mfpserver:9080/mfpconsole/index.html#/mfp/browseAdapters 导航到your-mfpserver:9080 / mfpconsole / index.html#/ mfp / browseAdapters
  4. Click "Actions"->"Import Adapter" 点击“操作”->“导入适配器”
  5. Click browse, choose the javaAdapter.zip you saved to your disk. 单击浏览,选择保存到磁盘的javaAdapter.zip。
  6. Click deploy. 单击部署。

We're using IBM MobileFirst Platform Foundation Operations Console Product version: 8.0.0.00-20170710-1834 我们正在使用IBM MobileFirst Platform Foundation Operations Console产品版本:8.0.0.00-20170710-1834

I'm just trying to get the simplest adapter to work, so I thought I'd start with "Hello World", then I discovered this doesn't even work. 我只是想让最简单的适配器工作,所以我以为我将从“ Hello World”开始,然后我发现这甚至行不通。 I was developing java adapters 6 months ago just fine and using maven to deploy or create an .adapter file. 6个月前,我正在开发Java适配器,并且使用maven部署或创建.adapter文件。 In the meantime, we upgraded versions of MFP and now it appears only a .zip file is acceptable, but I can't find a working example. 同时,我们升级了MFP的版本,现在看来只有.zip文件是可以接受的,但是我找不到有效的示例。

How can I resolve this issue? 我该如何解决这个问题? I wasn't responsible for the configuration or installation of MFP and don't know too much about it. 我不负责MFP的配置或安装,对此也不是很了解。

You can not upload zipped adapter file,you should deploy the .adapter file . 您无法上传压缩的适配器文件,应部署.adapter文件。 Follow below steps 遵循以下步骤

1.Unzip adapter and open in a terminal 2.run command 'mfpdev adapter build' 3.run 'mfpdev adapter deploy ' or you can deploy it via console Click "Actions"->"Import Adapter choose .adapter file . 1.解压适配器并在终端中打开2.运行命令“ mfpdev adapter build” 3.运行“ mfpdev adapter deploy”或可以通过控制台进行部署单击“操作”->“导入适配器,选择.adapter文件。

Please see here for more details 请在这里查看更多详细信息

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/quick-start/android/ https://mobilefirstplatform.ibmcloud.com/tutorials/zh-CN/foundation/8.0/quick-start/android/

The sample app needs to be built (a detail I overlooked when asking the above question) and a .adapter file needs to be created. 需要构建示例应用程序(当我问上述问题时,我忽略了一个细节),并且需要创建一个.adapter文件。

The larger issue is the Malformed ziped content. 更大的问题是压缩格式错误的内容。 (sic) error. (错误)错误。

Solve this by creating a directory named adapter containing a single directory named adapterPackage that contains only the .adapter file in it. 通过创建一个名为adapter的目录来解决此问题,该目录包含一个名为adapterPackage的目录,该目录中仅包含.adapter文件。 Then zip the contents and you can utilize the MobileFirst Operations Console to import this zip (Actions->Import Adapter). 然后压缩内容,您可以利用MobileFirst Operations Console导入该压缩文件(“操作”->“导入适配器”)。


eg myAdapter.zip should contain adapter->adapterPakcage->myAdapter.adapter 例如myAdapter.zip应包含adapter-> adapterPakcage-> myAdapter.adapter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM