Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Genesys Backend Genesys Backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #610
Closed
Open
Created Oct 28, 2021 by Matija Obreza@mobrezaOwner

Error updating passport data

There's an issue updating existing data in Genesys.

exception is org.hibernate.exception.ConstraintViolationException: could not execute batch data={"instituteCode":"TWN001","accessionNumber":"VI002470A-G","historic":false,"origCty":"PHL","storage":[],"duplSite":["NOR051","KOR011"],"taxonomy":{"genus":"Vigna","species":"radiata","spAuthor":"(L.) R. Wilczek","subtaxa":"var. radiata","subtAuthor":null},"coll":{"collDate":null,"collSite":null,"collNumb":null,"collSrc":null,"collMissId":null,"collCode":[],"collName":[],"collInstAddress":[]},"breederCode":[],"breederName":[],"cropName":"Mungbean","acquisitionDate":"19750930","sampStat":null,"available":true,"mlsStatus":null,"acceName":["(CES 28 X ML-18)"],"otherNumb":[],"donorCode":null,"donorName":null,"donorNumb":"PI 425827","ancest":null,"latitude":null,"longitude":null,"elevation":null,"coordinateUncertainty":null,"coordinateDatum":null,"georeferenceMethod":null}
org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [delete from accession_collect where id=? and version=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch
...
	at org.genesys2.server.service.worker.AccessionUploader$$EnhancerBySpringCGLIB$$91b07599.upsertAccessions(<generated>)
	at org.genesys2.server.api.v1.AccessionUploadController.upsert1By1(AccessionUploadController.java:146)
...
Caused by: java.sql.BatchUpdateException: (conn=1573286) Cannot delete or update a parent row: a foreign key constraint fails (`genesys`.`accession_collect_name`, CONSTRAINT `FK_g6h5uuvq16105ljx8r1jjxojr` FOREIGN KEY (`collectId`) REFERENCES `accession_collect` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION)

Need a unit test and a fix!

Assignee
Assign to
Time tracking