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)
Related
I want to deploy my application on Apache tomcat Server.I went through the documentation part but things were not clear to me..Can Anybody please help me deploying my Worklight application on Apache tomcat.Just want to know the step by step procedure.I am newbie to Apache tomcat,please bear with me.I knw about the .adapter files, .wl.app files but much confused about deploying and accessing the .apk,.war files..
Thanks in Advance
Tomcat is an application server. It runs web apps called WAR files (it is not the same as web apps for mobile devices).
You must purchase Worklight for your organization in order to receive additional required libraries, such as the Worklight JEE .jar file, which is basically the Worklight Server and Worklight Console.
You deploy the above files, including the Worklight project's .war file, and its artifacts: the .wlapp and .adapter files, to the Tomcat application server, either manually or by using the installation tools (Ant scripts and the IBM Installation Manager) provided by IBM as part of your license purchasing.
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.)
I have read the posts:
IBM Worklight 6.0 - worklightserverhost attribute and the app-builder Ant task
IBM Worklight - How to connect to another Worklight Server located in another machine in the same network?
IBM Worklight 6.0 - application-descriptor.xml
And I think I'm missing something because all them stop with the generation of the wlapp for other servers.
After generating and installing the wlapp it is needed to generate and apk/ipa or "Run As" over the environment to execute that application.
The problem I'm having is that the deployed application in the device points to the development server always and not to the other server I have used for generating the .wlapp files with the (Run As -> Build For Remote Server...).
I have tried deploying the application with the property "publicWorkLighHostname" changed in the worklight.properites but it has no effect.
How do I deploy an application to the device pointing to the desired server?
Thank you.
Run As >> Build All and Deploy / Build specific environment, points to the local development server
Build for Remote Server, points to a server of your choosing
If you perform a Build All and Deploy after a Build for Remote Server, this will overwrite the previous action and the artifacts will again point to the local development machine.
So do a Build for Remote Server. Worklight Studio knows where to put what so that the app will reach the server.
I am running Worklight Studio 6 from Worklight Enterprise Edition download with Eclipse Juno.
My application is using form security with the WASLTPA login module. The application tests correctly.
When I add AppAuthenticity (needed for device provisioning) my client sees the following error in the console. (None in the server log)
Failed to load resource: the server responded with a status of 401 (Unauthorized)
drilling deeper I see:
/*-secure-
{"challenges":{"wl_authenticityRealm":{"WL-Challenge-Data":"o97e2ph8kguqh1vpljbio1o5k3+23.507-9.852-31.807 "}}}*/
I am running this on the Worklight Development Server packaged with Worklight Studio.
You have mentioned both the Enterprise Edition and Developer Edition.
Please clarify your question with the following: You have installed Worklight using the IBM Installation Manager, yes?
You have an application server (Tomcat/WebSphere/Liberty) installed and you've used the supplied Ant scripts to create the Worklight database(s), configure them, deploy the Worklight platform files to the application server, as well as deploy your project's .war file? (and of course the .wlapp /.adapter file(s)...).
If you have done the above, then you will have in your Worklight Server, now installed on the application server, the required components for App Authenticity to work.
Then there is the case of how you actually configured your project for App Authenticity.
Make sure you follow these steps to set up App Authenticity
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.