Error: Cannot create a MobileFirst project within another project - ibm-mobilefirst

I am trying to create a project with mfp create (version 7.1) and i get the following error:
Error: Could not create MobileFirst Project.
Error: Cannot create a MobileFirst project within another project.
I have an older version of Worklight on the same machine. Anyone experienced this?

That is not what the error is saying.
Lets take the following scenario:
cd Desktop
mfp create myproject
cd myproject
mfp create myproject 2
You cannot create a project within a project.
That is what the error is saying. It's not related to any older installation.
If this is not your scenario. What is your scenario?

I have downgraded my node from 0.12 to 0.10.38 and this solved the problem. Not sure if this is the exact solution, but it fixed my problem. I have removed all the node_packages when i un-install node. Used brew to install 0.10.38.

Related

Failed to retrieve NativeApplicationBuilder when running IBM MobileFirst 6.3 CLI

We're trying to build our IBM MobileFirst project on version 6.3 via the command line and we always get a BUILD FAILED:
C:\Program Files\IBM\MobileFirst-CLI\mobilefirst-cli\node_modules\generator-worklight-server\lib\build.xml:341: Failed to retrieve NativeApplicationBuilder
What is NativeApplicationBuilder? Is it a Java thing, or something else?
Java Version being used is 1.7.0_80 64-Bit.
The error ended up being because there was no common folder and we are running a hybrid app. Since we use a preprocessing script to build the common folder, it hadn't been run yet. Since there was no common folder, it looked for something native to build which didn't exist either. Therefore, we got the error.
I should have looked closer into the build.xml file where it reported the error. It made sense after I saw that.

Unable to build apk using grunt build command

When I try to build apk for sample application in oracle JET using grunt command, I am getting below error.
Loading "Gruntfile.js" tasks...ERROR
Error: Cannot find module 'load-grunt-config'
jit-grunt: Plugin for the "grunt" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings
Warning: Task "grunt" failed. Use --force to continue.
Aborted due to warnings.
Done.
Since I new to this concept, I don't know what to map using static mapping
IDE:NetBeans 8.2
Java: 1.8.0_111
Oracle JET Supoort Version: 0.10.1
Can anyone help me to solve this issue?
Since you don't give much information to work with, please see the official documentation regarding Oracle JET and hybrid developemt: http://docs.oracle.com/middleware/jet230/jet/developer/GUID-C75CD8DC-5084-4831-BE1A-FFEE4EA8600C.htm#JETDG-GUID-C75CD8DC-5084-4831-BE1A-FFEE4EA8600C
Some required steps before trying to build.
Make sure you installed: grunt-cli, bower, cordova and the Android SDK
Did you scaffold an hybrid application using Yeoman?
ex: yo oraclejet:hybrid app --appname="Sample NavBar" --template=navbar --platform=android
What command (+ parameters) do you use to try and build your application?

How to Fix No MBean found for Worklight project?

I have a problem when deploying my Worklight project on the server . It shows the following Error Message :
FWLSE3041E: No MBean found for Worklight project 'MyProject'. Possibly the Worklight runtime web application for Worklight project 'MyProject' is not running. If it is running, use JConsole to inspect the available MBeans.
and when I tried to preview my application it showed this message :
SRVE0777E: Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized:420'
I had the same issue using Worklight 6.2 CLI, but recreating the project did not work.
One issue that I had was that worklight did not build a .war-file properly, so I copied the .war-file from a backup.
Edit: This happens regularly in our project now, and we have no idea why. We fix it by invoking any procedure, which makes it work until you restart the server. Worklight must be building something when invoking a procedure that it does not do when building.
I Solved The problem by creating a new Worklight Project and copied all my files , it works just fine :) I used Worklight 6.1 instead of 6.2
I solved this by fixing a recently created security test in
server/conf/authenticationConfig.xml
The problem was I mispelled the Realm name I previously defined.
I solved this problem by deleting the application from the worklight server and rebuild it.
Delete WorklightServerConfig folder in workspace and rebuild your application.
I was able to fix this in MobileFirst 7.0 (Fka Worklight) by opening the Servers view, Window -> Show View -> Servers. Then expanding the MobileFirst Development Server and right click on the project in question, chose delete.
Once you do that go back to the applications' directory in the "apps" directory and right click -> Run As -> Run On MobileFirst Development Server
This should rebuild and deploy the project on the server.
I solved the problem by using ibm jdk not open jdk. My solution is to make sure the env parameters are correct
export JAVA_HOME = $your_ibm_jdk
export PATH + $your_ibm_jdk/bin:$PATH
run java -version to make sure the setting work

Apache Cordova (3.4.0) CLI install on Windows

I am trying to install cordova, I do excatly what is said in the CLI tutorial here.
After creating a new App
cordova create hello com.example.hello HelloWorld
I list all platforms and see following:
Where is other platforms liks ios? Moreover, when I try
cordova platform add android
I get following error:
What I am doing wrong or what is wrong with the Cordova?
To work, this cordova command needs to use some programs located into your sdk/tools directory. You need also have installed apache ant.
Then you must add these directories into your PATH system variable:
Background:
let's assume you have installed your Android SDK to the c:\sdk\android directory
you have installed you Apache ant to the c:\tools\apache-ant directory
Then you must create two system variables:
ANDROID_HOME with the c:\sdk\android value
ANT_HOME with the c:\tools\apache-ant value
Finally, you must modify the PATH variable and add those two to the end of the PATH' value:
;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
NOTE: for those who uses Linux, the instruction differs a bit.
More documentation available here.

Cordova 2.1.0 not getting included in the project after install

I am creating an IOS app with cordova 2.1.0.
I installed cordova 2.1.0, by following the steps mentioned in http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iO
Now i made changes to files like AppDelegate.m, AppDelegate.h, etc. and www folder. When i see the physical folder structure in the project, the CordovaLib.xcodeproj does'nt get included in the project. Why is this happening? Why is it not getting included in the project. Every user will not download cordova and follow the steps.
Any help will be appreciated.
Thanks.
What do you mean by "user will not download". The developer (you) have to downlod it nd create the app. Cordova is packaged within your *.ip file.
If the cordov project is not oincluded, you will be unabvle to build. If you cn build it, it is included.
If you don't want to handle the complete xcode project stuff, use build.phonegap.com