null id in com.vmware.vcloud.common.model.event.AuditTrailEventModel entry (don't flush the Session after an exception occurs) - null id in com.vmware.vcloud.common.model.event.AuditTrailEventModel entry (don't flush the Session after an exception occurs)"could not execute update query - ERROR: update or delete on table "app_template" violates foreign key constraint "fk_catalog_item2app_template" on table "catalog_item" Detail: Key (id)=(########-####-####-####-############) is still referenced from table "catalog_item"VMware Cloud Director 10.5.x
As discussed in the following article, the existence of an application template in the organization prevents the organization from being removed and results in errors similar to the one above:
In this situation, there is a catalog item that still points to the application template, which is causing the removal of the application template from being successful due to a database constraint.
Contact Broadcom Technical Support and reference this Article ID (438198) in the problem description to resolve this issue. For more information on creating a request, refer to the following:
Creating and managing Broadcom support cases
Upload a backup of the database to the case when it is opened:
Back Up the Embedded Database of Your VMware Cloud Director Appliance
Put the error message in the case Description.