UIM Finder API Returns Error Message "The Result List Has Been Closed." When Searching Telephone Numbers (Doc ID 1532704.1)

Last updated on SEPTEMBER 16, 2016

Applies to:

Oracle Communications Unified Inventory Management - Version 7.1.2 and later
Information in this document applies to any platform.

Symptoms

Customer recently applied patch 7.1.2.3 patch 4 build 286 in our DEV environment. We updated "reserveMDN" web service to leverage newly row-locking feature. When row-lock policy is set on the search criteria object, the Finder API is ble to return records when records are found matching the criteria. However when no records are found it throws an exception along with the message "The result list has been closed." The web service returns this fault message which is not much helpful to the consumers.

TelephoneNumberManager mgr = InventoryHelper.makeTelephoneNumberManager();
TelephoneNumberSearchCriteria searchCriteria = mgr.makeTelephoneNumberSearchCriteria();

//Set the searchCriteria
....

LockPolicy lockPolicy = InventoryHelper.makeLockPolicy();
//Set the number of resources to be rowlocked to slighter higher value than requested quantity.
lockPolicy.setNumberOfResources(mdnquantity + 20);
//exclude resources which already have been rowlocked from the result.
lockPolicy.setFilterExistingLocks(true);
searchCriteria.setLockPolicy(lockPolicy);
list = mgr.findTelephoneNumbers(searchCriteria);
if(list != null && list.size()==0)
{
 errorMessage[0] = "No MDNs available in inventory for the NPA-NXX";
 throw new UIMFaultType(errorMessage,"5020");

}

 
The exception is thrown by TelephoneNumberManager.findTelephoneNumbers(searchCriteria) method. Prior to this change, if the list returned was null or empty, we would handle it by returning a FaultResponse to the consumer of the web service.
If lockpolicy is not set on the searc criteria, then the method does not throw an exception.

ERROR
-----------------------
"The result list has been closed."

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms