Exception starting Worklight server on Tomcat - ibm-mobilefirst

I move the application from dev to producation,change the application-description.xml and worklight.properties files and generate a .war file,and then i add it to the tomcat,but when I start tomcat,it occur the follow error:
java.lang.ClassNotFoundException: Class org.hsqldb.jdbcDriver not found in Worklight platform or project
but even I add the hsql.jar to my application,it still the error,any help?
my worklight version is 5.0.5 and apache-tomcat-7.0.37 and mysql is 5.1.57

HSQL is the default database used when running the Worklight project in Eclipse.
When you move to Tomcat, you also need to edit in worklight.properties the database-related properties.
Since you mentioned MySQL, you need to uncomment the MySQL section in worklight.properties and edit it according to your setup.
Of course, also undeploy and re-deploy the updated .war file.
Additions:
HSQL is a filesystem-driven database, and is provided by Worklight to work out-of-the-box, when running in Eclipse.
When moving to Tomcat and installing Worklight in it, you must edit worklight.properties and set it up so that it will know how to talk with the datbase.
In your case, when using MySQL you must also include in Tomcat's \lib folder the MySQL connector/J file. You can get it from here: http://www.mysql.com/downloads/mirror.php?id=412178 (click on "No thanks, just start my download" at the bottom).
Note that in order to run Worklight on an Application Server (such as Tomcat, WebSphere or Liberty), you must use either the Consumer or Enterprise Edition of Worklight. This is required as otherwise you will not have the Worklight JEE .jar file as well as the SQL scripts to create the database tables. All of this is done via the IBM Installation Manager.
You cannot use Worklight on an Application Server using the Developer Edition.

Related

Clearing cache of server configuration tool

Previously I had a different version of WAS (8.5.5.3) this morning I installed WAS (8.5.5.6) on my laptop. Also I reinstalled MFP Server to point to new WAS
I started using 'Server configuration tool' then but somehow the tool remembers the old path '/opt/ibm/Websphere/Liberty' and all other old settings
Even I tried removing 'runtime' and 'application' and recreated but still 'tool' picks up the same old details by default
Is there any way to clear the old details (or cache) of 'Server configuration tool' ?
Thanks
Sathish kumar
In the current versions of MFP, there is no link between the application server you selected in Install Manager to deploy Application Center, and the application server that is presented first by the Server Configuration Tool when you deploy an MFP Server. The Server Configuration Tool looks at the list of application servers installed with Install Manager and presents them in the order in which it did find them.

Why is MobileFirst Server Configuration Tool not letting me deploy with libertyAdminUser and libertyAdminPassword?

I'm trying to deploy a MobileFirst server to a local Liberty server configured with an LDAP server.
When I try and deploy my server configuration the admin task fails due to lack of attributes for connecting to Liberty.
BUILD FAILED
C:\Users\Administrator\Documents\IBM MobileFirst Platform Server Data\Server Configuration Tool\Configuration_Hello MobileFirst Server\Hello MobileFirst Server.xml:88: The element <installWorklightAdmin>, <jmx libertyAdminUser=".." libertyAdminPassword="..."/> is missing. A default user cannot be created for this server.
I have tried updating the server configuration file manually before deploying, but the server configuration tool is just saving over the changes.
How can I resolve this problem from within the Server Configuration Tool?
The Server Configuration Tool in MFP 7.0 can't be used to make an install on a Liberty server that is configured with LDAP.
In the simplified install process of the Server Configuration Tool, it automatically creates a Liberty Administrator in a basic registry and this is not possible if Liberty is configured with LDAP.
If you don't want to create ant files manually, you can:
Export the ant files that you created with the Server Configuration Tool (Menu File/Export Configuration as Ant files...)
Edit them so that they have the right attributes in the jmx element (you need to provide the login of password of a user that will be used as Liberty Administrator and that the apps will use to perform JMX calls)
Run the ant files as described here
For the admin: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.installconfig.doc/install_config/r_wlconsole_ant_tasks.html
For the runtime: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.deploy.doc/devref/c_project_war_file_ant_tasks.html
You may encrypt the password of the JMX user with the Liberty securityUtility program (in LibertyInstallDir/bin)

Worklight Server 6.2 Context not found

I am trying to install and configure Worklight application center on liberty profile.
I have installed the worklight 6.2 using the installation manager. Along the installation process i have installed the appcenter as well.
The installation was successful. But when i try to access the console it giving me "Context root not found".
Also I have checked the server.xml of the liberty server. It contains the appcenterconsole.war and the applicationcenter.war mapped.
Does anyone experience this problem as well?
This might be the same problem as mentioned here: Worklight Development Server does not start
Please make sure you use Oracle Java, not IBM Java!

IBM Worklight 6.1.0.1 - Server Configuration Tool issues

My configuration is:
OS: RHEL 5.7
IBM DB2 10.1
WAS8.5
WL6.1.0.1 (last fix pack installed)
When reading the WL6.1 Information Center, it is said that you can deploy several Worklight projects (that is, several project WAR files) to an application server just as you would deploy any JEE application: each deployed project must have a unique name and a unique context path.
This exactly what I am trying to do using the Server Configuration Tool located under the directory '/opt/IBM/Worklight/shortcuts/'.
When deploying the first WAR file under a WebSphere Application server profile, the Server Configuration Tool works perfectly and creates/deploys an EAR file named 'IBM_Worklight_Console.ear', in which the WAR file is included. However, when using the Server Configuration Tool to deploy a new WAR file under the same WebSphere Application server profile, the Server Configuration Tool creates the same EAR file named 'IBM_Worklight_Console.ear' with the new WAR file included. But obviously it overwrites the first Worklight Server configuration, preventing to deploy several Worklight projects to the websphere application server profile as it is supposed to do.
What could be the problem?
The Worklight documentation, section "Configuring multiple IBM Worklight projects", says that for multiple Worklight project WAR files in WebSphere Application Server, each must have a different id. In the Worklight Server Configuration Tool, you enter this id in the "Application server configuration" panel, in the "Deployment id" field. Once you choose a different id for each, they will be able to coexist. (At most one of the ids can be left empty.)

Worklight security remote server

My Worklight project use the security module and WorkLightAuthenticator WorkLightAuthLoginModule. When I run the application on environment
development, it works perfectly. When I import the project to the remote server, it seems that do not find the WorkLightAuthenticator.
To import to the remote server, I need to do something besides include the .adapter and .wlapp the Worklight Console?
Changes made in authenticationConfig.xml on eclipse comes with these files (. and adapter. wlapp), or need to do manually on the remote server?
Changes made to the authenticationConfig.xml file are saved in the bin\<projectName>.war file. You must re-deploy this .war file.
See this IBM Worklight Information Center topic: Deploying IBM Worklight applications to test and production environments
Also see this training module for an overview about the process of moving to production (which also provides a general overview of a Worklight project)