MFP 7.0 Java Adapter Build Error

1k Views Asked by At

I'm using MFP 7.0 Java based adapters and when I try to build, both through the CLI and Eclipse, I get the following error:

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.

I can build JavaScript based adapters just fine, this is only when trying to build Java adapters.

EDIT:

Here is the build error I get when using the MFP Studio plugin in Eclipse:

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 for our JavaSampleAdapterResource.java implementation.

2

There are 2 best solutions below

1
On BEST ANSWER

I was able to "fix" this issue by reinstalling both the CLI and eclipse plugin.

0
On

I got the same error for Mobile First version 7.1. After deep down debugging, I found out the root cause of it.

My mistake was, After the successful installation of MobileFirst 7.1, I moved my eclipse to new folder.

So whenever I tried to start the server or to deploy an adapter, I got this error The installation directory is not valid. Check that the path points to a Liberty profile runtime environment (e.g. /wlp).

I resolved the issue by following this steps :

  • In server section, Click to add a new server
  • Select WebSphere Application Server version x.x in IBM section.
  • Click on configure runtime environments
  • Select the first entry which says Mobile First Development Server
  • Click On Edit
  • Now In Path enter \plugins\com.worklight.worklight-artifacts_xxxx\liberty\wlp
  • Click On Finish
  • Now start your server.