Upgrade failure caused by duplicate email addresses

Upgrade failure caused by duplicate email addresses

Error traces:

Exception occured while executing...
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'RequestNotification_Recipients_PK'. Cannot insert duplicate key in object 'dbo.RequestNotification_Recipients'. The duplicate key value is (1925337, ).
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2065)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.zoho.cp.WrappedPreparedStatement.executeBatch(WrappedPreparedStatement.java:185)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.adventnet.db.api.RelationalAPI.executeBatch(RelationalAPI.java:965)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.adventnet.persistence.DataAccess.executeBatch(DataAccess.java:3203)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.adventnet.persistence.DataAccess.executeBatch(DataAccess.java:3187)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.adventnet.persistence.DataAccess.insertRows(DataAccess.java:3106)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.adventnet.persistence.DataAccess.add(DataAccess.java:349)
Sep 4, 2023 3:08:31 PM  [SYSERR]  [INFO] : at com.adventnet.persistence.DataAccess.add(DataAccess.java:292)

Cause: 

There are duplicate email addresses for the same draft with different cases (e.g., abc@mail.comABC@mail.com).

Note: 
We recommend taking a full backup before and after applying the below workaround.

Workaround:

>> Connect the server to DB, execute the below query, and export it as a file for reference.

select * from drafts;

>> Execute the below query to unify the email addresses.

 update drafts set toaddress=lower(toaddress),cc=lower(cc);

 and repeat step 1.

>>  The PPM files can be applied after the successful execution of the above queries .

                  New to ADSelfService Plus?

                    • Related Articles

                    • Duplicate Request

                      Usecase: Script to duplicate the request in a single click using Callback Function and Page Script. Steps to configure: Download the attached files Login to SDP and navigate to Admin > Developer Space > Global Function > Copy & Paste the attached ...
                    • Upgrade failure to 10500 - Linux platforms

                      You may experience an upgrade failure in linux platforms when upgrading to 10500. Here are the traces from logs, Feb 21, 2020 4:55:03 PM  [com.adventnet.tools.update.installer.Unzipper]  [SEVERE] : ERRUnexpected Error. Please click View Log>> for ...
                    • Steps to revert the environment from an upgrade failure situation ?

                      1. Rename the failed set up installation folder to <supportcenter_old> . Don't delete the installation folder until the process is completed. Download the existing version which you had before this upgrade from the below archives link. ...
                    • Upgrade failure from 1420X to 14300.

                      Error trace: 5 Sep, 2023 6:08:56 PM [com.adventnet.tools.update.installer.Unzipper] [INFO] : lib/phantomjs/linphantomjs/phantomjs 25 Sep, 2023 6:08:56 PM [com.adventnet.tools.update.installer.Unzipper] [SEVERE] : ERR:Exception while writing ...
                    • 10.5 Linux Upgrade failure and solutions

                      Traces in logs : 1. java.lang.Exception: InitPgsqlScript exited with value :: 1 at com.adventnet.persistence.PostgresPreProcessor.executeInitPgsqlScript(PostgresPreProcessor.java:1733) 2. PGSQL Permission related errors. 3. SDP MSP installed as root ...