Error: "java.lang.NullPointerException" when deploying or editing a Virtual Machine in a vApp
search cancel

Error: "java.lang.NullPointerException" when deploying or editing a Virtual Machine in a vApp

book

Article ID: 370415

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • You are deploying or editing a Virtual Machine (VM) in VMware Cloud Director (VCD).
  • In the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, entries as below are logged:

java.lang.NullPointerException
        at com.vmware.ssdc.library.types.DatastoreURL.hashCode(DatastoreURL.java:20)
        at java.base/java.util.Arrays.hashCode(Arrays.java:4685)
        at java.base/java.util.Objects.hash(Objects.java:146)
        at com.vmware.vcloud.fabric.storage.placement.filters.DatastoreData.hashCode(DatastoreData.java:180)

Environment

VMware Cloud Director 10.5.1.1

Cause

This issue can occur if there are missing URLs in the datastore_inv table of the VCD database, which may be caused by an unused vCenter instance inside VCD portal.

Resolution

To resolve the issue, you can remove any vCenter instance that is not being used in the VCD environment. 

Refer the document for removal of the vCenter instance from VCD: Unregister a vCenter Server Instance From Your VMware Cloud Director