-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration Fail with RuntimeException #24
Comments
The error means that you have a ehr in your source system which has the same subject as another ehr. (old ehrbase did not check that correctly ).
the combination of id.value and id.scheme needs to be unique. You have to go into you old db and use the query
this will give you the ehrs with id.value and id.scheme then you need to changed the ones which are duplicated. |
Mirgation was successful, thank you |
I did the same migration with an other database
gives me no output as I deleted all duplicates before. I got still the same error message with
|
@ujanssen weird, the error message seems to be the same. To get the obvious stuff out first, are you migrating into an empty target DB? Thank you. |
the import database is started via docker and I run the command from Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. java.lang.RuntimeException: SQL [insert into "ehr"."ehr_status_data" ("vo_id", "num", "ehr_id", "citem_num", "rm_entity", "entity_concept", "entity_name", "entity_attribute", "entity_path", "entity_path_cap", "entity_idx", "entity_idx_cap", "entity_idx_len", "data") values (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb)), (cast(? as uuid), ?, cast(? as uuid), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, cast(? as jsonb))]; ERROR: duplicate key value violates unique constraint "ehr_status_subject_idx" |
Well then you would need to run not the docker image but checkout the code run it in debug mode and find out which ehrIds this ehr_status with 10, DEMOGRAPHIC uses and why is duplicated. Maybe set a breakpoint and delete ehr_status_subject_idx and see if it run tough and then you could look into the db. Sorry for not be more specific but without more info about the data which create the issue I do not have an Idee. |
Before reporting an issue
Environment information
Steps to reproduce
We have run the migration tool via docker and docker compose with the follow environment:
the database ehrnase ist the old DB and ehrbase2 is the new one.
Expected behavior
DB is mgrated in ehrbase2 and the ehrbase container is running in version 2.x.xDB is mgrated in ehrbase2 and the ehrbase container is running in version 2.x.x
Actual result
Further information
No response
The text was updated successfully, but these errors were encountered: