Worklight Console can not be opened because the Worklight Server is not running - ibm-mobilefirst

I'm just getting started with some of the samples at the Getting Started site, working with the Developers Edition. Whenever I Open Worklight Console, the eclipse environment abends. I'm sure I missed a set up item, but all seemed to install well. I appreciate any help / direction. Thanks.
I tried to post an image of the error, but stackoverflow indicates I need 10 reputations to post an image. Go figure.
The first line is Java was started but returned exit code=8096
There are some hits on this indicating that the license may not be compatible with the Rational license installed. Not sure what to do with that.
There's another post indicating Environment Variable corruption, but I don't have the corrupt Temp environment variables indicated.

StackOverflow has a FAQ explaining what one can and cannot do and when. It makes sense. Read it.
Did you at least create a new Worklight project and application?
If you do that and run the application by right-clicking on the application in the project tree and choose Run As > Run on Worklight Development Server this will: start the server + build the app + deploy the app.
Then you can right-click on the project icon and choose Open Worklight Console and you will see the console...
So unless you have some errors preventing the server from loading, the above should work.
Host the image elsewhere, like imgur.com
Explain what you have installed in your Eclipse. Which Eclipse is it? Did you install only Worklight Studio, or another plug-in in addition? Which?
What are those "hits" you mention? Elaborate.
Searching for the exit code in Google, I see the following IBM tech notes:
http://www-01.ibm.com/support/docview.wss?uid=swg21303648
http://www-01.ibm.com/support/docview.wss?uid=swg21567836
http://www-01.ibm.com/support/docview.wss?uid=swg21627887
Perhaps one of them is relevant for you as well.

If you have followed Idan's advice to Run on Worklight Development Server and it is still not started, try this:
Switch to the Servers view (on the bottom pane of Eclipse by default).
Check your Worklight Development Server status
Right-click and select Clean...
Select OK when prompted to discard all publish start.
Redeploy your app using Run As > Run on Worklight Development Server
I am not sure if this would clean up your environment variable error message as I have not seen that one, but it has helped with several other errors that have caused my server to not start or run properly. (The most common one I get is an Out of Memory in the server.)

Related

ibm mobile first development server .. run as options missing sometimes.. unable to start application

Build and deploy settings are missing from ibm mobile first development server hybrid project.
After clicking on Run as(as in attachment) even from a newly created project..not finding any options. Unable to start application.
Please let me know why it is happening, if any have faced this error before. The image below shows that there's nothing in "Run As...".
Something is wrong with your installation.
Try again in a new Eclipse workspace.
If it fails as well, re-install the Studio plug-in in a fresh Eclipse instance.

Worklight Console does not show new changes to project -- seems to use original code

I am running Eclipse Luna 4.4.1 with Worklight Studio 6.2...
I have made changes to my Worklight project. For some reason, I cannot get these changes to be seen/previewed when opening in the Worklight Console...
I have made simple changes such as adding print (console.log) statements to see if these changes are making it out to the console... I have even removed design elements to see if I can get this preview to error out...
Here is what I do:
Highlight the app folder (the folder under the "apps" folder) and right-click
Select Run As > 2 Build All Environments
Once that is complete, I highlight the project folder (the topmost folder in the project) and right-click, selecting Open Worklight Console, which opens the console in Firefox
Click the Preview as Common Resources link in the Console
The "old" code/project runs -- no changes appear
I have tried Cleaning the project, closing and re-opening Eclipse, rebooting my machine, etc. but nothing seems to shake this up. Worklight seems to use the "old" code no matter what I do in Eclipse...
Is there a setting on Worklight I may be missing?
Starting Worklight 6.2 you do not need to either build or deploy your application in order to see changes made to web resources.
The following should suffice:
Create a Project and application
Run As > Run on Worklight Development Environment
Open console, view the application (keep this tab open)
In Eclipse, change some resource (image, CSS, HTML, JavaScript)
Return to the previously opened tab and refresh it
The change should be visible to you.
Something to try:
Close Eclipse
Open your TMPDIR and delete the wlBuildResources folder
Open Eclipse, try again
You can also try adding a mobile environment to your application; there are some reports this some times, show how, helps 'refreshing' the web resources used while previewing applications
You can also make sure you are using the very latest 6.2.0.01 iFix; there were preview-related fixes in the past. You can get it from IBM Fix Central website (assuming you are an IBM customer/business partner; for evaluation purposes you should download the latest available version, from the Eclipse Marketplace - v6.3)
Note that Run As > Build all environment does not actually deploy your modified web resources to the server, it only generates the .wlapp for later consumption elsewhere, so I suggest to follow my steps at the very top of this answer, by using Run As > Run on Worklight Development Server, and later on simply save (ctrl/cmd-s) and then go to the console to verify the changes are there.

