Symptoms

OSA platform has been upgraded from 6.0 to 7.0.

Some APS 2.0 application provisioning tasks started to fail with error:

APS Application Error:
500 Internal Server Error
[Rest::RestException] Access Denied. Unauthorized request..
Body: {
"code": 500,
"error": "Rest::RestException",
"message": "Access Denied. Unauthorized request.",
"details":
{
"error": "com.parallels.bss.rest.errors.BSSAPSError",
"message": "Access Denied. Unauthorized request.",
"packageId": "551f7e8c-0b92-4d80-b06d-61bc090d92d3"
}

In /var/log/pa/core.log the following errors can be found at the time of the failure:

2017-03-09T20:14:33.747441+01:00 poamgt-test.cb.nsc.no : DBG [bss-rest-endpoints:1922 pa-rest-task-169 pau]: c.p.p.s.b.u.e.BillingApiInvocationContextBuilderBean Could not find PAAccount for given actor. Error: null
2017-03-09T20:14:33.748925+01:00 poamgt-test.cb.nsc.no : DBG [bss-rest-endpoints:1922 pa-rest-task-169 pau]: c.p.b.r.e.BSSAPSErrorHandler APS error occured com.parallels.bss.rest.errors.BSSAPSError: Access Denied. Unauthorized request.#012#011at 

Cause

Changes in Billing Upsell API on BA 7.0 require the application code to be improved.

Resolution

Contact the corresponding APS application packager and request a new version of the application, fully tested and compatible with OSA 7.0.

To patch the application code and resolve the issue in the meantime, it is enough to find the spots, where the following call is made:

$pba = $apsc->getResources("implementing(http://www.parallels.com/pba)")

and change it to:

$pba = $apsc->impersonate($this)->getResources("implementing(http://www.parallels.com/pba)")

Important note: make sure that the latest version of aps-php-runtime package is installed. It can be downloaded here: PHP Runtime Library Downloads

Internal content