Subscribed content library synchronization is failing with error "A general runtime error occurred. An error occurred: java.lang.NullPointerException"
Log snipped:
| ERROR | ########-######-####-####-##:######## | cls-simple-activity-13 | ContentLibraryActivityCallback | vapi opId: ########-######-####-####-##:######## - 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:270) ~[cls-main-1.0.0.jar:?] at sun.reflect.GeneratedMethodAccessor2828.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_422] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_422] at com.vmware.vcloud.activity.toolkit.simple.executor.SimpleActivityWorker.executePhase(SimpleActivityWorker.java:358) [activity-framework-toolkit-1.0.0.jar:?] at com.vmware.vcloud.activity.toolkit.simple.executor.SimpleActivityWo| DEBUG | | cls-simple-activity-5 | CertificateTrustStrategy | getServerThumbprint: algorithm SHA-1 host https://3rd-party-content-library-FQDN/ContentLib_Prod/lib.json########-######-####-####-##:########
The missing "selfHref" property In item.json files of the third party publisher caused the vAPI call to fail with a NullPointerException.
Item.json files need to have selfHref property.
Example:{ "version": ..., "id": ..., "name": ..., "created": ..., "description": "", "type": ..., "files": [...], "properties": ..., "metadata": [...], "vms": [], "selfHref": "Windows/Windows-2012R2-Standard/item.json"
You will notice two new files at the root directory of your 3rd Party Content Library. The first is the items.json which provides reference to all the files within the library and you will see that each subsequent directory will also contain an individual item.json file describing the content within the local directories. The lib.json is the 3rd Party Content Library endpoint and is what you will be specify when subscribing to a 3rd Party Content Catalog and by providing the absolute URL to this file when setting up a new Content Library.