MobileFirst application not using deployed adapter, attempting to use development server adapter instead - ibm-mobilefirst

I'm running MobileFirst 7.0 on a Liberty installation.
Having successfully deployed my application and adapter into the runtime, the preview, when run from the servers operations console, is apparently trying to communicate with the adapter from the development server rather than the one running on Liberty.
[/MaximoMobile/apps/services/api/PhyCount/common/query] failure. state: 404, response: undefined
The runtime on the server is not called MaximoMobile, that is just the name of the project within Eclipse. It shouldn't be being referenced at all outside of the local copy of Mobilefirst.
I've looked up documentation in instructing the application to use the deployment server rather than the development server using JNDI entries in the server.xml file (http://www-01.ibm.com/support/knowledgecenter/SSHSCD_6.3.0/com.ibm.worklight.deploy.doc/admin/t_using_JNDI_lookup_to_override_WL_properties.html), but I can't see anything incorrectly set, or anything even relating to the adapter.
I have managed to set the endpoint to /worklight as required using Eclipse, but it's still returning 404 and attempting to access a non-existent file.

Answering my own question for people who may later stumble upon this looking for an answer:
The preview on the server doesn't work in the same way as the local preview does, and any part of the interface that requires an adapter won't function.
If you need to test the connection to the server, deploying to a device will allow you to do so!

Related

Hmm... we didn't recognise that application error message

I've been implementing the API sample from GitHub. In my development environment I can logon using the OAuth method, and obtain a token and perform the query request on the XERO. If I deploy, I can't get the application to work because of the errormessage 'Hmm... we didn't recognise that application.' I can logon, then select the instance to work upon and then the error message appears. For some reason i can't obtain a token:
I get a https://app.xero.com/oauth/APIAuthorise?oauth_token=
message, in my dev env. I get a token.
I found several posts regarding this message on the Xero forum. It is written that it has to do with TLS and I should upgrade to 1.2 My issue is that my connection is already tls1.2, I verified. I tried two different hosts to do an extra check but with the same result (virtual windows 2008 server and Linux)
The Question is how to solve this issue. Again my application is working well on development, but not when I deploy. The development system is running under W10 / Xampp and PHP 7.2. My production environments are a regular Linux host (not sure what) and a virtual Windows 2008 server with uniform server.
The code is very similar to the original sample as published on GitHub, so I didn't post it here.

Direct update not working when dynamically changing server url during runtime- MobileFirst 7.1

I have implemented dynamically changing server URL at runtime. I followed the instruction given in this link. The results were good I was able to connect different servers basically development servers like MFP Server in eclipse. But direct update does not work when a new server is connected. Similarly, if I try the same thing with stand-alone servers like our QA or UAT, then direct update works.
How can I make the direct update work for development servers?

Separate trace/log file per runtime and wlapp

By default all MobileFirst logging goes into the application server log files.
As a server can have multiple runtimes and each runtime multiple applications and adapters, everything goes into a single file.
Is there a way to have separate log/trace file for each MFP runtime, adapter and/or wlapp application?
MobileFirst Platform Server uses the application server's logging facilities, so the logs and trace go wherever the application server decides to put them.
WebSphere Application Server, Liberty Core, and Tomcat, all have various (and different...) ways to configure the app server logging in ways that may meet some of your needs (like logging per-application, for example - each MobileFirst runtime is a separate "application", as far as the app server is concerned - or separating logs from different facilities into different files). The MobileFirst Platform Server itself doesn't provide any special support for this - it just logs things, and lets the app server determine what to do with it. I can't think of a way you'd be able to do separate logging from different WLAPPs or adapters, since I can't think of any way that the app server could identify what WLAPP or adapter a log message is coming from and separate it from others.
However, depending on what you are trying to do, you may be able to extract the kind of information you want out of Operational Analytics.

How to deploy a local eclipse worklight project in cloud server?

I developed an android based hybrid app in the IBM MFP-7.0., My app is fetching the data from the Java service which is running in Tomcat Server. Here the app adapters are running in my local system MFP server to get the data from the Java service, So that I can only run the app in my local system android emulator. Now, we want to deploy the app in the cloud so that we can give this app to our users. Can some body help me how to run our MFP app in the cloud? Is it required to place eclipse in the cloud to run my MFP server like the way I am running in my local system?
Thanks in advance.
It looks to me like your understanding is completely lacking in this subject matter. Also note that this question has got nothing to do with programming.
You need a host machine. On this server you will run an application server (Tomcat, WebSphere Full profile, WebSphere Liberty profile - either single or a farm, depending on your required network topology and security & scalability needs).
On this application server you deploy MobileFirst
You will also need a database
This host machine needs to be accessible (with appropriate security) to the public Internet so that it could serve apps installed in end-users' devices
The application needs to be configured to send requests to the server (or to any front-side server like a Load Balancer, again, depending on your topology)
The generated application needs to be submitted to an App Store so that users could download and install it on their devices
I suggest that you will do some reading before asking any question. Since you're using IBM MobileFirst, start by reading the user documentation: http://www-01.ibm.com/support/knowledgecenter/SSNJXP/welcome.html

Disable Direct Update for worklight6.1 development platform

Right now i am developing an app on remote DEV server. Every time when i update the code (js,html,css etc) then test on the device locally. There is a popup to force me to update the app. But my app need to connect DEV server for testing some backend feature like login.
DEV server is a remote Websphere running WL6.1 for development purpose. Why i need it because my app connect to some web services like Auth server via internal environment (actually is VPN). And those services i cannot set up easily in local environment. That makes using localhost for development is not really possible.
My problem is feeling the development process not really handy. Every time i change the code and want to run on the devices. I need to upload the .wlapp via console. It takes time! Everyday i change the code thousands time. That's why i need a solution.
And now i am seeking for 2 possible ways:
Auto push the .wlapp to remote server when i run and build. Can ANT do that? i read the Doc and find it's a bit of complicated.
Disable Direct Update. Actually i do a tricky hack inside worklight.js to override this feature. But i think it is not a good solution. So, is there any server config can switch the that off?
And i read this thread IBM Worklight - How to disable Direct Update?
Not working.
From what you are describing, things seem to work exactly as they should.
You have your local Worklight Development Server (that's the Worklight Studio plug-in you've installed in your Eclipse).
You have a remote server - here I am presuming this is actually some application server with Worklight Server deployed on it (that is, not the plug-in, but an actual installation of the server component) as well as your deployed project's .war file.
If that's not your setup, you need to think again about your 'testing setup'.
Auto push the .wlapp file to remote server. So the dev server always
keep the latest resource. Not to force me "update" the older version
on the server.
No. You can't do this. You need to manually build your app with the correct connectivity settings for the remote server via Run As > Build Settings and Remote Target.
In addition to the native project that will now contain these connectivity settings for the actual app, you will also have a .wlapp file in the bin folder. You will need to manually deploy it each time you're changing your app's contents. That's why you do development testing in the local development server... when moving to a remote server, that's for QA/UAT/PROD purposes usually.
Just disable this annoying feature in DEV environment.
You will need to do this in both servers via their respective Worklight Console as described in the question you've linked to, so that once you deploy the .wlapp file, it will not send a Direct Update request.
Instead, you'll need to manually re-install the app each time.
I suspect you didn't do this action on the remote server?
If you did, then you need to explain your setup, as the only thing you've wrote about was its name... "dev".
No. You need to manually deploy the .wlapp to your remote server.