0

I've just installed the version 7.1 of the MFP CLI on a Windows 10 VMware. JDK 1.8.0_92 is installed, and the JAVA_HOME env variable has been setup accordingly

Below is the error I get when trying the mfp start:

C:\Users\johan\Documents\Workspaces\MobileFirst\SampleHybridApp>mfp start -d
mobilefirst-cli verb cli process.argv=["C:\Program Files\IBM\MobileFirst-CLI\\IBMnode\node.exe","C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\bin\mobilefirst-cli.js","start","-d"]
mobilefirst-cli verb cli opts={"debug":true,"argv":{"remain":["start"],"cooked":["start","--debug"],"original":["start","-d"]}}
mobilefirst-cli verb cli mobilefirst@7.1.0.00.20160401-2108
mobilefirst-cli verb cli node@v0.10.36
Initializing MobileFirst Console.
mobilefirst-cli verb ant variables -Dworklight.server.install.dir=C:\Users\johan.ibm\mobilefirst\7.1.0.00.20160401-2103\server
mobilefirst-cli verb ant variables -Dworklight.port=10080
mobilefirst-cli verb ant variables -Dbasedir=C:\Users\johan\Documents\Workspaces\MobileFirst\SampleHybridApp mobilefirst-cli verb ant variables -Dworklight.jars.dir=C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib
mobilefirst-cli verb ant variables -Dworklight.ant.tools.dir=C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\ant-tools
mobilefirst-cli verb ant variables -Dworklight.hostname=192.168.1.33
mobilefirst-cli verb ant variables -file=C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml
mobilefirst-cli verb ant task build-WAR
Buildfile: C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml

build-WAR:
[echo] Building worklight WAR for project SampleHybridApp
[war-builder] Copied 5 empty directories to 4 empty directories under C:\Users\johan\Documents\Workspaces\MobileFirst\SampleHybridApp\bin\classes
[war-builder] Compiling 2 source files to C:\Users\johan\Documents\Workspaces\MobileFirst\SampleHybridApp\bin\classes
Error: build-WAR Failed Error:
BUILD FAILED
C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:153: Could not compile java classes. Make sure JAVA_HOME points to the JDK, and the classpath is correctly set.

Total time: 1 second
Error: The server start-up process failed.
mobilefirst-cli verb cli finish with mobilefirst start
mobilefirst-cli verb code 1

Other MFP CLI command seems to be working since I was able to add a WindowsPhone environment to my Hybrid app project...

Could someone please provide some help? Is the MFP CLI 7.1 supported on Windows 10?

Thanks

Environment variables

Johan Mereaux
  • 143
  • 11
  • 1. Provide your JAVA_HOME and your PATH to make sure JAVA_HOME is really there; 2. try with Java 1.7 – Idan Adar May 11 '16 at 17:17
  • @DoraC No it did not – Johan Mereaux May 12 '16 at 07:53
  • @IdanAdar I downgraded to Java7 and updated the env variables (please see the screenshot above). Still the same issue – Johan Mereaux May 12 '16 at 08:01
  • Can you try `mfp stop`, create a new hybrid app, and see if the issue still occurs? – DoraC May 12 '16 at 16:05
  • @DoraC I did as you advised. When run inside the new hybrid app folder, mfp start completes successfully. Any idea on what is wrong with the first app? Thanks – Johan Mereaux May 12 '16 at 16:22
  • @JohanMereaux probably the first time you tried building the app, it created a bad war file with Java 1.8 (I don't think this is supported in MFP 7.1). Perhaps if you remove the SampleHybridApp.war and rebuild it, it will generate a new war file. – DoraC May 12 '16 at 16:58
  • @DoraC I completely removed the .ibm folder inside my user directory, then I also deleted the bin folder inside my SampleHybridApp project. Next, I tried to issue a new mfp start inside the project, but it is still failing with the same error :-( – Johan Mereaux May 13 '16 at 07:16
  • @JohanMereaux can you remove all the *.wlapp files under `mobilefirst` and try it again? – DoraC May 13 '16 at 17:06
  • @DoraC: I noticed that the `mobilefirst` directory was missing from my project structure (the folder was not in the repo from which I pulled the project). Anyway, I added the folder to the repo and pulled again. There is nothing inside this mobilefirst folder, and the `mfp start` still gives the same error – Johan Mereaux May 17 '16 at 07:32
  • @JohanMereaux is this a sample app you downloaded? Can you link it so that I can try to reproduce the issue? – DoraC May 17 '16 at 22:04
  • @DoraC It is a sample app I have created from scratch. You can fetch it from here: [link](https://github.com/jmereaux/mfp-sample-hybridApp) – Johan Mereaux May 18 '16 at 08:29
  • @JohanMereaux I see the same issue now. since you are able to create a new hybrid app and start it from there, can you import your code into your new app? Not sure why this issue is happening. – DoraC May 18 '16 at 20:28
  • @DoraC Yes, this is what I ended up doing. I imported all the code into the newly created project and was finally able tu run the windows phone app on the simulator. Not sure what is wrong with the original project. Anyway, if you don't have any further idea, I guess we can consider the issue solved. Thanks for keeping investigating all along. – Johan Mereaux May 19 '16 at 09:17
  • @JohanMereaux ok that sounds good. Glad you got your app running :). – DoraC May 19 '16 at 15:16

1 Answers1

1

In MFP 7.1, JDK 1.8 is not supported. Please use JDK 1.7.

Run mfp stop and try creating a new hybrid app to see if the issue is still occurring.

You can also remove the .war file and start the server again and it will rebuild the war file.

DoraC
  • 332
  • 1
  • 5