IBM Worklight 6.2: JMX configuration error. Unable to obtain MBeans - ibm-mobilefirst

I have IBM Worklight 6.2 development environment with the following setup.
Oracle Java 1.7
Eclipse 4.3
IBM Worklight 6.2 Developer Edition
A sample Hybrid project had been created and deployed in the Worklight development server and app works fine in the Mobile Browser Simulator.
I am getting the following error in Worklight Server console in Eclipse:
[ERROR ] Failed to obtain JMX connection to access an MBean.
There might be a JMX configuration error: Read timed out
[ERROR ] FWLSE3000E: A server error was detected.
FWLSE3012E: JMX configuration error. Unable to obtain MBeans. Reason: "Read timed out".
And also I am getting the following error in Worklight Console[Web Console].
FWLSE3012E: JMX configuration error. Unable to obtain MBeans. Reason: "Read timed out".
Note:
I have read the following questions but no luck.
IBM Worklight - Can't run an app on WebSphere Application Server
How to solve management service not starting up in Worklight 6.2
Additional Info:
I used to get the following error whenever the Worklight development server is started from eclipse.
*[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.*
I hope necessary information's I have provided. Let me know if u still need.

The JMX timeout error in Worklight 6.2 is a known issue.
Typically when this error occurs to me, a way to resolve it is to either 'wait' a while and then to stop & restart the Worklight Server (in Eclipse > Servers view > 'play' button). Another option is to restart Eclipse.
You can also try the suggestions from the comments:
Try to edit the file
WorklightServerConfig/servers/worklight/jvm.options in your Eclipse
workspace, adding the line
"-Dcom.ibm.ws.jmx.connector.client.rest.readTimeout=180000". Then stop and restart the Worklight Development Server.
and
Try to edit the file
WorklightServerConfig/servers/worklight/server.xml and add in the
section the following line, then restart and try again:
<executor name="LargeThreadPool" id="default" coreThreads="40"
maxThreads="80" keepAlive="60s" stealPolicy="STRICT"
rejectedWorkPolicy="CALLER_RUNS" />
Best is to open a PMR (support ticket) and request an iFix as this is due to be fixed.

Related

IBM Worklight 6.2 SRVE0777E: Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized:422'

1) Java version "1.7.0_71" i have installed
2) I download eclipse Version: Kepler Service Release 1
Build id: 20130919-0819 and extracted.
3) I have tried to install worklight6.2 as said in this while installing i have faced this issue so as per the suggestion in that post i have downloaded worklight6.2 from that site and configured.
4) And then configured ADT plugin with my eclipse.
5) Now i have created a Hello world app as per the instructions.
6) Started the server by right click on Worklight development server and start.
7) Now right click on HelloWorld Run As -> Run on worklight development server.
then i have opened my app in browser and clicked on Preview as common Resources it but it is giving the following exception in browser:
i have gone through some of these links but those did not help.
ErrorLog is as follows..
Listening for transport dt_socket at address: 10777
Launching worklight (WebSphere Application Server 8.5.5.1/wlp-1.0.4.cl50120131011-1639) on Java HotSpot(TM) Client VM, version 1.7.0_71-b14 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.QueryParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.HeaderParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.core.Context annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.CookieParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[WARNING ] CWNEN0070W: The javax.ws.rs.MatrixParam annotation class will not be recognized because it was loaded from the null location rather than from a product class loader.
[AUDIT ] CWWKZ0022W: Application WorklightConsole has not started in 30.012 seconds.
[AUDIT ] CWWKF0011I: The server worklight is ready to run a smarter planet.
[AUDIT ] CWWKZ0022W: Application HelloWorld has not started in 30.027 seconds.
[AUDIT ] CWWKZ0022W: Application _MobileBrowserSimulator has not started in 30.016 seconds.
[AUDIT ] CWWKZ0022W: Application WorklightServices has not started in 30.017 seconds.
[AUDIT ] CWWKZ0022W: Application _analytics has not started in 30.013 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/IBMJMXConnectorREST/
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/worklightadmin/
[AUDIT ] CWWKZ0001I: Application WorklightServices started in 84.379 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/_analytics/
[AUDIT ] CWWKZ0001I: Application _analytics started in 77.031 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/HelloWorld/
[AUDIT ] CWWKZ0001I: Application HelloWorld started in 86.932 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/_MobileBrowserSimulator/
[AUDIT ] CWWKZ0001I: Application _MobileBrowserSimulator started in 84.441 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Harish:10080/worklightconsole/
[AUDIT ] CWWKZ0001I: Application WorklightConsole started in 87.959 seconds.
[ERROR ] FWLST0003E: ========= Failed starting project /HelloWorld [project HelloWorld]
java.lang.reflect.InvocationTargetException
[ERROR ] FWLST0003E: ========= Failed starting project /HelloWorld [project HelloWorld]
java.lang.reflect.InvocationTargetException
[ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.net.SocketTimeoutException: Read timed out
at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:435)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:128)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.net.SocketTimeoutException: Read timed out
... 5 more
Harish,
I have faced similar issues and I know it's frustrating. It's mainly because of the configuration and nothing else.
The key element is to make sure that you have the right eclipse version and have installed the plugins from the market place. I always prefer to download ADT from the Android Developer Site and then install Marketplace and then subsequently install the Worklight plugins. In a way getting the Android configuration done too, we would need it anyway. => This way of installation has helped me configure it well without issues for my peers at workplace.
I don't remember the exact fix for this issue, but I suggest that you try the following steps:
Make sure that the Java compiler is version 1.7 (Eclipse > Preferences > Compiler > 1.7) and similarly the corresponding JRE version.
Increase the Worklight server timeout to 180 seconds if lower. (First enable the server view by Eclipse > Window > Show View > Server > Servers) and then double click on the (Worklight Development Server) which will open up a GUI for it's configuration. In it, you will find Timeouts, increase the start timeout to 180 seconds.
Increase the memory allotted to JVM by configuring the jvm.options under Worklight Development Server
like this -> -Xmx1024m
If these above steps don't help and if you have ample time, then you can start off installing and configuring the way that I have mentioned before.
Hope this helps.

