Oct 19 2018

T04-2017: Unit or Unit Type Errors While Upgrading to BIOVIA Foundation 2017 R2

BIOVIA Foundation Hub 2017 R2 added almost 100 new Unit Types to the default installation.  We require active Unit Type names to be unique and we enforce this with a uniqueness constraint applied to the data in Oracle.  During an upgrade, it is possible that this uniqueness constraint will be violated and the upgrade of the BIOVIA Foundation Hub Oracle schema will terminate.  This leaves the BIOVIA Foundation Hub Oracle schema in a partially upgraded state that cannot be rolled back or continued.

Note the uniqueness constraint will only be violated if you've registered custom Unit Types or Units into BIOVIA Foundation Hub AND these custom Unit Type/Unit names just happen to match the Unit Type/Unit names being added by BIOVIA in this 2017 R2 release

This issue has been reported as JIRA defect number DAT-9024.
Resolution:
If this is a new installation of BIOVIA Foundation Hub 2017 R2, you will not encounter this problem.

If this is an upgrade installation of BIOVIA Foundation, connect to the Foundation Hub Oracle schema and run the following SQL:

select id, name, external_id from cor_unit where external_id is not null;

If this SQL returns no records, you may safely upgrade using the BIOVIA Foundation 2017 R2 installer.  If this SQL returns any records (which is extremely rare), do not use the BIOVIA Foundation 2017 R2 installer to upgrade the existing installation.  BIOVIA is preparing BIOVIA Foundation 2017 R2 HF1 which will correctly upgrade the Unit Types/Units and we will announce when the release is available.

If you have already encountered this error message and were unable to complete the upgrade, conatct BIOVIA Customer Support.  The BIOVIA Foundation 2017 R2 HF1 installer will allow you to continue the upgrade from the point of failure.

 
Error Mesage:
<date/time stamp> [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Hibernate operation: could not execute statement; SQL [n/a]; ORA-00001: unique constraint (<YourHubSchema>.COR_UNIT_TYPE_UK) violated

; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (<YourHubSchema>.COR_UNIT_TYPE_UK) violated