Subscribed content library synchronization tasks fail during the Estimate Cost phase.
The /var/log/vmware/content-library/cls.log on the affected vCenter Server confirms the failure with the following trace:
YYYY-MM-DDTHH:MM:SS.386-07:00 | ERROR | ml6zjceu-2296605-auto-1d82m-h5:70173993-bb | cls-simple-activity-14 | ContentLibraryActivityCallback | vapi opId: ml6zjceu-xxxxxxx-auto-xxxxx-h5:xxxxxxxx- vapi call finished with an errorjava.lang.NullPointerException: null at com.vmware.cl.utils.LibraryUtilityService.estimateCost(LibraryUtilityService.java:131) ~[cls-main-1.0.0.jar:?] at com.vmware.cl.activities.SyncLibraryActivity.phaseSyncItems(SyncLibraryActivity.java:316) ~[cls-main-1.0.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_452]
This issue occurs when an item within a third-party publisher's JSON manifest file contains an empty file definitions array ("files": [ ]).
During the Estimate Cost phase, the content library service attempts to calculate the storage cost for the item. Because the file definitions array is empty, a null value is returned instead of a file object. This results in a java.lang.NullPointerException, causing the immediate termination of the synchronization task to prevent data corruption.
Example:
{ "created": "YYYY-MM-DDTHH:MM", "description": "####", "version": "####", "files": [ ], "id": "urn:uuid:########-####-####-####-###########", "name": "Template-name", "properties": { ####}, "selfHref": "Windows/Windows-####-Standard/item.json", "type": "####" },
To resolve the metadata inconsistency in the publisher's JSON manifest file and restore subscribed content library functionality, the following sequential steps must be executed:
Access the external web or file server where the subscribed content library is published and hosted.
Locate the root directory of the published library and identify the JSON manifest file.
"files": [].https://knowledge.broadcom.com/external/article/397243/subscribed-content-library-synchronizati.html