Worklight fails to install customization jar - ibm-mobilefirst

I have three projects in my workspace, two deploy to the server correctly, the third has just begun to give this error:
Failed to install and start project customization from file <path>MyProj-customization.jar
I've seen this before on other projects and usually it's sufficient to start the server for another project and come back to the one with problems. When that doesn't work the next recipe (found on developer works) is
Exit Eclipse/Worklight Studio
Delete <workspace>/WorkLightServerHome
delete project bin
Start Studio, rebuild
That also doesn't work. Finally there's a further recipe on developer works
When Eclipse is not running, go to:
1. <path-to-your-Eclipse-folder>\configuration\org.eclipse.osgi
2. Delete the .bundle* files
3. Start Eclipse
4. Build and deploy
Again this does not clear the problem, assuming I've understood step 2 correctly, I found exactly one file whose name is of the form .bundle* and a bundles directory with several sub-directories. I deleted only the .bundlexxx file.
Any other suggestions?
I would have expected that creating a new workspace would fix it, but on this occasion no such luck.
No true solution on this occasion. Normally a new workspace as a method of last resot has always worked in the past. In this case I found no alternative to reinstallation of Worklight.

In addition to the attempts you have tried, also try creating a new workspace and import the 'offending' project to it.
If all fails, have a new instance of Eclipse (Java EE, 4.2.2 SR2), re-install Worklight Studio and import the project.

Related

TFPT Resolve Third-party merge was not successful. How does one ensure that a merge tool will be launched?

On my first company PC we first installed VS2015, and then later installed VS2019, and eventually VS2022
On that PC we could always merge a shelveset into a new branch successfully, sometimes you end up having to click "Resolve...\Keep my local changes, and merge the local and shelved contents."
This would launch whatever tool had been configured with the TFS Source Control Plugin, previously I had configured it to launch my own .cmd file which I used so that I could easily swap between merge tools without going into the plugin configuration.
We were then given a laptop, and by this time we no longer needed VS2015.
Initially to get TFPT to recognise the workspace configured in TFS we had to run TF.EXE workspaces /s:TFSURL, and from that point TFPT was able to discover the workspace settings.
Now when I try and launch the third-party merge tool it doesn't even attempt to launch it as far as i can see. I put some logging in the .cmd file and it doesn't get output so I am doubtful it has attempted to launch it.
The command I'm running is tfpt unshelve /migrate /source:"$/v22.4" /target:"$/v23.1" "WIP"
From time to time, I have seen it launch the third party tool, but I didn't change anything between the times it wasn't working, and when it wasn't.
Does anyone know any troubleshooting steps I can follow to make the third party tool launch. Removing the customisation hasn't resulted in the merge tool inside Visual Studio

How can installed packages of a Python project in Pycharm IDE be used in every new Projects

