I just installed Worklight 6.2 server, use the configuration tool to deploy a simple project and it works OK. Then I followed the instructions in knowledge center to install analytics. Afterwards, when I open WL console in the browser, I got "No runtime can be found." Analytics seems to work fine
My war file is in Liberty apps folder. in my case C:\IBM\WebSphere\Liberty\usr\servers\simpleServer\apps
I have tried the solution below, but didn't work. I removed the files in workarea and checked for my jdk, which is jdk6_45
No runtime on my Worklight 6.2 Console
Here's my server.xml
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<!-- Begin for analytics -->
<feature>jsp-2.2</feature>
<feature>jndi-1.0</feature>
<!-- End for analytics -->
<!-- Begin of features added by IBM Worklight installer. -->
<feature>ssl-1.0</feature>
<feature>servlet-3.0</feature>
<feature>jdbc-4.0</feature>
<feature>appSecurity-1.0</feature>
<feature>jndi-1.0</feature>
<!-- End of features added by IBM Worklight installer. -->
<!-- Begin of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<feature>ssl-1.0</feature>
<feature>servlet-3.0</feature>
<feature>jdbc-4.0</feature>
<feature>jndi-1.0</feature>
<!-- <feature>restConnector-1.0</feature> -->
<feature>appSecurity-1.0</feature>
<!-- End of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
<feature>ssl-1.0</feature>
<feature>servlet-3.0</feature>
<feature>jdbc-4.0</feature>
<feature>jndi-1.0</feature>
<!-- End of features added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
</featureManager>
<httpEndpoint id="defaultHttpEndpoint"
host="*"
httpPort="9080"
httpsPort="9443" >
<!-- Option soReuseAddr added by IBM Worklight installer. -->
<!-- Option soReuseAddr added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Option soReuseAddr added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
<tcpOptions soReuseAddr="true"/>
</httpEndpoint>
<!-- Begin of configuration added by IBM Worklight installer. -->
<!-- Declare the IBM Application Center Console application. -->
<application id="appcenterconsole" name="appcenterconsole" location="appcenterconsole.war" type="war">
<application-bnd>
<security-role name="appcenteradmin">
<group name="appcentergroup"/>
</security-role>
</application-bnd>
</application>
<!-- Declare the IBM Application Center Services application. -->
<application id="applicationcenter" name="applicationcenter" location="applicationcenter.war" type="war">
<application-bnd>
<security-role name="appcenteradmin">
<group name="appcentergroup"/>
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</commonLibrary>
</classloader>
</application>
<!-- Declare the user registry for the IBM Application Center. -->
<basicRegistry id="applicationcenter-registry" realm="ApplicationCenter">
<!-- Worklight user.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user name="WorklightRESTUser" password="WGFtAaW8fTma"/>
<!-- The users defined here are members of group "appcentergroup",
thus have role "appcenteradmin", and can therefore perform
administrative tasks through the IBM Application Center Console. -->
<user name="appcenteradmin" password="admin"/>
<user name="demo" password="demo"/>
<group name="appcentergroup">
<member name="appcenteradmin"/>
<member name="demo"/>
</group>
</basicRegistry>
<!-- Declare the JNDI properties for the IBM Application Center. -->
<!-- Define the AppCenter services endpoint in order for the AppCenter console to be able to invoke the REST service.
You need to enable this property if the server is behind a reverse proxy
or if the context root of the Application Center Services application is different from '/applicationcenter'. -->
<!-- <jndiEntry jndiName="ibm.appcenter.services.endpoint" value='"http://proxyhost:proxyport/applicationcenter"'/> -->
<!-- The directory with binaries of the 'aapt' program, from the Android SDK's platform-tools package. -->
<jndiEntry jndiName="android.aapt.dir" value='"C:/IBM/Worklight/ApplicationCenter/tools/android-sdk"'/>
<!-- The protocol of the application resources URI. This property is optional. It is only needed if the protocol of the external and internal URI are different. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.protocol" value='"http"'/> -->
<!-- The hostname of the application resources URI. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.host" value='"proxyhost"'/> -->
<!-- The port of the application resources URI. This property is optional. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.port" value="proxyport"/> -->
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="DB2Lib">
<fileset dir="${shared.resource.dir}/db2" includes="*.jar"/>
</library>
<!-- Declare the IBM Application Center database. -->
<dataSource jndiName="jdbc/AppCenterDS" transactional="false">
<jdbcDriver libraryRef="DB2Lib"/>
<properties.db2.jcc databaseName="APPCNTR" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin"/>
</dataSource>
<!-- End of configuration added by IBM Worklight installer. -->
Ant task for context root '/wladmin']
This configuration is the minimum one that you need to create an SSL configuration.
With this configuration, the Liberty server creates the keystore and the certificate,
if it does not exist yet, during the SSL initialization.
The created certificate is a self-signed certificate that is valid for 365 days.
Do not use the certificates that the Liberty server created for production use.
For more information see http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/twlp_sec_ssl.html
-->
<administrator-role>
<!-- Worklight JMX User.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user>WorklightRESTUser</user>
</administrator-role>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="WGFtAaW8fTma"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>
<!-- Begin of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Declare the Worklight Administration Service application. -->
<application id="wladmin" name="wladmin" location="worklightadmin.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="demo"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</commonLibrary>
</classloader>
</application>
<!-- Declare web container custom properties for the Worklight Administration Service application. -->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<!-- Declare the JNDI properties for the Worklight Administration Service. -->
<jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value='"Hello_Worklight_Server"'/>
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="wladmin/DB2Lib">
<fileset dir="${shared.resource.dir}/wladmin/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>
<!-- Declare the IBM Worklight Administration database. -->
<dataSource jndiName="wladmin/jdbc/WorklightAdminDS" transactional="false">
<jdbcDriver libraryRef="wladmin/DB2Lib"/>
<properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin" currentSchema="WLADMIN"/>
</dataSource>
<!-- Declare the Worklight Administration Console application. -->
<application id="worklightconsole" name="worklightconsole" location="worklightconsole.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="demo"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
</application>
<!-- Declare web container custom properties for the Worklight Administration Console application. -->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<!-- Declare the JNDI properties for the Worklight Administration Console. -->
<jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" value='"*://*:*/wladmin"'/>
<!-- End of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="worklight" name="worklight" location="HelloWorklight.war" type="war">
<classloader delegation="parentLast">
<privateLibrary>
<fileset dir="${shared.resource.dir}/worklight/lib" includes="worklight-jee-library.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="worklight/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="worklight/publicWorkLightPort" value='"9080"'/>
<jndiEntry jndiName="worklight/ibm.worklight.admin.environmentid" value='"Hello_Worklight_Server"'/>
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="worklight/DB2Lib">
<fileset dir="${shared.resource.dir}/worklight/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="worklight/DB2Lib"/>
<properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin" currentSchema="WRKLGHT"/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="worklight/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="worklight/DB2Lib"/>
<properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50000" user="db2admin" password="db2admin" currentSchema="WLREPORT"/>
</dataSource>
<!-- For analytics -->
<application context-root="/analytics"
id="analytics"
location="analytics.war"
name="analytics"
type="war">
</application>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
Worklight still needs the restConnector-1.0 feature in Liberty so you shouldn't comment it out. The analytics delivered in 6.2 cannot run when the restConnector feature is present. You have two options:
Option 1 - Download the latest iFix. The latest iFix comes with a version of analytics that can run with the restConnector feature. You will have to add the 'parentLast' classloader declaration to analytics entry in server.xml. Example:
< application context-root="/analytics" id="analytics"location="analytics.war" name="analytics" type="war">
< classloader delegation="parentLast"/>
</ application>
Option 2 - Install the analytics on a separate liberty server (recommended approach for a production server)
Documentation for the above will be updated in the next fixpack.
As a side note, are you sure that the 'no runtime' error is related to analytics and not just a coincidence? Does the error still occur when you remove analytics and reverse the steps you did for installation?
Related
I installed MF 6.3 on WAS Liberty 8.5.5.7 and used Server Configuration Tool wizard to create runtime. The deploy was successfully. But when I load the MobileFirst Console, I see "No Runtime can be found".
My use Oracle Java 1.7_80
I saw other answers suggested adding JNDI, but it was there already. I also try to deploy different war files which is working well on other servers, but still get the same "No Runtime can be found" issue.
Here is my server.xml
<!-- Enable features -->
<featureManager>
<feature>javaee-7.0</feature>
<!-- Begin of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- The following lines will be removed when the application is uninstalled -->
<feature>ssl-1.0</feature>
<feature>servlet-3.0</feature>
<feature>jdbc-4.0</feature>
<feature>jndi-1.0</feature>
<feature>restConnector-1.0</feature>
<feature>appSecurity-1.0</feature>
<!-- End of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/TRIRIGAAnywhere'. -->
<!-- The following lines will be removed when the application is uninstalled -->
<feature>ssl-1.0</feature>
<feature>servlet-3.0</feature>
<feature>jdbc-4.0</feature>
<feature>jndi-1.0</feature>
<!-- End of features added by IBM Worklight <configureApplicationServer> ant task for context root '/TRIRIGAAnywhere'. -->
</featureManager>
<!-- This template enables security. To get the full use of all the capabilities, a keystore and user registry are required. -->
<!-- For the keystore, default keys are generated and stored in a keystore. To provide the keystore password, generate an
encoded password using bin/securityUtility encode and add it below in the password attribute of the keyStore element.
Then uncomment the keyStore element. -->
<!--
<keyStore password=""/>
-->
<!--For a user registry configuration, configure your user registry. For example, configure a basic user registry using the
basicRegistry element. Specify your own user name below in the name attribute of the user element. For the password,
generate an encoded password using bin/securityUtility encode and add it in the password attribute of the user element.
Then uncomment the user element. -->
<basicRegistry id="basic" realm="BasicRealm">
<!-- Worklight user.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user name="WorklightRESTUser" password="rAmi3hMxUQ6s"/>
<!-- Worklight user.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user name="demo" password="demo"/>
<!-- <user name="yourUserName" password="" /> -->
</basicRegistry>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
httpPort="9080"
httpsPort="9443" host="*" >
<!-- Option soReuseAddr added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Option soReuseAddr added by IBM Worklight <configureApplicationServer> ant task for context root '/TRIRIGAAnywhere'. -->
<tcpOptions soReuseAddr="true"/>
</httpEndpoint>
<keyStore id="defaultKeyStore" password="worklight"/>
<administrator-role>
<!-- Worklight JMX User.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user>WorklightRESTUser</user>
</administrator-role>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="rAmi3hMxUQ6s"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>
<!-- WebContainer statement.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
[Added by IBM Worklight <configureApplicationServer> Ant task for context root '/TRIRIGAAnywhere']
-->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<!-- Element <executor> added by IBM Worklight <installWorklightAdmin> ant task for id 'wladmin'. -->
<executor id="default" name="LargeThreadPool"
coreThreads="200" maxThreads="400" keepAlive="60s"
stealPolicy="STRICT" rejectedWorkPolicy="CALLER_RUNS"/>
<!-- Begin of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Declare the Worklight Administration Service application. -->
<application id="wladmin" name="wladmin" location="worklightadmin.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="demo"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary id="worklightlib_wladmin">
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.10.jar"/>
</commonLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the Worklight Administration Service. -->
<jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value='"WLP"'/>
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="wladmin/MySQLLib">
<fileset dir="${shared.resource.dir}/wladmin/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>
<!-- Declare the IBM Worklight Administration database. -->
<dataSource jndiName="wladmin/jdbc/WorklightAdminDS" transactional="false">
<jdbcDriver libraryRef="wladmin/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/WLADMIN" user="root" password=""/>
</dataSource>
<!-- Declare the Worklight Administration Console application. -->
<application id="worklightconsole" name="worklightconsole" location="worklightconsole.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="demo"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
</application>
<!-- Declare the JNDI properties for the Worklight Administration Console. -->
<jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" value='"*://*:*/wladmin"'/>
<!-- End of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/TRIRIGAAnywhere'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="TRIRIGAAnywhere" name="TRIRIGAAnywhere" location="TRIRIGAAnywhere.war" type="war">
<classloader delegation="parentLast">
<privateLibrary id="worklightlib_TRIRIGAAnywhere">
<fileset dir="${shared.resource.dir}/TRIRIGAAnywhere/lib" includes="worklight-jee-library.jar"/>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.10.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="TRIRIGAAnywhere/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="TRIRIGAAnywhere/publicWorkLightPort" value='"9080"'/>
<jndiEntry jndiName="TRIRIGAAnywhere/ibm.worklight.admin.environmentid" value='"WLP"'/>
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="TRIRIGAAnywhere/MySQLLib">
<fileset dir="${shared.resource.dir}/TRIRIGAAnywhere/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="TRIRIGAAnywhere/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="TRIRIGAAnywhere/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/WRKLGHT" user="root" password=""/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="TRIRIGAAnywhere/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="TRIRIGAAnywhere/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/WLREPORT" user="root" password=""/>
</dataSource>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/TRIRIGAAnywhere'. -->
Here are my log:
console log https://ibm.box.com/s/obgin6plo3xzehjoih6hf524nwzubqqn
messages log https://ibm.box.com/s/id2kuba4cq78pr43e7bgqe7oz4x67iyw
MFP 6.3 does not support the feature javaee-7.0
From my tests, there is as least a conflict with the feature jaxrs20 that is included by javaee-7.0. Also it incudes servler 3.1 that conflicts with servlet 3.0 and JDBC 4.1 that conflicts with jdbc-40
You need to remove javaee-7.0
If you don't have the features jdbc-4.0 and servlet-3.0, you can replace them in the server.xml by jdbc-4.1 and servlet 3.1.
But this is a configuration that is not officially supported.
If you can use a Liberty with that supports JEE6, this is safer.
MFP Admin Services is failing to start
There are several error messages like this in the logs
[9/23/15 8:57:57:962 PDT] 00000111 com.worklight.common.util.jmx.LibertyRuntimeMBeanHandler I Establishing REST connection to service:jmx:rest://localhost:9443/IBMJMXConnectorREST
[9/23/15 8:57:58:009 PDT] 00000111 jmx.connector.client.rest.internal.RESTMBeanServerConnection E CWWKX0203E: The WebSphere Java Management Extensions REST client received an unexpected response code 404 with message 'Not Found' from the server for URL https://localhost:9443/IBMJMXConnectorREST on connection rest:localhost:9443 WorklightRESTUser 3
Do you have some firewall or anything that could be blocking that URL? https://localhost:9443/IBMJMXConnectorREST
You may try using an IP address or hostname instead of localhost during installation
Also I see this message
[AUDIT ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/8.5.5.7/lafiles/en.html
[ERROR ] CWWKF0001E: A feature definition could not be found for jdbc-4.0
Are you maybe trying to use the war files from Studio in a Liberty (production) server ? How did you get the install files ? Have you manually changed the worklightadmin.war file ?
I would suggest a fresh reinstall of Liberty and MFP Server from scratch.
Also, according to the logs, you are running MFP Server on Windows 7. Althought it may work, it is not officially supported - http://www-969.ibm.com/software/reports/compatibility/clarity-reports/report/html/osForProduct?deliverableId=1404132386734#osFamily-5
I installed MobileFirst Server v.7 on mac Application Server is WAS v.8.5.5.4. Analytics console is opening but it is showing no data.
Server.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>jdbc-4.0</feature>
<feature>appSecurity-2.0</feature>
<feature>servlet-3.0</feature>
<!-- End of features added by IBM Worklight installer. -->
<!-- Begin of features added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->
<feature>jdbc-4.0</feature>
<feature>appSecurity-2.0</feature>
<feature>restConnector-1.0</feature>
<!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj1'. -->
<feature>jdbc-4.0</feature>
<feature>servlet-3.0</feature>
<feature>ssl-1.0</feature>
<!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj2'. -->
<feature>jdbc-4.0</feature>
<feature>servlet-3.0</feature>
<feature>ssl-1.0</feature>
<!-- Begin of features added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj3'. -->
<!-- The following lines will be removed when the application is uninstalled -->
<feature>jdbc-4.0</feature>
<feature>servlet-3.0</feature>
<feature>ssl-1.0</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
httpPort="9080"
httpsPort="9443" host="*" >
<!-- Option soReuseAddr added by IBM Worklight installer. -->
<!-- Option soReuseAddr added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->
<!-- Option soReuseAddr added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj1'. -->
<!-- Option soReuseAddr added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj2'. -->
<!-- Option soReuseAddr added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj3'. -->
<tcpOptions soReuseAddr="true"/>
</httpEndpoint>
<basicRegistry>
<!-- Worklight user.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin']
-->
<user name="WorklightRESTUser" password="rsRMSUVWwD5h"/>
<!-- Worklight user.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/worklightadmin']
-->
<user name="admin" password="admin"/>
<!-- Worklight user.
[Added by IBM Worklight Installation Manager for context root '/applicationcenter']
-->
<user name="demo" password="demo"/>
<!-- Worklight user.
[Added by IBM Worklight Installation Manager for context root '/applicationcenter']
-->
<user name="appcenteradmin" password="admin"/>
<!-- IBM Application Center group.
[Added by IBM Worklight Installation Manager for context root '/applicationcenter']
-->
<group name="appcentergroup">
<!-- IBM Application Center group member.
[Added by IBM Worklight Installation Manager for context root '/applicationcenter']
-->
<member name="demo"/>
<!-- IBM Application Center group member.
[Added by IBM Worklight Installation Manager for context root '/applicationcenter']
-->
<member name="appcenteradmin"/>
</group>
</basicRegistry>
<!-- Begin of configuration added by IBM Worklight installer. -->
<!-- Declare the IBM Application Center Console application. -->
<application id="appcenterconsole" name="appcenterconsole" location="appcenterconsole.war" type="war">
<application-bnd>
<security-role name="appcenteradmin">
<group name="appcentergroup"/>
</security-role>
</application-bnd>
</application>
<!-- Declare the IBM Application Center Services application. -->
<application id="applicationcenter" name="applicationcenter" location="applicationcenter.war" type="war">
<application-bnd>
<security-role name="appcenteradmin">
<group name="appcentergroup"/>
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</commonLibrary>
</classloader>
</application>
<jndiEntry jndiName="android.aapt.dir" value='"/Users/kiranjain/IBM/MobileFirst_Platform_Server/ApplicationCenter/tools/android-sdk"'/>
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="MySQLLib">
<fileset dir="${shared.resource.dir}/mysql" includes="*.jar"/>
</library>
<!-- Declare the IBM Application Center database. -->
<dataSource jndiName="jdbc/AppCenterDS" transactional="false">
<jdbcDriver libraryRef="MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/APPCNTR" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- End of configuration added by IBM Worklight installer. -->
<keyStore id="defaultKeyStore" password="worklight"/>
<administrator-role>
<user>WorklightRESTUser</user>
</administrator-role>
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="rsRMSUVWwD5h"/>
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<executor id="default" name="LargeThreadPool"
coreThreads="200" maxThreads="400" keepAlive="60s"
stealPolicy="STRICT" rejectedWorkPolicy="CALLER_RUNS"/>
<!-- Declare the IBM Worklight project runtime application. -->
<application id="MyProj1" name="MyProj1" location="MyProj1.war" type="war">
<classloader delegation="parentLast">
<privateLibrary id="worklightlib_MyProj1">
<fileset dir="${shared.resource.dir}/MyProj1/lib" includes="worklight-jee-library.jar"/>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="MyProj1/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="MyProj1/publicWorkLightPort" value='"9080"'/>
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="MyProj1/MySQLLib">
<fileset dir="${shared.resource.dir}/MyProj1/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="MyProj1/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="MyProj1/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/WRKLGHT" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="MyProj1/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="MyProj1/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/WLREPORT" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj1'. -->
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj2'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="MyProj2" name="MyProj2" location="MyProj2.war" type="war">
<classloader delegation="parentLast">
<privateLibrary id="worklightlib_MyProj2">
<fileset dir="${shared.resource.dir}/MyProj2/lib" includes="worklight-jee-library.jar"/>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="MyProj2/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="MyProj2/publicWorkLightPort" value='"9080"'/>
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="MyProj2/MySQLLib">
<fileset dir="${shared.resource.dir}/MyProj2/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="MyProj2/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="MyProj2/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/incident_WRKLGHT" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="IncidentAware16Jun/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="MyProj2/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/incident_WLREPORT" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj2'. -->
<!-- Begin of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->
<!-- Declare the Worklight Administration Service application. -->
<application id="worklightadmin" name="worklightadmin" location="worklightadmin.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary id="worklightlib_worklightadmin">
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</commonLibrary>
</classloader>
</application>
<application id="analytics" location="analytics.ear" name="analytics" type="ear">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
<user name="deployer"/>
</security-role>
<security-role name="worklightmonitor">
<user name="monitor"/>
</security-role>
<security-role name="worklightoperator">
<user name="operator"/>
</security-role>
</application-bnd>
</application>
<library id="worklightadmin/MySQLLib">
<fileset dir="${shared.resource.dir}/worklightadmin/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>
<!-- Declare the IBM Worklight Administration database. -->
<dataSource jndiName="worklightadmin/jdbc/WorklightAdminDS" transactional="false">
<jdbcDriver libraryRef="worklightadmin/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/WLADMIN" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- Declare the Worklight Administration Console application. -->
<application id="worklightconsole" name="worklightconsole" location="worklightconsole.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
</application>
<application id="analytics-service" name="analytics-service" location="analytics-service.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
</application>
<application id="analytics-ui" name="analytics-ui" location="analytics-ui.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
</application>
<!-- Declare the JNDI properties for the Worklight Administration Console. -->
<jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" value='"*://*:*/worklightadmin"'/>
<!-- End of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/worklightadmin'. -->
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/MyProj3'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="MyProj3" name="MyProj3" location="MyProj3.war" type="war">
<classloader delegation="parentLast">
<privateLibrary id="worklightlib_MyProj3">
<fileset dir="${shared.resource.dir}/MyProj3/lib" includes="worklight-jee-library.jar"/>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="MyProj3/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="MyProj3/publicWorkLightPort" value='"9080"'/>
<jndiEntry jndiName="MyProj3/serverSessionTimeout" value='"10"'/>
<jndiEntry jndiName="MyProj3/wl.analytics.url" value='"http://localhost:9080/analytics-service/data"'/>
<jndiEntry jndiName="MyProj3/wl.analytics.console.url" value='"http://localhost:9080/analytics/console"'/>
<jndiEntry jndiName="MyProj3/wl.analytics.username" value='"admin"'/>
<jndiEntry jndiName="MyProj3/wl.analytics.password" value='"admin"'/>
<jndiEntry jndiName="MyProj3/wl.analytics.queue.size" value='"1"'/>
<!-- Declare the jar files for MySQL access through JDBC. -->
<library id="MyProj3/MySQLLib">
<fileset dir="${shared.resource.dir}/MyProj3/mysql" includes="mysql-connector-java-5.1.36-bin.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="MyTime/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="MyTime/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/MyTime_WRKLGT" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="MyTime/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="MyTime/MySQLLib"/>
<properties URL="jdbc:mysql://localhost:3306/MyTime_WRKREPRT" user="admin" password="{xor}PjsyNjE="/>
</dataSource>
</server>
I used analytics-ui.war, analytics-service.war and analytics.ear but it is still not working.
I installed 3 projects on MobileFirst Server with adapters but they are not reflecting on the analytics console.
In console.log i am getting below error:
Could not start web application analytics-ear.
[ERROR ] CWWKZ0002E: An exception occurred while starting the application analytics-ear. The exception message was: com.ibm.ws.container.service.state.StateChangeException: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Context root /analytics/* is already bound. Cannot start application analytics
Initially I set up the mobile first server and deployed my 2 apps than I added the analytics.ear on app folder and made necessary changes in Server.xml. After it I restarted the WAS server. For checking the analytics I deployed MyProj3 with JNDI properties but it is not reflecting on the analytics console. I tried to clean and restart server still it didn't worked.
Help me out with this
Kiran sent me some more logs via email. I believe the failure is a result of this error in the logs:
[ERROR ] Error sending bulk request: java.lang.RuntimeException: failure in bulk execution:
[0]: index [worklight], type [server_logs], id [3Vuqfw2aTSWqD6g-pw3IkA], message [EsRejectedExecutionException[rejected execution (queue capacity 50) on org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1#605876e2]]
The way to fix this is to add this jndi entry:
<jndiEntry jndiName="<analytics-context-root>/threadpool.bulk.queue_size" value="1000" />
Just increase the thread bulk thread pool size to an appropriate number. That number depends on your infrastructure.
I am using mobileFirst CLI for deployment of war file using ant script. Giving the path of mfp-cli web server directory and derby database.
below is my code:
<target name="database">
<configuredatabase kind="Worklight">
<derby database="WRKLGHT" datadir="${path-to-mfpcli}/derby/TestProj"/>
</configuredatabase>
<configuredatabase kind="WorklightReports">
<derby database="WLREPORT" datadir="${path-to-mfpcli}/derby/TestProj"/>
</configuredatabase>
</target>
<target name="install">
<configureapplicationserver id="TestProj" environmentId="TestProj">
<project warfile="${path-to-project}/TestProj.war" libraryfile="${path-to-worklight-jee}/worklight-jee-library-7.0.0.jar"/>
<!-- Here you can define values which override the
default values of Worklight configuration properties -->
<property name="serverSessionTimeout" value="10"/>
<applicationserver>
<websphereapplicationserver installdir="${websphere-server-installed-directory}/wlp" profile="Liberty" user="admin" password="admin">
<server name="worklight"/>
</websphereapplicationserver>
</applicationserver>
<database kind="Worklight">
<derby database="WRKLGHT" datadir="${path-to-mfpcli}/derby/TestProj"/>
</database>
<database kind="WorklightReports">
<derby database="WLREPORT" datadir="${path-to-mfpcli}/derby/TestProj"/>
</database>
</configureapplicationserver>
The server.xml is getting updated as below:
<server description="worklight">
<featureManager>
<feature>servlet-3.0</feature>
<feature>jndi-1.0</feature>
<feature>jdbc-4.0</feature>
<feature>localConnector-1.0</feature>
<feature>restConnector-1.0</feature>
<feature>jsp-2.2</feature>
<feature>appSecurity-1.0</feature>
<feature>ssl-1.0</feature>
</featureManager>
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<webContainer com.ibm.ws.webcontainer.suppressLoggingServiceRuntimeExcep="true" invokeFlushAfterService="false" deferServletLoad="false"/>
<webContainer deferServletLoad="false" invokeFlushAfterService="false"/>
<!-- non standard ports were used to avoid future collision with other WebSphere products. -->
<httpEndpoint id="defaultHttpEndpoint"
host="*"
httpPort="10080"
httpsPort="10443" >
<tcpOptions soReuseAddr="true"/>
</httpEndpoint>
<logging consoleLogLevel="AUDIT" copySystemStreams="false"/>
<applicationMonitor updateTrigger="mbean"/>
<executor name="LargeThreadPool" id="default" coreThreads="200" maxThreads="400" keepAlive="60s" stealPolicy="STRICT" rejectedWorkPolicy="CALLER_RUNS"/>
<administrator-role>
<user>admin</user>
</administrator-role>
<keyStore id="defaultKeyStore" password="worklight"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="10443"/>
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>
<application context-root="analytics-service" id="analytics-service" location="analytics-service.war" name="AnalyticsServices" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
<user name="deployer"/>
</security-role>
<security-role name="worklightmonitor">
<user name="monitor"/>
</security-role>
<security-role name="worklightoperator">
<user name="operator"/>
</security-role>
</application-bnd>
</application>
<application context-root="analytics" id="analytics" location="analytics.war" name="Analytics" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="admin"/>
</security-role>
<security-role name="worklightdeployer">
<user name="deployer"/>
</security-role>
<security-role name="worklightmonitor">
<user name="monitor"/>
</security-role>
<security-role name="worklightoperator">
<user name="operator"/>
</security-role>
</application-bnd>
</application>
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="worklight" name="worklight" location="TestProj.war" type="war">
<classloader delegation="parentLast">
<privateLibrary id="worklightlib_worklight">
<fileset dir="${shared.resource.dir}/worklight/lib" includes="worklight-jee-library-7.0.0.jar"/>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.1.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="worklight/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="worklight/publicWorkLightPort" value='"10080"'/>
<jndiEntry jndiName="worklight/ibm.worklight.admin.environmentid" value='"TestProj"'/>
<jndiEntry jndiName="worklight/serverSessionTimeout" value='"10"'/>
<!-- Declare the jar file for Derby with the "embedded" deployment option. -->
<library id="worklight/DerbyLib">
<fileset dir="${shared.resource.dir}/worklight/derby" includes="derby.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="worklight/DerbyLib"/>
<properties.derby.embedded databaseName="${path-to-mfpcli}/TestProj/WRKLGHT" user='"WORKLIGHT"'/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="worklight/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="worklight/DerbyLib"/>
<properties.derby.embedded databaseName="${path-to-mfpcli}/TestProj/WLREPORT" user='"WORKLIGHT"'/>
</dataSource>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
But here ID and name of the TestProj.war code in server.xml is "worklight" I am not getting how it came as default value and while running the server the runtime environment is showing as worklight. I am not able to deploy my app because of it as it throws an error MBean not found.
In
<configureapplicationserver id="TestProj" environmentId="TestProj">
You don't need id. This attribute is only used if you deploy in WAS full profile (to add a suffix to the objects created in WAS an allow multipled deployments in a cell)
You probably don't need environmentId. This is used if you deploy several instances of MFP admin in the same applicaiton server. If you add it, the admin must have the same or you have an MBean not found error.
To change the contextRoot, use the attribute contextroot
<configureapplicationserver contextRoot="/TestProj">
For reference, see
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.reference.doc/devref/r_ant_tasks_configure_appserver_reference.html
I'm trying to install manually IBM Worklight 6.2 in WebSphere Liberty Profile using db2 database. I have already the appcenter and the worklight server running properly. But when I try to declare my server runtime (I've uploaded the war file and I have declared it in the server.xml file), the logs are displaying the following message:
2015-01-19T12:39:43.32+0100 [App/0] ERR [ERROR ] FWLST0003E: ========= Failed starting project /worklight [project worklight]
2015-01-19T12:39:43.32+0100 [App/0] ERR Error creating bean with name 'txManager' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://75.126.155.153:50000/SQLDB is from version N/A, which is not supported by the server from version 6.2.0.00.20140613-0730. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]
2015-01-19T12:39:43.40+0100 [App/0] ERR [ERROR ] Error creating bean with name 'txManager' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://75.126.155.153:50000/SQLDB is from version N/A, which is not supported by the server from version 6.2.0.00.20140613-0730. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]
2015-01-19T12:39:43.40+0100 [App/0] ERR Error creating bean with name 'txManager' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/home/vcap/app/.liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://75.126.155.153:50000/SQLDB is from version N/A, which is not supported by the server from version 6.2.0.00.20140613-0730. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]
and this is my server.xml file:
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<!-- Begin of features added by IBM Worklight installer. -->
<feature>ssl-1.0</feature>
<feature>servlet-3.0</feature>
<feature>jdbc-4.0</feature>
<feature>appSecurity-1.0</feature>
<feature>restConnector-1.0</feature>
<feature>jndi-1.0</feature>
<!-- End of features added by IBM Worklight installer. -->
</featureManager>
<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="9443" >
<tcpOptions soReuseAddr="true"/>
</httpEndpoint>
<!-- Begin of configuration added by IBM Worklight installer. -->
<!-- Declare the IBM Application Center Console application. -->
<application id="appcenterconsole" name="appcenterconsole" location="appcenterconsole.war" type="war">
<application-bnd>
<security-role name="appcenteradmin">
<group name="appcentergroup"/>
</security-role>
</application-bnd>
</application>
<!-- Declare the IBM Application Center Services application. -->
<application id="applicationcenter" name="applicationcenter" location="applicationcenter.war" type="war">
<application-bnd>
<security-role name="appcenteradmin">
<group name="appcentergroup"/>
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.8.jar"/>
</commonLibrary>
</classloader>
</application>
<!-- Declare the user registry for the IBM Application Center. -->
<basicRegistry id="applicationcenter-registry" realm="ApplicationCenter">
<!-- Worklight user.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user name="WorklightRESTUser" password="EKminBt6fHnE"/>
<!-- The users defined here are members of group "appcentergroup",
thus have role "appcenteradmin", and can therefore perform
administrative tasks through the IBM Application Center Console. -->
<user name="appcenteradmin" password="admin"/>
<user name="demo" password="demo"/>
<group name="appcentergroup">
<member name="appcenteradmin"/>
<member name="demo"/>
</group>
</basicRegistry>
<!-- Declare the JNDI properties for the IBM Application Center. -->
<!-- Define the AppCenter services endpoint in order for the AppCenter console to be able to invoke the REST service.
You need to enable this property if the server is behind a reverse proxy
or if the context root of the Application Center Services application is different from '/applicationcenter'. -->
<!-- <jndiEntry jndiName="ibm.appcenter.services.endpoint" value='"http://proxyhost:proxyport/applicationcenter"'/> -->
<!-- The directory with binaries of the 'aapt' program, from the Android SDK's platform-tools package. -->
<!--<jndiEntry jndiName="android.aapt.dir" value='"*******/android-sdk"'/>-->
<jndiEntry jndiName="android.aapt.dir" value="C******/android-sdk"/>
<!-- The protocol of the application resources URI. This property is optional. It is only needed if the protocol of the external and internal URI are different. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.protocol" value='"http"'/> -->
<!-- The hostname of the application resources URI. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.host" value='"proxyhost"'/> -->
<!-- The port of the application resources URI. This property is optional. -->
<!-- <jndiEntry jndiName="ibm.appcenter.proxy.port" value="proxyport"/> -->
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="DB2Lib">
<fileset dir="${shared.resource.dir}/db2" includes="*.jar"/>
</library>
<!-- Declare the IBM Application Center database. -->
<dataSource jndiName="jdbc/AppCenterDS" transactional="false">
<jdbcDriver libraryRef="DB2Lib"/>
<properties.db2.jcc databaseName='${Database.connection.db}' serverName='${Database.connection.host}' portNumber='${Database.connection.port}' user='${Database.connection.username}' password='${Database.connection.password}'/>
</dataSource>
<!-- End of configuration added by IBM Worklight installer. -->
<administrator-role>
<!-- Worklight JMX User.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<user>WorklightRESTUser</user>
</administrator-role>
<!--
IBM Worklight requires SSL and declared the "defaultKeyStore" default keystore.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
This configuration is the minimum one that you need to create an SSL configuration.
With this configuration, the Liberty server creates the keystore and the certificate,
if it does not exist yet, during the SSL initialization.
The created certificate is a self-signed certificate that is valid for 365 days.
Do not use the certificates that the Liberty server created for production use.
For more information see http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.core.doc/ae/twlp_sec_ssl.html
-->
<keyStore id="defaultKeyStore" password="worklight"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.host" value="localhost"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.port" value="9443"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.user" value="WorklightRESTUser"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.admin.jmx.pwd" value="EKminBt6fHnE"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.topology.platform" value="Liberty"/>
<!-- Worklight JNDI property for JMX connection.
[Added by IBM Worklight <installWorklightAdmin> Ant task for context root '/wladmin']
-->
<jndiEntry jndiName="ibm.worklight.topology.clustermode" value="Standalone"/>
<!-- Begin of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Declare the Worklight Administration Service application. -->
<application id="wladmin" name="wladmin" location="worklightadmin.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="demo"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.8.jar"/>
</commonLibrary>
</classloader>
</application>
<!-- Declare web container custom properties for the Worklight Administration Service application. -->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<!-- Declare the JNDI properties for the Worklight Administration Service. -->
<jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value="WLBluemix"/>
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="wladmin/DB2Lib">
<fileset dir="${shared.resource.dir}/wladmin/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>
<!-- Declare the IBM Worklight Administration database. -->
<dataSource jndiName="wladmin/jdbc/WorklightAdminDS" transactional="false">
<jdbcDriver libraryRef="wladmin/DB2Lib"/>
<properties.db2.jcc databaseName='${Database.connection.db}' serverName='${Database.connection.host}' portNumber='${Database.connection.port}' user='${Database.connection.username}' password='${Database.connection.password}' currentSchema='${Database.connection.username}'/>
</dataSource>
<!-- Declare the Worklight Administration Console application. -->
<application id="worklightconsole" name="worklightconsole" location="worklightconsole.war" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="demo"/>
</security-role>
<security-role name="worklightdeployer">
</security-role>
<security-role name="worklightmonitor">
</security-role>
<security-role name="worklightoperator">
</security-role>
</application-bnd>
</application>
<!-- Declare web container custom properties for the Worklight Administration Console application. -->
<webContainer invokeFlushAfterService="false" deferServletLoad="false"/>
<!-- Declare the JNDI properties for the Worklight Administration Console. -->
<jndiEntry jndiName="worklightconsole/ibm.worklight.admin.endpoint" value="*://*:*/wladmin"/>
<!-- End of configuration added by IBM Worklight <installWorklightAdmin> ant task for context root '/wladmin'. -->
<!-- Begin of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="worklight/publicWorkLightProtocol" value="http"/>
<jndiEntry jndiName="worklight/publicWorkLightPort" value="9080"/>
<jndiEntry jndiName="worklight/ibm.worklight.admin.environmentid" value="WLServer"/>
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="worklight/DB2Lib">
<fileset dir="${shared.resource.dir}/worklight/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="worklight/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="worklight/DB2Lib"/>
<properties.db2.jcc databaseName='${cloud.services.Worklight Database.connection.db}' serverName='${cloud.services.Worklight Database.connection.host}' portNumber='${cloud.services.Worklight Database.connection.port}' user='${cloud.services.Worklight Database.connection.username}' password='${cloud.services.Worklight Database.connection.password}' currentSchema='${cloud.services.Worklight Database.connection.username}'/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="worklight/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="worklight/DB2Lib"/>
<properties.db2.jcc databaseName='${Database.connection.db}' serverName='$Database.connection.host}' portNumber='${Database.connection.port}' user='${Database.connection.username}' password='${Database.connection.password}' currentSchema='${Database.connection.username}'/>
</dataSource>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/worklight'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="worklight" name="worklight" location="WLserver.war" type="war">
<classloader delegation="parentLast">
<privateLibrary>
<fileset dir="${shared.resource.dir}/worklight/lib" includes="worklight-jee-library.jar"/>
</privateLibrary>
</classloader>
</application>
</server>
It looks like you don't have created the DB2 tables for the Admin Services, runtime and report databases.
After deploying an war file in a Worklight 6.2 environment, the console doesn't show the associated runtime environment : No runtime can be found. It's a basic usage of Worklight 6.2, but I don't know how to fix it !
What I've done :
Installation of Worklight Entreprise 6.2 on WebSphere Liberty 8.5.5.2 + DB2 V10.5
customisation of the configuration-liberty-db2.xml with my settings
ant -f myxmlfile admdatabases
ant -f myxmlfile adminstall
ant -f myxmlfile databases
ant -f myxmlfile install
I have the worklight console in the path ~/worklightconsole but no runtime !
and in the liberty log :
[6/24/14 15:28:00:978 CEST] 00000021 com.worklight.common.util.jmx.LibertyRuntimeMBeanHandler I Bean '*' does not exist.
[6/24/14 15:28:00:979 CEST] 00000021 com.ibm.worklight.admin.services.RuntimeService I No mxbeans found
And here is an extract of my server.xml liberty file :
ant task for context root '/myapp'. -->
<!-- Declare the IBM Worklight project runtime application. -->
<application id="myapp" name="myapp" location="MyProject.war" context-root="/myapp" type="war">
<classloader delegation="parentLast">
<privateLibrary>
<fileset dir="${shared.resource.dir}/myapp/lib" includes="worklight-jee-library.jar"/>
</privateLibrary>
</classloader>
</application>
<!-- Declare the JNDI properties for the IBM Worklight project runtime. -->
<jndiEntry jndiName="myapp/publicWorkLightProtocol" value='"http"'/>
<jndiEntry jndiName="myapp/publicWorkLightPort" value='"9080"'/>
<!-- Declare the jar files for DB2 access through JDBC. -->
<library id="myapp/DB2Lib">
<fileset dir="${shared.resource.dir}/myapp/db2" includes="db2jcc4.jar,db2jcc_license_cu.jar"/>
</library>
<!-- Declare the IBM Worklight Server database. -->
<dataSource jndiName="myapp/jdbc/WorklightDS" transactional="false">
<jdbcDriver libraryRef="myapp/DB2Lib"/>
<properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50001" user="db2inst1" password="db2inst1" currentSchema="WRKLGHT"/>
</dataSource>
<!-- Declare the IBM Worklight Server reports database. -->
<dataSource jndiName="myapp/jdbc/WorklightReportsDS" transactional="false">
<jdbcDriver libraryRef="myapp/DB2Lib"/>
<properties.db2.jcc databaseName="WRKLGHT" serverName="localhost" portNumber="50001" user="db2inst1" password="db2inst1" currentSchema="WLREPORT"/>
</dataSource>
<!-- End of configuration added by IBM Worklight <configureApplicationServer> ant task for context root '/myapp'. -->
There is a defect in the Liberty 8.5.5.2 classloader that can affect Worklight (not only the 6.2 version but all versions) and even existing non Worklight applications that define classloading policy rule in the server.xml file.
The workaround is to delete the content of the Liberty server workarea directory and start the server with the --clean option (each time you restart also).