Intermittent "ch.dunes.model.ServerDunesObject.getFactory() is null" error when loading XaaS forms in Aria Automation
search cancel

Intermittent "ch.dunes.model.ServerDunesObject.getFactory() is null" error when loading XaaS forms in Aria Automation

book

Article ID: 447523

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite) VCF Automation

Issue/Introduction

When you attempt to request catalog items in Aria Automation, the XaaS (Anything as a Service) form intermittently fails to load values. You observe the following error message in the user interface or the vco-app logs:

Cannot invoke "ch.dunes.model.configuration.IConfigurationElementFactory.getRootConfigurationElementCategorys()" because the return value of "ch.dunes.model.ServerDunesObject.getFactory()" is null

Environment

Aria Automation 8.18.1 patch 5

Aria Orchestrator (embedded)

Cause

This issue occurs due to a race condition in the Aria Orchestrator (vRO) scripting API during the retrieval of configuration element categories. When the Server.getConfigurationElementCategoryWithPath method is accessed under high concurrency or through rapid successive UI calls, the internal factory object intermittently fails to initialize, resulting in a NullPointerException.

Resolution

Resolution

This issue is a known defect. You should subscribe to this article to receive updates regarding the availability of a fix. See How to subscribe to a Knowledge Management (KM) article for instructions.

To work around this issue, you can implement one of the following changes to your vRO scripting:

Method 1: Implement Retry Logic

You can wrap the Server.getConfigurationElementCategoryWithPath call in a try-catch block and implement a retry loop with a small delay. This allows the factory object time to become available.

Example Scripting:

var MAX_RETRIES = 3;
var result = null;
for (var i = 0; i < MAX_RETRIES; i++) {
    try {
        result = Server.getConfigurationElementCategoryWithPath("###$/####/####/####");
        break;
    } catch (e) {
        if (i < MAX_RETRIES - 1) {
            System.sleep(100);
        } else {
            throw e;
        }
    }
} 

Method 2: Use an Alternative API Method

You can refactor your logic to use Server.getAllConfigurationElementCategories(). This method fetches all categories into an array, which you can then filter for your desired category name. This approach utilizes a different internal execution path that is not subject to the path-lookup race condition.