I need to access some properties from a Javascript adapter.
I know that i can access to worklight.properties file using
WL.Server.configuration.propertyName
but seems that when the property file change a server restart is needed
From Eclipse console after saving a new version of worklight.properties:
[AUDIT ] CWWKG0016I: Starting server configuration update.
[AUDIT ] CWWKG0017I: The server configuration was successfully updated in 0.005 seconds.
[AUDIT ] CWWKT0017I: Web application removed (default_host): http://hostname:hostport/ProjectName/
[AUDIT ] CWWKZ0009I: The application ProjectName has stopped successfully.
[AUDIT ] CWWKG0016I: Starting server configuration update.
[AUDIT ] CWWKG0017I: The server configuration was successfully updated in 0.007 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://hostname:hostport/ProjectName/
[AUDIT ] CWWKZ0001I: Application ProjectName started in 1.868 seconds.
There is a way to avoid server restart, or use a different WL mechanism to read Server side properties?
My env:
Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 2
IBM Worklight Studio 6.1
if you really want to avoid the server restart and access properties from file. You can follow the below work around.
From Adapter you can access JAVA code
From JAVA code try to access properties file
Am not sure why you are looking for some other mechanism above mentioned is just a workaround which am using in my project.
In your question you do not explain why this server restart bothers you.
In the development environment - the Worklight Studio plug-in for Eclipse, what you say is correct - whenever you change any file that resides in the server folder of your Worklight project, the embedded WAS Liberty profile server will restart.
This is the expected behavior and is unavoidable.
In addition, there is no other mechanism AFAIK to read server properties.
Related
I just finished the deployment of a mule entreprise standalone server on a VM, added the server to the Runtime Manager, then proceeded to add the mule applications into the server.
The problem i'm having is that the version of the app doesn't appear on runtime manager.
You can see here what the problem actually is, the app deployed on Cloudhub shows it's runtime version but the one deployed on the server doesn't .
Is this a known problem, does it have a fix or not ?
I am using Worklight 6.2 consumer edition. When I deploy my app, following warning flashes on server console:
[WARNING ] FWLSE0259W: Application authenticity protection is not being performed within the Worklight Development Server. In order to fully test Application authenticity protection, deploy the application to a non-development Worklight Server (i.e. external Worklight Server). [project MyProject].
I am using Web Sphere Liberty Profile 8.5.5.1 server. Pls advise how to make this warning make go away?
As the message says, if you are trying to test Application Authenticity Protection in Worklight Studio (the Eclipse development environment of Worklight), Authenticity protection is not supposed to work.
To test Application Authenticity in Worklight 6.2, you must deploy Worklight using IBM Installation Manager to your Application Server (WAS, Liberty, Tomcat), as well as your .war, .wlapp, .adapters, etc... and set it up in Worklight Console belonging to this instance of Worklight.
Only then should it work.
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) 64-Bit Server VM, version 1.7.0_60-ea-b15 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://Lalit:10080/IBMJMXConnectorREST/
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT ] CWWKF0011I: The server worklight is ready to run a smarter planet.
[ERROR ] CWWKZ0005E: The application WorklightServices cannot start because the server is not configured to handle applications of type war.
[AUDIT ] CWWKT0017I: Web application removed (default_host): http://Lalit:10080/IBMJMXConnectorREST/
[ERROR ] CWWKZ0005E: The application WorklightConsole cannot start because the server is not configured to handle applications of type war.
[AUDIT ] CWWKE0036I: The server worklight stopped after 3 minutes, 2.429 seconds.
Same question: Worklight Development Server does not start
Verify you have Oracle Java installed and that Eclipse is configured to use it in Preferences > Java > Installed JREs
This seems to solve the problem. See if it solves yours as well.
Also consider upgrading to the latest available 6.2.0.0 iFix, currently dated August 18th.
You can get it either from IBM Fix Central website or by updating your Worklight Studio installation from Eclipse marketplace.
I am trying to deploy multiple adapters to a Worklight Server in a production environment. When refreshing the console, the deployed adapters are missing.
What is the problem?
Can you please take a look at your Worklight Server log to see if any errors are displayed. I have seen in the past similar behavior when adapter procedures relied on security-tests, but the security tests were not defined properly in the authenticationConfig.xml file on the server side. In the server log I saw the following error:
"Failed to deploy adapter. This may be due to a JavaScript error in your adapter implementation"
If this is the case please update your authenticationConfig.xml on your production server to match the properties you have defined in your development environment. Also do these adapters deploy successfully in your development environment when running locally?
Make sure that the Studio the adapter was created in and the Server the adapter is deployed to are of the exact same build number
This is reason #1 for adapters to get deployed and then immediately get removed.
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