CatalogueOfLife / backend

Complete backend of COL ChecklistBank
Apache License 2.0
15 stars 11 forks source link

Release publication throws #1338

Open mdoering opened 5 months ago

mdoering commented 5 months ago

('https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=693952'), (NULL),

(NULL),
(NULL)::SIMPLE_NAME,
('{"(\"BW9VK\",\"SUPERFAMILY\",\"Yponomeutoidea\",\"Stephens, 1829\")","(\"CB2MR\",\"ORDER\",\"Lepidoptera\",\"Linnaeus, 1758\")","(\"H6\",\"CLASS\",\"Insecta\",)","(\"RT\",\"PHYLUM\",\"Arthropoda\",)","(\"N\",\"KINGDOM\",\"Animalia\",)","(\"5T6MX\",\"UNRANKED\",\"Biota\",)"}')::SIMPLE_NAME[],
(NULL),
('2242'::int4),
('296511'::int4)

) was aborted: ERROR: duplicate key value violates unique constraint "name_usage_archive_pkey" Detail: Key (dataset_key, id)=(3, 5YK) already exists. Call getNextException to see other errors in the batch. at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:226) at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:217) at life.catalogue.dao.NameUsageArchiver.lambda$archiveRelease$1(NameUsageArchiver.java:156) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at life.catalogue.db.PgUtils.consume(PgUtils.java:72) at life.catalogue.dao.NameUsageArchiver.archiveRelease(NameUsageArchiver.java:101) at life.catalogue.release.PublicReleaseListener.datasetChanged(PublicReleaseListener.java:89)