"query did not return a unique result" error received when attempting to manage a VM in VMware Cloud Director 10.2
search cancel

"query did not return a unique result" error received when attempting to manage a VM in VMware Cloud Director 10.2

book

Article ID: 325498

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

Symptoms:
  • In the UI, when managing a VM you see the following error
    • org.hibernate.NonUniqueResultException: query did not return a unique result: X
    • Where X denotes a value such as 2.
  • In the vcloud-container-debug.log you see an entry such as
    • at com.vmware.vcloud.common.persist.dao.impl.HibernateManagedServerDao.findHostByValRef(HibernateManagedServerDao.java:106)
  • In the vcloud-container-debug.log you see an entry such as
    • at com.vmware.vcloud.fabric.storage.dao.impl.HibernateDatastoreDao.findByValref(HibernateDatastoreDao.java:39)


Environment

VMware Cloud Director 10.x

Cause

This is a Known Issue affecting VMware Cloud Director 10.2.

The issue occurs when new objects such as Datastores or Hosts are added to the vCenter Inventory.

The addition of a new object triggers an update to Cloud Director and when more than one thread starts processing this update, it causes a duplicate entry to be inserted into the Cloud Director Database.

Resolution

To resolve this issue, please open a Support Request.
Database modifications are required to remove those duplicate entries and will require VMware Technical Support assistance.