Hello from the other side,
Python file on pycharm
I pip installed some packages using pycharm terminal: mysql connector, pymysql, pillow, etc needed for my programmes.
I have created some Python files and imported mysql connector, pymysql, PIL, etc and my codes worked fine.
Recently I tried creating a new python file in a new project, when I tried to import mysql connector and pymysql, my codes get red underline, notifying me that the imported modules can't be found.
These are the same packages I imported in my previous files and they worked fine.
So why are they turning red underline and greyed out now?
Do I need to be pip installing these packages for every new project?
I tried to see how I could resolve this by making some researches and asking some friends. I was advised to go to the settings and try to create a new environment with the installed packages of my choice, and then checking the boxes for global inheritance and making it available for other projects.
After this, the OK button was inactive (greyed), so I couldnt apply this change. I discovered I was notified that the enviroment rowbox wasnt empty and that I should use a new virtual environment which is empty but I really don't know how to create this.
Please if you've encountered something like this before or can assist, kindly give me a step-by-step approach.
Open File -> Settings
Select Project Interpreter than go to the gear wheel in the upper right corner and select add.
Use Virtual Environment, select your prefered base Interpreter in my case 3.6 and add the name for the virtual environment and where you want to store it
If you don't need to I would suggest to not inherit global site packages
But you should select make it available to other projects.
Confirm it.
Afterwards the virtual env should be selected in project interpreter if not select it from the list. Right beside the List you see a plus, you can use this to add new packages with python (doesn't work all the time for me -> then use terminal)
I really thank everyone who made effort to attempt my question. After much trial, I was able to resolve it and I will post how I resolved it step-by-step to enable others like me understand better.
First, when installing our Pycharm, a folder is automatically created for storing every project we shall be working on, this folder becomes the database of our projects. In most cases, folder is stored in our C:\drive.
Now, open your pycharm window (I mean your working template),
File ----> open (this diplays the folders in your drive) ----> select the folder for storing your Pycharm projects and click ok. NOTE: do not open this folder to show your projects, just click on it and click ok. There are some situations whereby the Pycharm projects folder is already displayed on our pycharm window, this is because we already chose it during our installation. In a case like this, no need trying to bring it to the Projects displayed in our window as it'd already be displayed in the Projects in our window.
Your Pycharm projects folder will then display in your pycharm window under Projects.
Click on the Pycharm projects folder under your Projects and it will be highlighted blue.
Go to settings ----> Project: (your pycharm projects folder will also show here)
By the right, select Project interpreter.
Do your normal installation of packages by clicking on the + sign at the right extreme (that is if you haven't installed any package before)
Then configure your environment setting by making sure the boxes for inheriting global site packages and making this available to other projects are checked.
When configuring your environment setting for the pycharm projects folder, the location path should also end with your pycharm projects folder\venv ; please do not include the name of any particular project in the location path as doing this will make these changes effective in only that particular project files.
Then click ok.
Whatever project your create under the Pycharm projects folder will then inherit every packages you've installed in the pycharm project settings.
I believe this will help those who have been having difficulty resolving this.

Is there a way to clear IBM MobileFirst Platform server Cache?

I'm working on an IBM MobileFirst Platform 7.1 project where there are many name value pairs in the worklight.properties file.
Say for example,
HOST_NAME = www.google.com
I access these variables form the MobileFirst adapter.
var hostName = WL.Server.configuration["HOST_NAME"]
There will be cases where I'll have to change the HOST_NAME in the worklight.properties to a different value. But sometimes, even after the value is changed in the worklight.properties file, they are not getting updated in the adapter.
Every time when I change the values I do the following,
Clean the project
Restart the server
Deploy the adapter again
Nothing seemed to change the value.
I suspect, the MobileFirst server caches the values and reuses the old values without updating the new ones. I say this because, I tried deleting the values in the worklight.properties file, and even tried deleting the file itself. Still the adapter was using the old value.
I tried deleting the MobileFirstServerConfig Folder in my workspace. Even that didn't work.
It would be great if someone could help me clear the cache or find a work around to this issue. Thanks in advance.
I kind of followed the above method but initially it didn't work.
But later I tried to follow these steps in this exact order and it seemed to work.
Stop Worklight Server.
Remove your project from Mobile First Development Server.
Go to the "bin" directory and remove your project war.
Clean and Build the entire workspace.
Start the server
Deploy the adapters
Run your app.
The worklight.properties file is embedded into the project runtime WAR file. So, if you change anything in worklight.properties, you must rebuild the WAR file and redeploy it. Based on your description, it sounds like you're only building the adapter (and not the app). At minimum, I would suggest to remove the runtime WAR file from the project "bin" directory (just to ensure that it gets rebuilt) and build all app environments. That should build / redeploy the WAR file and restart the server, and then what you're doing should work.
Here are the steps to follow:
1. If worklight server is up and running, stop it or restart your system.
2. Clear bin folder.
3. Do Clean Project and Build for enviournment.
4. Open Mobile first Console(Start server)
5. Deploy All adapters
6. Run your app.
If wlq or wl error is comming we can give an alert message 'test' in our main file where we have all the javascript files.

Installing KVM Broke Current asp.net vnext Web Project

I installed the KVM using command line and my web project in VS2015 preview broke not compiling, but if add a new web project all works fine, how do uninstall the KVM so I can get my old project working. In this video Scott mention the issue but no solution, please see link, the video mention the issue at the 8:00 minute
video
1: http://channel9.msdn.com/Series/Whats-New-with-ASPNET-5/05 I change the to use the default alias but that did not work
NuGet Settings
I believe your versions are out of sync. Check your project.json and make sure you are not using different versions. I found that when I had 1 dependency that used 3.0.0-* it upgraded to beta2 from beta1. All of my other dependencies had beta1 actually defined. (Ex: 1.0.0-beta1). If the beta2 assembly shares the same dependency as one of your assemblies using beta1 it will override the older version of the shared assembly that is being used and causes your older version to fail.
You can remove any KRE package by deleting it from c:\Users\<user>\.kre\packages\. If you want to remove KRE and KVM then remove both the .kre folder completely.
However, you don't have to remove it to use a different version. You can either use kvm use <version> or, from VS, select the target framework in the project properties.
I have similar issue and I solved it by following steps.
In NUget Package Manager I selected only one nuget.org ( Disable myget.org by unselecting it)
I goto C:\Users\<>.kre\alias directory. Here you will find default.txt and I replace default.txt value with KRE-CLR-x86.1.0.0-beta1 ( If you downloaded latest version of Kre then this file change and it create problem for VS 2015 Preview)
After this close your solution and open it again. If possible then open as Administrator.
I hope this works for you as well.

Error migrating Worklight 5.0.6 project to 6.1

I am receiving an error trying to upgrade my Worklight project from v5.0.6 to v6.1. I have done all of the pre-migration steps, including removing Tealeaf libraries from the project and adding the new analytics settings to the initOptions.js file.
During the migration, it fails in the step where it is trying to add Worklight Analytics properties to the Worklight properties file. I am getting the following error:
Migrator class com.worklight.upgrader.upgraders.ios.AppAddAnalyticsIPhonePlistXMLUpgrader has failed
Migrating the bcbst_mma_app_wl project from version 5.0.6 to version 6.1.0.0 has failed because Failed reading bcbstmmaappwlMmaIphone-Info.plist
I am not sure what is causing the issue. I thought it may be file permissions since I am using a copy of the actual 5.0.6 project, but the permissions look fine. I have been able to "successfully" migrate the project before by removing that plist file before the upgrade, but the upgrade complained that the file was missing, and it never really worked correctly.
I am using the Consumer edition of Worklight, in case that makes any difference.
EDIT I got the migration to work. I did a chmod 777 on all of the files in the directory and it worked. Not an ideal solution, but it worked. Thanks to #mikerott for pointing me in the right direction.
Are you using a Mac? Often importing projects with the "copy into workspace" checkbox checked will result in files being placed with the Mac "locked" file permission bit set.
Please find the bcbstmmaappwlMmaIphone-Info.plist file in Finder, right-click -> Get Info. See if the "Locked" checkbox is checked. If so, uncheck it and see if you encounter the same problem.
You may have to do this with multiple files.