Error "query did not return a unique result" when attempting to manage a vApp in VMware Cloud Director
search cancel

Error "query did not return a unique result" when attempting to manage a vApp in VMware Cloud Director

book

Article ID: 381163

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Unable to manage vApp due to the below error in UI :
    "query did not return a unique result" 
  • Multiple instances of the same vApp are seen in the UI.
  • In the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, you see an entry such as :
    org.hibernate.NonUniqueResultException: query did not return a unique result: 2
            at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:844)
            at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328)
            at com.vmware.vcloud.common.repository.impl.SessionFactoryRepositoryTemplate.findUniqueByCriteria(SessionFactoryRepositoryTemplate.java:311)
            at jdk.internal.reflect.GeneratedMethodAccessor254.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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
            at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:220)
            at com.sun.proxy.$Proxy108.findUniqueByCriteria(Unknown Source)
            at com.vmware.ssdc.backend.dao.impl.AppRtDaoImpl.getAppFromVappId(AppRtDaoImpl.java:416)
            at jdk.internal.reflect.GeneratedMethodAccessor4529.invoke(Unknown Source)
    

Environment

VMware Cloud Director 10.5

Cause

This issue can occur when duplicate entries exist in the VCD database for the vApp.

Resolution

Database modifications are required to remove those duplicate entries and will require Broadcom Technical Support assistance.

Contact technical support and note this Knowledge Article ID (381163) in the problem description. For more information, see How to Submit a Support Request