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

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.

Related

The server was unable to process the request from the application. Please try again later

I have an Application developed in Worklight 6.1 and I upgraded the application to Mobile first 7.1. I have build and deployed the application in Mobile first 7.1.
But my application Not able to invoke the adapter and displayed the Message "The server was unable to process the request from the application. Please try again later"
I have followed the below procedure for up gradation.
1. Installed the Mobile first 7.1 Plugin in Eclipse
2. Imported the Existing 6.1 project in to My work space(I hope Tool will
auto upgrade app to 7.1)
3. Build the application and it generated .war, .wlapp and .adapter files
4. we have installed the standalone 7.1 Server.
5. Deployed the build files in servers.
6. Created the apk and installed in Mobile.
Now it is showing the Message "The server was unable to process the request from the application. Please try again later" while launching the application.
From the logs i found the below details when i try to invoke adapter
invocationContext: null
Status : 404
invocationResult : undefined
Note: It was working well in development environment
Kindly suggest
It'd be more useful to see the complete server and client logs as well. Please upload and edit the question with links to the log files.
That said, in step 6 (Created the apk and installed in Mobile.) you do not mention if you have re-built the project with the correct remote server host, port and context root values. Make sure you've done that. See The Build Settings and Deploy Target command.

"Failed to Deploy Artefact error" in Eclipse Mule ESB project

I'm trying to run a trivial http echo app against the 3.50 CE runtime and I get the following stack trace(s) when I try to run
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'default', see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
java.lang.NullPointerException
at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:274)
...
Exception in thread "main" java.lang.NullPointerException
at org.mule.module.launcher.DefaultArchiveDeployer.addZombieApp(DefaultArchiveDeployer.java:325)
Additional context:
I've just started working with Mule (using the Eclipse Plugin). I initially had the trial package which is configured for Enterprise edition and I had that working with some of the trivial examples - hello world and echo.
I then downloaded the community runtimes and changed the targets on the projects, at that point I had been getting No Application Name errors, and I tried rebuilding them as new projects with CE targets from the start.
I also had been running them as mule applications, but this page
https://developer.mulesoft.com/docs/display/current/Studio+in+Eclipse
seems to indicate I must use maven ( I've set that up - although the automatic POM management doesn't seem to be working) but I still get the above failure.
There's no indication of why it's failing, as far as I can tell my projects output is valid.
Any suggestions welcome.
For what it's worth this is working now (fixed it shortly after posting the question even though it's been a blocker since yesterday).
If anyone else runs aground of the same issue..
I wasn't using the latest Community Edition runtime so I upgraded using the eclipse plugin install from (http://studio.mulesoft.org/r4/studio-runtimes).
I think this might have had something to do with it as I had previously been using the r4 plugin (http://studio.mulesoft.org/r4/plugin) with the Eclipse hosted 3.5 CE. Possibly the plugin is not backward compatible with the Runtimes.
basically once I completed the install and restarted I upgraded my project to use the new CE (changing the project setting and the flow xml). It worked first time.
Oddly all my Mule-Maven options have disappeared, but that's a separate question.

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 Development server not starting up

I am currently working with IBM Worklight and came up with this trouble. Everything worked perfectly and suddenly I was updating my Android ADT and then out of nowhere, my worklight server got turned off and It doesn't start up. I searched through the site and could not come up with questions addressing the exact problem.
When I click on the start server, I get the following log info.
Listening for transport dt_socket at address: 10777
Launching worklight (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130524-0951) on Java HotSpot(TM) Client VM, version 1.7.0_51-b13 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKG0010I: The server worklight is shutting down because of a previous initialization error.
[AUDIT ] CWWKE0036I: The server worklight stopped after 8.827 seconds.
And a popup box which says
Server Worklight Development Server failed to start.
Here is what my screen looks like..
Kindly help me guys
Thanks
From the Servers view, delete "Worklight Development Server"
Restart Eclipse
The development server should be automatically re-generated
See if starting it now works.
Per the comments:
Without having the original project to recreate the (new) migration issue, my only solution is to create a new project and copy the web resources to it.
I got similar errors that the upgrade from 6.1.0.0 to 6.1.0.1 failed after updating from eclipse. I deleted the project, recreated it, copied the common folder into it, recreated the environments (android and iphone). Then I was getting errors on both the iphone and andriod build about wlBuildResources/.../obscureArgs.txt not found. I deleted wlBuildResources and started eclipse with -clean. That seems to have at least gotten the project to build. Idan if you want to try this project upgrade/migration you can get it from: https://github.com/attdevsupport/ATT_APIPlatform_Worklight/tree/master/ATT_WL_InAppMessaging
I had a similar issue.
Under your root folder of the worklight project there would be a hidden file under .settings/org.eclipse.core.resources.prefs
Open the same with TextEdit or NotePad. Delete the line wl_version=6.1.0.0....... and save the file. Now try to open the project again it would get recreated with the latest version number.

IBM Worklight 6.0 - Dojo library uses localhost after deploy

I have a Worklight 6.0 project that uses the new Dojo 1.9 libs, I created an external dojo project, like the documentation suggested, then, in the main project properties, under "Dojo toolkit", it references this dojo19 project.
The project works on the local server, then I did "Run As" | "Build for Remote Server...", and entered the correct domain:port and context path, clicked Build, the *.wlapp files were updated. (I've also updated the settings for publicWorkLightHostname / publicWorkLightPort / publicWorkLightProtocol in the "Environment Entries for Web Modules" in the installed war to match the remote server names/port/protocol.)
But, after deploying both war and -all.wlapp file, accessing the app I get JS errors when it tries to refer to the dojo19 library:
The page at
https://<myIP>:9443/<myproject>/apps/services/www/ /mobilewebapp/default/IODMobile.html
ran insecure content from http://localhost:64441/dojo19/<myproject>/IODMobile/mobilewebapp/dojo/nls/core-web-layer_en-us.js.
The dojo19 is the project name in my Worklight developer workspace that I referred to above.
Why is it trying localhost? Seems there's a missing step here in deploying the dojo library project into Worklight.
Where are you trying to preview the application when you get the error message?
See the changes in Dojo in Worklight 6.0
If launching the application in emulator/simulator/device, see Billy Rowe's answer in this question
Partial copy/paste:
Step 1: Verify your application works in the Mobile Browser Simulator
with Provide Library Resources checked. If the Console log is showing
resources being served from the server, then these have to be copied
to your application before deploying to AVD or a device
Step 2: After you think you have all Dojo/resources within your
project, uncheck Provide Library Resources and test it again in MBS.
If it fails in MBS, then something is missing in your application that
is in the library/server. You can check Provide Library Resources and
retest to see if it shows you what that is. Not all resources are
shown, e.g. if there's a missing CSS file.
Also I would suggest to do all of this in the Development environment (that is, in Eclipse) before starting to deploy the .war file and .wlapp file etc... (which, BTW, I hope you're doing based on the new instructions for Worklight 6.0)
In the information center, it will show you how to uncheck the Provide Library Resources in the Console Log.
I think what you're running into is:
1) Something is being served from the Dojo Library/Server
2) A bug in 6.0 that used "localhost" instead of the IP of the host (your machine running eclipse). This is fixed in the 6.0 iFix. With this fix, you can run your app external to Studio and still use the Dojo Library/Server. Without this fix, you must have everything you need within your app.
Can you install the iFix and let us know if that fixed the problem?