FHIR Chat · Bug: Exceptions when POSTing a CodeSystem (in transaction) · hapi

Stream: hapi

Topic: Bug: Exceptions when POSTing a CodeSystem (in transaction)


view this post on Zulip Patrick Werner (May 26 2020 at 11:00):

Trying to upload a CodeSystem (inside a transaction) i get this exception for every concept:

May 26 13:00:55 vitu-data tomcat9[4410]: 2020-05-26 13:00:55.045 [hapi-fhir-jpa-scheduler-local-4] ERROR o.h.e.j.batch.internal.BatchingBatch [BatchingBatch.java:128] HHH000315: Exception executing batch [java.sql.BatchUpdateException: Batch entry 0 insert into TRM_CONCEPT (CODEVAL, CODESYSTEM_PID, DISPLAY, INDEX_STATUS, PARENT_PIDS, CODE_SEQUENCE, CONCEPT_UPDATED, PID) values ('HGNC:3197', 72, 'EEF1A1P14', 1, 24122, NULL, '2020-05-26 13:00:55.034+02', 12122) was aborted: ERROR: insert or update on table "trm_concept" violates foreign key constraint "fk_concept_pid_cs_pid"
May 26 13:00:55 vitu-data tomcat9[4410]:   Detail: Key (codesystem_pid)=(72) is not present in table "trm_codesystem_ver".  Call getNextException to see other errors in the batch.], SQL: insert into TRM_CONCEPT (CODEVAL, CODESYSTEM_PID, DISPLAY, INDEX_STATUS, PARENT_PIDS, CODE_SEQUENCE, CONCEPT_UPDATED, PID) values (?, ?, ?, ?, ?, ?, ?, ?)
May 26 13:00:55 vitu-data tomcat9[4410]: 2020-05-26 13:00:55.045 [hapi-fhir-jpa-scheduler-local-4] WARN  o.h.e.jdbc.spi.SqlExceptionHelper [SqlExceptionHelper.java:137] SQL Error: 0, SQLState: 23503
May 26 13:00:55 vitu-data tomcat9[4410]: 2020-05-26 13:00:55.045 [hapi-fhir-jpa-scheduler-local-4] ERROR o.h.e.jdbc.spi.SqlExceptionHelper [SqlExceptionHelper.java:142] Batch entry 0 insert into TRM_CONCEPT (CODEVAL, CODESYSTEM_PID, DISPLAY, INDEX_STATUS, PARENT_PIDS, CODE_SEQUENCE, CONCEPT_UPDATED, PID) values ('HGNC:3197', 72, 'EEF1A1P14', 1, 24122, NULL, '2020-05-26 13:00:55.034+02', 12122) was aborted: ERROR: insert or update on table "trm_concept" violates foreign key constraint "fk_concept_pid_cs_pid"
May 26 13:00:55 vitu-data tomcat9[4410]:   Detail: Key (codesystem_pid)=(72) is not present in table "trm_codesystem_ver".  Call getNextException to see other errors in the batch.
May 26 13:00:55 vitu-data tomcat9[4410]: 2020-05-26 13:00:55.045 [hapi-fhir-jpa-scheduler-local-4] ERROR o.h.e.jdbc.spi.SqlExceptionHelper [SqlExceptionHelper.java:142] ERROR: insert or update on table "trm_concept" violates foreign key constraint "fk_concept_pid_cs_pid"
May 26 13:00:55 vitu-data tomcat9[4410]:   Detail: Key (codesystem_pid)=(72) is not present in table "trm_codesystem_ver".
May 26 13:00:55 vitu-data tomcat9[4410]: 2020-05-26 13:00:55.046 [hapi-fhir-jpa-scheduler-local-4] ERROR org.quartz.core.JobRunShell [JobRunShell.java:211] Job HAPI.ca.uhn.fhir.jpa.term.TermReindexingSvcImpl threw an unhandled Exception:

view this post on Zulip Patrick Werner (May 26 2020 at 11:08):

works fine when posting outside a bundle (maybe related to the getId Bug on urn:uuid Ids?)


Last updated: Apr 12 2022 at 19:14 UTC