Error: Duplicate key [vcld=########-####-####-####-###########, moref=vm-xxxx] (attempted merging values com.vmware.vcloud.fabric.storage.model.publicview.VirtualMachineView) when trying to access a vAPP in Cloud Director
search cancel

Error: Duplicate key [vcld=########-####-####-####-###########, moref=vm-xxxx] (attempted merging values com.vmware.vcloud.fabric.storage.model.publicview.VirtualMachineView) when trying to access a vAPP in Cloud Director

book

Article ID: 404881

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Unable to view or edit a Virtual Application(vAPP) or the Virtual Machine(VM)  from VMware Cloud Director(VCD) UI. 
  • Below errors are seen in /opt/vmware/vcloud-director/vcloud-container-debug.log:

    More than one row with the given identifier was found: ########-####-####-####-############, for class: com.vmware.vcloud.fabric.storage.model.publicview.VirtualMachineView
            at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:92)
            at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:65)
            at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3072)
            at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:434)
            at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:415)
            at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:165)
            at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:223)
            at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
            at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905)
            at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
            at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
            at jdk.internal.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at com.vmware.vcloud.common.db.HibernateClassLoaderHelperBeanPostProcessor$SessionInvocationHandler.invoke(HibernateClassLoaderHelperBeanPostProcessor.java:280)
            at com.sun.proxy.$Proxy112.get(Unknown Source)
            at com.vmware.vcloud.common.repository.impl.SessionFactoryRepositoryTemplate.findById(SessionFactoryRepositoryTemplate.java:119)

Environment

VMware Cloud Director 10.6.x

Cause

This issue is caused due to duplication of the VMs present inside the vAPP. The VMs got duplicated in the VCD UI due stale snapshot entry present inside VCD Database for the VMs. The stale snapshot entry cannot be deleted from VCD UI since we are not able to access the VMs from the VCD UI and subsequently there are no snapshot entries present in the vCenter for the particular VMs.

Resolution

If you encounter this issue contact Broadcom Support and note this Article ID (404881) in the problem description. For more information, see Creating and managing Broadcom support cases.