Error: "Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1" when removing media items in Cloud Director
searchcancel
Error: "Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1" when removing media items in Cloud Director
book
Article ID: 321903
calendar_today
Updated On: 03-31-2025
Products
VMware Cloud Director
Issue/Introduction
Duplicate media items are seen in the catalog on the UI.
The items have an UNKNOWN status.
Removing one item returns the error in the UI: [ ########-####-####-####-############ ] Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1 org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1
With NSX V2T migration tool, running a cleanup task after a completed migration returns this error.
This error might also be present when deleting a subscribed catalog also
Environment
VMware Cloud Director 10.x
Cause
This issue can occur due to duplicate media items and their records in the database.
Resolution
Database modifications are required to resolve this issue. For assistance, contact technical support and note this Knowledge Article ID (321903) in the problem description. For more information, see How to Submit a Support Request.