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

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.

Related

com.ibm.worklight.admin.common.util.exceptions.TimeoutException

MobileFirst 6.3.0.00 Studio Plugin. Working in development server for Maximo Anywhere. Unable to deploy Adapter.
I am presented with "Adapter deployment failed: UndeclaredThrowableException" in the MobileFirstConsole.
I look at the MobielFirst Development Server and I see "CWWKX0204E: Unable to parse Throwable from server error stream".
Further down I see "java.lang.ClassNotFoundException: com.ibm.worklight.admin.common.util.exceptions.TimeoutException"
I have rebuilt the MobielFirstServerConfigFolder multiple times at the direction of others and this does not seem to solve this particular problem. I have searched my system and I in fact cannot locate this file.
Where should it be? and what is normal procedure for shoving it into its little home?
Thanks in advance.
Perhaps using the latest available v6.3 iFix will help.
As an IBM customer you can connect to IBM Fix Central, search for "mobilefirst platform", select 6.3 as your release version and download the latest available Studio fix.
Install it in fresh Eclipse that uses a new workspace and import your project into it. Start the server and deploy the adapter.

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.

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

Worklight Console can not be opened because the Worklight Server is not running

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.)

IBM Worklight 6.0 - SRVE0777E: javax.servlet.ServletException: Worklight Project not initialized

I've just installed Worklight 6.0 on Mac OS X Mountain Lion 10.8.4.
I'm trying to build a very simple HelloWorklight app to test the installed environment and I'm getting errors building and deploying it.
I'm getting these errors in Eclipse console:
[2013-07-13 02:11:21] Starting build process: application
'HelloWorklightApp', all environments
[2013-07-13 02:11:21] Application 'HelloWorklightApp' with
all environments build finished.
[2013-07-13 02:11:21] Deploying application
'HelloWorklightApp' with all environments to Worklight Server...
[2013-07-13 02:11:21] Failed to deploy the application to
Worklight server: Worklight module
HelloWorklightProject was not
successfully started. Full details of the error are available from the
Worklight Development Server console.
The Worklight Development Server console in my browser shows:
Application Error
SRVE0777E: Exception thrown by application class
'com.worklight.core.auth.impl.AuthenticationFilter.doFilter:110'
javax.servlet.ServletException: Worklight Project not initialized
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
I'm truly stuck. On the other hand I'm sure it must be something simple to fix it.
Has anyone got an idea how?
I had a similar problem (at least WDS console error looks the same).
A little bit history:
My problems started, when I updated Worklight to version 6 (with version 5 I had no problems). Some compilation erros were fixed by adding Websphere Library to a project. But my custom authentication still wasn't working.
How I fixed it:
open new workspace in Eclipse
import Worklight project
clean project
restart Eclipse
downgrade compiler compliance level (in Eclipse: Window > Preferences > Compiler and set "Compiler compliance level" to lower version)
rebuild project and try to run it
At this point it started to work. I've spend lots of time to find out that compiler stuff, but still I'm not sure which part requires that.
So we had this issue with 2 macs and it took us a solid day and a half to figure it all out.
We went through a lot of reconfiguring, re-downloading eclipse and worklight.
Make sure your config files from the update are correct. (worklight.prop and authConfig)
This is the big one. Install JDK 1.7 and reference the new JRE 7. When we
were running on Oracle JRE 6, we had a ton of errors and even a Java
Heap memory issue.
Once you install it, it may to be tricky to find the actually path to the JRE.
First, go to Eclipse > Pref > Installed JRE's > Add
Then, add a new standard vm. Click Directory on the next pane and browse to the install path of JRE.
We found it in [name of your HD] > Library > Java > JavaVirtualMachines > jdk1.7.0_25.jdk > Contents > Home > jre
It should load everything it needs and you can click the check box of the new JRE. For good measure, I changed the compiler to 1.7 as well.
The jdk folder may have a slightly diff name depending on what update you have. Hopefully this helps.
I got the same error after deploy an new app deployment.
What I've done on Server is:
delete all application
delete all extra configuration between new server instance and my current instance. In my case it was: applicationMonitor and shared librairy
clean
restart
After that I managed to deploy my application normally
window -> show view -> servers -> server configuration -> HTTP EndPoint -> host
By default the host will be *. Try to change the host as your local machine ip address. for example host = . After changing the host, close the server.xml and then try to rebuild the project.