I applied the latest Worklight 6.1.0.2 fixes, but the Mobile Apps continue to try and connect to Development server and not the Production server specified in the Build and Deploy Target settings. The client is making a request to an adapter that is installed on the server. I have confirmed this with Wireshark and set initOptions on startup to capture the IP address. I have Worklight 6.1 EE edition installed and have applied the patches there as well. It is like the app ignores the production server.
Does anyone have any suggestions other than upgrading to 6.2?
Can this be a Development Studio problem with eclipse plugin issue?
After you change the remote server protocol/host/port/context properties in Run As > Build Settings and Deploy Target, you should execute Run As > Build All Environment and not Run As > Run on Worklight Development Server.
By executing Run As > Run on Worklight Development Server, the connection values in wlclient.properties/worklight.plist will be the ones for the local development server settings.
By executing Run As > Build All Environment, the connection values wlclient.properties/worklight.plist will be the ones set in the Build Settings and Deploy Target.
Additionally:
In 6.1, if after a Build All Environments, you will then select Run As > Xcode project for example, the local development connection values will be used... So make sure not to do that.
In 6.2, if you do the above action (Run As > Xcode project (or any other external IDE option provided)), if you have remote server properties set up - they will be used. If you do not have any remote server properties set up, the local development connection properties will be used.
I have confirmed that this is working now. Eclipse is sometimes slow in activating the build process, and I was incorrectly pushing the run on Development Server, which might be over writing the values. If I wait patiently, the build cycle will generate the client that connects properly.
Thanks for the help.
Related
Developer server version is
mfp -v: 7.1.0.00.20160206-1603
Production server version is
wladm -version 7.1.0.00.20150807-0630
Project is mfp cordova type.
Building for developer server.
App built with Ant works.
App built with Gradle works.
Building for production server.
App built in release/debug with Ant - works fine.
App built in release/debug with Gradle, gets [...android/init] timeout or 500.
Signing is the same.
Configuration is the same.
wlapp is properly deployed to production and developer server.
On device app looks fine. Everything is ok, but cannot connect to WL server.
Looks like something is wrong with app authenticity.
But Ant signed-release works. Gradle signed-release/debug fails to connect.
Same project, same settings. Whats wrong. Have you seen this?
EDIT
Looking at logcat logs, found this error
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/.../base.apk"],nativeLibraryDirectories=[/data/app/.../lib/arm, /vendor/lib, /system/lib]]] couldn't find "libauthjni.so"
But when I just change address (wlclient.properties) to local Dev server - everything is ok. No error.
Cordova applications created with the CLI are based on Cordova 3.7.
Cordova 3.7 does not support a Gradle-based project structure.
I am not able to start the server or stop the server from outside the Mobile First Project. Even to create the runtime server MFP does not allow it unless you are with in the project.
Why does it has dependencies on the project. Logically I can use this sever for multiple projects right?
C:\Users\temp\.ibm\mobilefirst\7.1.0.00.20151114-1616\server\wlp>mfp status
Server worklight is not running.
C:\Users\temp\.ibm\mobilefirst\7.1.0.00.20151114-1616\server\wlp>mfp start
Error: You must be in a MobileFirst project to execute this command.
C:\Users\temp\.ibm\mobilefirst\7.1.0.00.20151114-1616\server\wlp>
Please follow the documentation. There are CLI commands to stop and start the server. There is a single server and you create projects that are all deploy to it.
Navigate into a MobileFirst project and run the command "mfp start".
We are developing a mobile app using IBM MobileFirst platform.
We compile the code using the command line tool with the command 'mfp build' and deploy it using 'mfp deploy', and we are able to preview the application from the URL mentioned below: http://localhost:xxxxx/worklightconsole/index.html
After doing 'mfp build' I get these 6 files:
mobapp.war
mobAppAdapter.adapter
Dashboard-all.wlapp
Dashboard-common.wlapp
Dashboard-desktopbrowser-1.0.wlapp
Dashboard-ipad-1.2.wlapp
Questions:
Where can I find the 6 files in 'worklight console'? (or)
Which other URL I have to refer to verify whether the files have been deployed correctly or not?
Because when I type in 'mfp build' it deploys the files but we are not sure where its getting deployed. We don't have WAS installed instead 'liberty' is used to our knowledge
The MobileFirst Platform CLI tool contains an embedded WebSphere Liberty profile server inside of it. It is this server and its internal database (during development time(!)), that the artifacts you have mentioned get deployed to.
You create a project ("mfp create").
You then start the server ("mfp start").
You then create your applications, develop them, etc...
Eventually you build and deploy it to the server ("mfp build", "mfp deploy").
The resulting files of the build command are the .adapter and .wlapp files.
These get deployed using the deploy command to the server's database.
You then see these files in the console using "mfp console".
The .war file is your project's runtime, containing metadata required for various server operations. This file is part of the server and handled automatically by the underlying tooling. This is invisible to you during development.
We upgraded our AIX Environment from WL 6.1.0 to 6.1.0.1 without stopping the WL Server (ApplicationCenter is not installed in this WAS Profile). We have WAS 8 in Netowrk Deployment Configuration.
Installation Manager installed it successfully, then we reboot the server and we got this trying accessing the console:
Error 500: javax.servlet.ServletException: Worklight Console
initialization failed.Logged Exception:
com.worklight.server.database.api.WorklightDataSourceException:
FWLSE0194E: Worklight server cannot be started because of failure
while getting a connection from data-source bound to resource
reference: jdbc/WorklightDS. Make sure the database is up, the
credentials are correct and the driver is available for the server.
[project buytec_worklight]
I searched the right way to upgrade and I saw that we should have stopped the server than we should follow this procedure:
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=%2Fcom.ibm.worklight.upgrade.doc%2Fdevenv%2Fc_upgrade_to_srvr610_upgrading_wl_console_upgrade_console.html
But at first, with WL 6.1.0 we didn't use the ant-task to deploy the console, we just put the .war found in the Eclipse Studio with the right plugin, so now i cannot manage to understand how to upgrade the console manually.
Have you any suggestions?
I don't know what you mean by "upgrade the console manually". The Worklight Console is part of the .war file you deploy to the application server, but the console doesn't have anything to do with the connection to the database.
If you want to "upgrade the console", you actually mean that you want to update the .war file, so deploy a .war file that was generated using Worklight Studio 6.1.0.1.
You can also follow the manual upgrade instructions for 6.1.0.1: http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/topic/com.ibm.worklight.upgrade.doc/devenv/c_upgrade_to_srvr610_addl_info_manual_app_srvr_upgrade.html
Because you didn't properly start the upgrade process, I suggest that you will take the time to review all upgrade topics, from the start: http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/topic/com.ibm.worklight.upgrade.doc/devenv/c_upgrade_to_srvr610_in_production_env.html
In addition, it doesn't matter how you first installed 6.1.0.0, you can still use either Ant or manual upgrading.
I simply re-add the .jar files driver for db2, checking that they are resolved, set again the Data sources JDBC, uploaded a new console.war created with eclipse and it worked!
We have a Live mule server (Community edition ) 3.3.0 running on a Windows 2008 server.
We have several apps running on it.
We tried to hotdeploy a new app in it. It failed saying some port was already in use/bind - this was a JMX port. However we were unable to undeploy it. It didn't create any anchor file as it had failed deployment so we couldn't do the clean undeploy. When we tried to delete the exploded folder it didn't allow as it said the jars in the lib were in use.
We tried to re-deploy the same file with fix again but it had no effect.
Question is irrespective of what caused out application to fail - how can one undeploy or take out a Mule app (failed) completely? It doesn't have anchor file and trying to delete says jar in use. Only way we could do was to stop mule and then delete the folder and restart Mule - totally unacceptable in production environment.
Any clues?
This is a known bug on 3.3.0 that was fixed on 3.3.1.