AdaptingException

I have a custom logic service which takes a couple of partial objects and creates a small object graph, then returns the root of the graph.

I’ve seen it work with the Android SDK once, but I’m not sure how as now it won’t work at all. Trying to send the same request via REST results in the objects being created and suitable JSON returned.

When run using the Android SDK I’m always getting the error:

Type:“weborb.exceptions.AdaptingException”,
Description:“unable to adapt parameter to a method argument type. null”
ExceptionClass:“ServiceException” {Msg:“none”, Cause:“none”}

and no objects are created. This seems to be somewhat inconsistent as previously I have seen a similar issue where the service did create the objects but was unable to return them.

I’m not sure how to investigate this issue further as it’s a weborb exception…

I have a few questions for you:

    Is this for the Backendless Cloud or Standalone?
    Is the code deployed to the cloud or you’re testing it locally (CodeRunner Debug)?
    Are you using the latest version of Code Runner?
Regards, Mark

Hi Mark,

Just writing an e-mail to send you sample project etc.

  1. Cloud
  2. Deployed to production, deployed by coderunner
  3. Yes, I believe so, as I downloaded it specifically to deploy this a few days ago (CodeRunnerSDK_3.0.16)

Thanks

It seems that this issue is related to Integer values not being supplied from the client - even though they have a default value set in the DB schema - so the unpacking of the not-yet-saved to the DB object fails due to these null values.

Please let me know your app id and also post the sample java/android code which causes the error.

Thanks,
Mark

Hi Mark,

I sent an e-mail to support with those details (a download link to a sample Android project which demonstrated the issue). The subject line of the e-mail is the URL of this support topic.

Thanks

Hi Wain,

Is the issue still reproduced?

I’m not sure, I worked around the issue by changing my data model and moved on.

Yes, this does still happen, whenever a data model class contains a number / boolean and you don’t pass the value (null instead) this problem will manifest.