Worklight 6.2 - java.lang.NullPointerException

In Worklight 6.2, there is new method to deploy the Worklight Project, which is using IBM Worklight Server Configuration Tool
refer here :
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.deploy.doc/deploy/c_using_server_config_tool.html
After setup Worklight admin, and deploy Worklight Project WAR through that. From my understanding, the worklight project will be called runtime
I found errors on the Websphere Logs as below:
[10/3/14 0:37:55:758 MYT] 0000007e FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /apps/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_6adbbbb2_14.10.03_00.37.55.7436943857084851194341.txt com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters -RE 1123
[10/3/14 0:37:55:758 MYT] 0000007e LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[10/3/14 0:37:55:769 MYT] 0000007e webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ServletNameNotFound]: java.lang.NullPointerException
in the http://localhost:9080/worklightconsole/index.html#
Got display as below:
Below is the proof that runtime/worklight project is deployed successfully:
​Next action is to troubleshoot why the runtime/worklight project is not working.
How I can rectify this problem? Thanks.
The exception is in a web container class of WebSphere. You must look at the content of the ffdc file
/apps/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ffdc/server1_6adbbbb2_14.10.03_00.37.55.7436943857084851194341.txt to see if there are more details in particular the servlet that cannot be found.
But it seems that something is wrong in the Worklight configuration under WAS (viewing the "Servlet not found" error).
The Worklight servlets are in the jar "worklight-jee-library.jar" that is configured as a shared library in WAS.
Without all the WAS logs it is not possible to find the real cause. So you can review the WAS configuration after the deployment by following :
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.installconfig.doc/admin/t_configuring_websphere_application_server_for_wladmin_manually.html,
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.installconfig.doc/admin/t_configuring_websphere_application_server_for_oracle_manually_for_wladmin.html,
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.deploy.doc/admin/t_configuring_websphere_application_server_for_oracle_manually.html,
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.deploy.doc/admin/t_configuring_websphere_application_server_manually.html
The other reason could be that your Worklight project is not a 6.2 project. How do you build you war file ?

Worklight server - Error 500: Could not find required filter class - com.worklight.core.auth.impl.AuthenticationFilter.class

I'm using worklight 6.1 for my mobile app project. My problem is, I got this error message when I try to upload war file into worklight server. I already install worklight server into my websphere.
Error 500: javax.servlet.ServletException: Filter [authenticationFilter]: Could not find required filter class - com.worklight.core.auth.impl.AuthenticationFilter.class
These are steps for uploading war file into worklight server.
1.Build project_name.war file from IBM Worklight Studio v6.1.
2.Deploy the .war file to IBM Websphere Integrated Solutions Console v8.5.5.0.
3.Open the WebSphere enterprise application and click install.
4.Choose the project.war file from the worklight project directory.
5.Click on next button for fast path.
6.Click on next button.
7.Choose the server 1.
8.Choose on the target JNDI.
9.Set the Virtual Host to default_host.
10.Set the context root.
11.Click on finish button.
12.Save directly to master configuration.
13.Start the application.
14.Open the server URL to get into the wroklight server to deploy application, adapter and etc, but failed to open the server URL with this error and the error log as below.
[3/6/14 10:18:50:442 MYT] 0000009e webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor]: java.lang.ClassNotFoundException: class java.lang.ClassNotFoundException: com.worklight.core.auth.impl.AuthenticationFilter
at java.beans.Beans.instantiate(Beans.java:195)
at java.beans.Beans.instantiate(Beans.java:80)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:533)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:475)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:308)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:380)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:892)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
My latest error message on 10 March 2014
Error 500: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: FWLSE0206E: The project /rmbp failed to initialize, because the project database schema for data source jdbc:db2://192.168.1.80:50001/APPCNTR is from version N/A, which is not supported by the server from version 6.1.0.00.20131126-0630. Use the Worklight ant tasks to upgrade the project database schema.
You may want to look at this similar post for suggestions:
IBM Worklight 6.0 - Worklight Console does not show up after installing WL 6.0 server on Liberty profile - Error 500
Importantly "you need to make sure that your worklight-jee-library.jar is in the application classloader." Like Idan suggested above you can easily use the ant scripts we provide in order to accomplish this in a more automated fashion:
https://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.deploy.doc%2Fdevref%2Ft_transporting_apps_and_adapters.html

