Hello everyone,
I am having an issue upgrading OpenClinica-3.13 to a newer version. After completing all of the upgrade steps and trying to deploy it with Tomcat, the deployment fails with the following error:
SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.akaza.openclinica.dao.core.OCContextLoaderListener] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/akaza/openclinica/applicationContext-core-db.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set migration/3.14/2017-06-05-OC-7394.xml::2017-06-05-7394-1::sdibona: Reason: liquibase.exception.JDBCException: Error executing SQL ALTER TABLE event_crf ADD CONSTRAINT uniq_study_event_crf_version_study_subject UNIQUE (study_event_id, crf_version_id, study_subject_id): Caused By: Error executing SQL ALTER TABLE event_crf ADD CONSTRAINT uniq_study_event_crf_version_study_subject UNIQUE (study_event_id, crf_version_id, study_subject_id): Caused By: ERROR: could not create unique index "uniq_study_event_crf_version_study_subject" Detail: Key (study_event_id, crf_version_id, study_subject_id)=(59977, 8175, 5910) is duplicated.
I found a script for removing duplicates (OpenClinica-x.x/conf/database/PostgreSQL/upgrade/Duplicate_Delete_v5.sql), but it only works with a different table and doesn't solve my issue. There are 149 duplicates in my database, and I am unsure if manual deletion is a good idea since there are references to this table in the database.
Does anyone faced with such an issue? Unfortunately, searching doesn't provide me any relevant information.
Hello everyone,
I am having an issue upgrading OpenClinica-3.13 to a newer version. After completing all of the upgrade steps and trying to deploy it with Tomcat, the deployment fails with the following error:
SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.akaza.openclinica.dao.core.OCContextLoaderListener] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/akaza/openclinica/applicationContext-core-db.xml]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set migration/3.14/2017-06-05-OC-7394.xml::2017-06-05-7394-1::sdibona: Reason: liquibase.exception.JDBCException: Error executing SQL ALTER TABLE event_crf ADD CONSTRAINT uniq_study_event_crf_version_study_subject UNIQUE (study_event_id, crf_version_id, study_subject_id): Caused By: Error executing SQL ALTER TABLE event_crf ADD CONSTRAINT uniq_study_event_crf_version_study_subject UNIQUE (study_event_id, crf_version_id, study_subject_id): Caused By: ERROR: could not create unique index "uniq_study_event_crf_version_study_subject" Detail: Key (study_event_id, crf_version_id, study_subject_id)=(59977, 8175, 5910) is duplicated.
I found a script for removing duplicates (OpenClinica-x.x/conf/database/PostgreSQL/upgrade/Duplicate_Delete_v5.sql), but it only works with a different table and doesn't solve my issue. There are 149 duplicates in my database, and I am unsure if manual deletion is a good idea since there are references to this table in the database.
Does anyone faced with such an issue? Unfortunately, searching doesn't provide me any relevant information.