"No application in the DB with the id" error when invoking adapter procedures from client applications

StackOverflow https://stackoverflow.com/questions/21073299

Question

On a Windows 7 machine, i have installed:

  • Eclipse Java EE 4.3.1 64 bit edition,
  • IBM Worklight Studio version 6.1.0 from Eclipse Marketplace
  • ADT

I am getting an error while trying to invoke an adapter procedure from a client application. I am following this training module

I haven't coded this application on my own. Rather I downloaded the associated sample of the above training module.

I deployed the adapter that is part of the sample and successfully tested the adapter procedures by using the option Run As --> Invoke Worklight procedure

Now when i enable the android environment and try to run this app (the html and the associated js is trying to invoke the js procedures), i get the following errors and the application doesn't run as expected

[ERROR ] FWLSE0020E: Ajax request exception: There is no application in the DB with the id 'InvokeAdapterProcedure'. [project InvokeAdapterProcedure] [ERROR ] FWLSE0117E: Error code: 1, error description: INTERNAL_ERROR, error message: FWLSE0069E: An internal error occurred during gadget request [project InvokeAdapterProcedure]There is no application in the DB with the id 'InvokeAdapterProcedure'., User Identity {SubscribeServlet=null, wl_authenticityRealm=null, wl_remoteDisableRealm=null, SampleAppRealm=null, wl_antiXSRFRealm=null, wl_deviceAutoProvisioningRealm=null, WorklightConsole=null, wl_deviceNoProvisioningRealm=null, wl_anonymousUserRealm=null}. [project InvokeAdapterProcedure] com.worklight.common.log.filters.ErrorFilter

I can very well see the application installed under the Worklight server (in the servers view)

What exactly is wrong?

I imported this app back to WL 6.0 and i was able to successfully run it there. So, is this a issue with WL 6.1?

Was it helpful?

Solution

First, Worklight does not support Eclipse Standard. Rather, you should use Eclipse Java EE.

Second, have you deployed both the application and adapter?
I've done the following steps and the application works for me:

  1. Imported the Adapter Procedures sample project .zip file
  2. Opened the adapters folder, right-clicked on the RSSReader adapter and chose Run As > Deploy Worklight Adapter
  3. Opened the apps folder, right-clicked on the InvokeAdapterProcedure app and chose Run As > Run on Worklight Development Server
  4. Right-clicked on the Worklight project and chose Open Worklight Console
  5. Clicked on Preview as Common Resources

The result was: enter image description here

I also tested this when adding the Android environment and previewing it via Worklight Console's MBS, as well as an in a real Android device.

Make sure that after adding the Android environment you build and deploy the application by choosing Run As > Run on Worklight Development Server.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top