javamavenibm-mobilefirstmobilefirst-adapters

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.


Solution

  • 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).


    e.g. myAdapter.zip should contain adapter->adapterPakcage->myAdapter.adapter