Search the VMware Knowledge Base (KB)
View by Article ID

vRealize Code Stream Management pack experiences duplicate key errors (2149245)

  • 0 Ratings


When publishing the vRealize Automation 7.x subscriptions with the dependencies, in the vRealize Orchestrator logs, you experience these symptoms:
  • vRealize Code Stream Management pack experiences duplicate key errors.
  • You see error messages similar to:

    2017-02-06 18:58:10.001+0000 [https-jsse-nio-] WARN  {} [SqlExceptionHelper] SQL Warning Code: 3621, SQLState: 01000
    2017-02-06 18:58:10.001+0000 [https-jsse-nio-] WARN  {} [SqlExceptionHelper] The statement has been terminated.
    2017-02-06 18:58:10.001+0000 [https-jsse-nio-] WARN  {} [SqlExceptionHelper] SQL Error: 2627, SQLState: 23000
    2017-02-06 18:58:10.002+0000 [https-jsse-nio-] ERROR {} [SqlExceptionHelper] Violation of PRIMARY KEY constraint 'pk_vmoworkflow'. Cannot insert duplicate key in object 'dbo.VMO_Workflow'. The duplicate key value is (5993e158-a6a7-4b81-97eb-6e03ad9a12a6).
    2017-02-06 18:58:10.002+0000 [https-jsse-nio-] ERROR {} [BatchingBatch] HHH000315: Exception executing batch [could not execute batch]
    2017-02-06 18:58:10.002+0000 [https-jsse-nio-] WARN  {} [WorkflowManagementServiceImpl] Unable to import a Workflow: VerifyDay2Execution (5993e158-a6a7-4b81-97eb-6e03ad9a12a6)
    org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into vmo_workflow (allowedoperations, description, iconId, name, objlocked, objversion, objectname, referencetypes, restartmode, workflowcategoryid, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


This issue occurs because, by default, the vRealize Code Stream Management Pack executes parallel workflows. If two or more of the subscriptions are dependant on the same vRO workflow, the parallel workflows can attempt to insert the same item at the same time and violate the key constraints that prevent duplicate IDs from being entered.


This is a known issue affecting vRealize Code Stream Management Pack 2.2.
Currently, there is no resolution.

To work around the issue, reduce the number of concurrent workflows and prevent occurrences.

To reduce the number of concurrent workflows and prevent occurrences:
  1. Open the vRealize Orchestrator Client and connect to the appropriate vRO server.
  2. Log in as an administrator or as an user having appropriate permissions.
  3. Select Design at the top of the client.
  4. Select the Configurations tab in the navigation pane (i.e., the tab with the icon that has gear superimposed on a page).
  5. Navigate to Library > Content Management > Package Types .
  6. Select Automation-Subscription.
  7. Click on the Edit icon. 
  8. Select the Attributes tab in the main display pane.
  9. Edit  maxWorkflows and change it from 2 to 1.
  10. Click Save and Close .

Additional Information

This change will be overwritten by any updates to the management pack and you will be required to reapply the adjustment.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 0 Ratings