简体   繁体   中英

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:

FWLSE3051E: Invalid payload. See additional messages for details.

FWLSE2302E: Can't read the content: failed to extract data from the zip format. 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".
  2. Save javaAdapter.zip to disk.
  3. Navigate to 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.
  6. Click deploy.

We're using IBM MobileFirst Platform Foundation Operations Console Product version: 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. I was developing java adapters 6 months ago just fine and using maven to deploy or create an .adapter file. 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.

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.

You can not upload zipped adapter file,you should deploy the .adapter file . 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 .

Please see here for more details

https://mobilefirstplatform.ibmcloud.com/tutorials/en/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.

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. Then zip the contents and you can utilize the MobileFirst Operations Console to import this zip (Actions->Import Adapter).


eg myAdapter.zip should contain adapter->adapterPakcage->myAdapter.adapter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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