Error "query did not return a unique result" while creating a Theme in VMware Cloud Director 10.6
search cancel

Error "query did not return a unique result" while creating a Theme in VMware Cloud Director 10.6

book

Article ID: 375509

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • In VMware Cloud Director 10.6, you might encounter the following error when creating a theme: "query did not return a unique result."



  • From the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log, you may observe the following entries:

2024-07-22 14:13:19,749 | ERROR | pool-jetty-1046565 | DefaultExceptionMapper | Internal server exception | requestId=#######-####-####-####-########,request=POST https://vcd.example.com/cloudapi/1.0.0/brandingThemes,requestTime=1721657599708,remoteAddress=##.##.##.##:53605,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+json;version 40.0.0-alpha application/json;version 40.0.0-alpha
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)

Environment

VMware Cloud Director 10.6

Cause

This issue occurs while creating a branding theme by a LDAP user who is imported into multiple VMware Cloud Director organizations

Resolution

 

This is a known issue in VMware Cloud Director version 10.6.0, and it will be addressed in VMware Cloud Director 10.6.1

The workaround is to create the branding theme using another user who is imported into only one organization.

Additional Information