Error in transporting an application from development worklight to Worklight Server Consumer Edition

I am using IBM Worklight environment. I have created a small application "SampleHybridProject" using Worklight Developer studio and tested it successfully.
Now when I am trying to deploy it on the Worklight Server Consumer Edition, and hitting the following URL: http://mymachine.com:9080/SampleHybridProject/console
I am getting this error in my browser:
Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /SampleHybridProject/console
I am using Worklight Edition 5.0.6. The Worklight Server is default "WAS with Liberty profile".
Here are the properties that I changed in worklight.properties file.
publicWorkLightHostname=localhost
publicWorkLightProtocol=http
publicWorkLightPort=9080
publicWorkLightContext=/SampleHybridProject
wl.db.type=MYSQL
wl.db.url=jdbc:mysql://mysqlinstalledonmypc:3306/WRKLGHT
wl.db.username=root
wl.db.password=admin
Here are the changes that I made in application-descriptor.xml:
<worklightServerRootURL>http://${local.IPAddress}:9080/SampleHybridProject</worklightServerRootURL>
Can you tell me what I am doing wrong or what I need to do?
I have found the problem and solved it. The problem is I was having this error in console.log file:
Error creating bean with name 'txManager' defined in URL [jar:file:/C:/ProgramData/IBM/Worklight/WAS85liberty-server/wlp/usr/shared/resou‌​rces/lib/worklight-jee-library.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of com/ibm/ws/classloading/internal/UnifiedClassLoader) previously initiated loading for a different type with name "javax/sql/DataSource"
This was because I had a jar in the server/lib folder of my project which was causing this problem. I removed the jar from server/lib folder and redeployed the .war file. Now the console is getting loaded.
Are you getting any deployment errors in your liberty logs? A 404 on the context root generally means either the WAR was not found, or the context root defaults to something other than 'SampleHybridProject'. If the WAR appears to be loading correctly, it will output where it is listening on similar to:
[AUDIT ] CWWKT0016I: Web application available (default_host): http://[hostname]:port/SampleHybridProject/*
If it says the context root is anything other than SampleHybridProject, you can set it in the tag in liberty's server.xml:
<application id="SampleHybridProject" name="SampleHybridProject"
location="SampleHybridProject.war" type="war"
context-root="SampleHybridProject">
...
</application>

cannot find EJB reference while deploying ADF Fusion Webapp into oracle weblogic server

I created a Fusion Webapplication project with Oracle jdeveloper 11g (11.1.5 but the same problem occours with the 11.2.1 version). Then I created a jsf page and I deployed the project to an external weblogic server (WL 10.3) with the ADF runtime support and evrithing where working.
Then I created the POJOs object (to the model project, because I have 2 proj: Model and ViewController for the web pages and backing beans) from the DB tables and a session bean who provides queries methods. After that (and so far everything it's ok) I added an ADF Data Control bound to the session bean and then I bound (via editor) one of these methods into the jsf page using an ADF table.
If I run the project using the run button everything work, but if I deploy it into both the external deployment WL server and in the internal one I get the following error
[05:30:04 PM] [Deployer:149193]Operation 'deploy' on application 'Prova_application1' has failed on 'AdminServer'
[05:30:04 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application Prova_application1 on AdminServer.: Could not setup environment.
[05:30:04 PM] Weblogic Server Exception: weblogic.application.ModuleException: Could not setup environment
[05:30:04 PM] Caused by: weblogic.deployment.EnvironmentException: [J2EE:160167]The module Prova-ViewController-context-root in application Prova_application1 uses ejb-links but no EJB modules were found for this application.
[05:30:04 PM] See server logs or server console for more details.
[05:30:04 PM] weblogic.application.ModuleException: Could not setup environment
[05:30:04 PM] #### Deployment incomplete. ####
[05:30:04 PM] Remote deployment failed
but there is such refernce into the web.xml and I bound the Model project into the deployment descriptor. I red every post in the web but I still can't face the problem.
The web.xml in the ViewController project contains the EJB reference (automatically created from jdeveloper) and I bound everithing the Model project but it still doesn't work.
In JDeveloper IDE
you need to set ejb-jar.xml path.
- Right click on your project
- Choose Project Properties
- Go to EJB Module
- Set EJB Version (For example: "2.1")
- Set ejb-jar.xml path (For example: "..\src\META-INF\ejb-jar.xml")
I hope it works..