Worklight console apps overwritten when same project name, but different contexts

I have a base app that I modify slightly for each customer. I have been using version control to switch between customers' versions in the same working directory and restart Eclipse. However, I now want to have multiple versions of the app next to each other (in separate directories). They all have the same app ids and adapter names, but different contexts.
The problem is, as soon as I deploy a second app, the first one gets overwritten by it. Say:
I deploy version 1, open it (common resources) -> it shows version 1.
I deploy version 2, open it -> it shows version 2.
I open version 1 again it -> it now shows version 2.
I presume it has something to do with the app names/id's being equal. I tried switching the Worklight Console DB from Derby to MySQL, but to no avail.
I'm not sure I've tried all possible combinations, but right now version 1 shows version 2 when I click on common resources and version 1 when I click on an actual environment.
This clearly seems to be a bug or a very obscure undocumented peculiarity, doesn't it? Any help with this?
Worklight Studio version is 6.2.0.00-20140918-1910.
I was finally able to reproduce the error in the question. It does appear to be an obscure bug indeed...
I see no workaround other than a restart of the server (a reboot of Eclipse is not required), via the Servers view > green "play" button.
My suggestion is to open a support ticket (PMR) to have this further investigated and possibly have a fix delivered.

Worklight Direct Update doesn't work when wlapp built outside of studio

We have a worklight i/OS hybrid application built and deployed to the worklight console using RTC jazz team build and the ant-builder ant tasks (6.1.0.1). The ipa packaging is done on a separate machine, though using the same level of Worklight Studio (6.1.0.1).
I've compared the wlapp files that are generated, and they are basically identical except for some whitespace characters (tabs, line feeds), probably due to the different environments (Windows vs AIX), and the following:
index.html
"WORKLIGHT_NATIVE_VERSION": "3921556017",
"WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140311-2356",
"WORKLIGHT_NATIVE_VERSION": "1475155033",
"WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140311-2356",
deployment.data
native=3921556017
native=1475155033
However, the direct update never happens when the wlapp is updated on the server.
on the WL.Client.connect call, the following json comes back as part of the response
gadgetProps":{"directUpdate":{},"ENVIRONMENT":"iphone"}
What are we missing here? What can be preventing the direct update from triggering?
Any help would be greatly appreciated.
The 6.1.0.1 iFix version 6.1.0.01.20140518-1532 from IBM Fix Central seems to have resolved this problem for us.
And what if you are not using ant, but rather built the project in Worklight Studio straight to Xcode from then install the .ipa and test Direct Update. Does it work?
From your question it is not clear whether or not you've confirmed one or the other.
Regardless, since the v6.1.0.1 build you are using, several Direct Update-related fixes were introduce; one with close proximity to the error you mention (directUpdate:{ }), so I suggest to to open a PMR in order to receive the latest available iFix (not yet available at IBM Fix Central).

Creating development and production environments?

currently all my application that is released is always release in production. However I would like that changed and also have a development side (For testing).
I've tried searching for steps on how to create a development server however I cannot seem to find a tutorial.
In the past I've seen someone release their application in development by having it in on "Debug" option and have it released in production by having it on the "release" option. (I apologize for the vagueness as it was along time ago since I saw it).
But anyways to my question, can someone tell me the general steps for creating a production and development environment for my project? I'm currently using winform application on VB (Microsoft visual Studio 2008)
Thanks for the help
Your development environment should be an exact copy of your production environment. Typically this means buying a duplicate set of hardware, duplicating a production disk, and running that on your local dev/test lan. From there, you can set visual studio up to do a few different things:
1) build > configuration manager > debug (or optionally the build menu bar) to be able to debug your application with your IDE
2) set up remote debugging to your new dev / test server - project > properties > debugging > change local windows debugger to remote windows debugger and fill out the blanks. You will also need to install msvsmon on the dev or test server.
3) copy your assemblies to the remote box - do this manually, OR - project > properties > build events > post build events > add a couple command line copies to get your exe and dlls over to your mapped server. Don't forget to use environment variables and macros to make your life easier.
4) finally press play like you probably used to do in the IDE, and you should see the application fire up on the remote box.
I'm not sure I entirely understand your question, but I believe that if you are trying to build a testing/staging server for testing your software prior to release, then this should be an exact copy (if possible) of your production server (this allows you to iron out any environment specific bugs).