Bug #1482 (closed)
Opened 10 years ago
Closed 10 years ago
IDelete.deleteImage() fails with ConstraintViolation
| Reported by: | jamoore | Owned by: | jburel |
|---|---|---|---|
| Priority: | critical | Cc: | |
| Sprint: | n.a. | ||
| Total Remaining Time: | n.a. |
Description
jburel 17:47
delete no longer works
47:59
serverStackTrace = "ome.conditions.ValidationException:
could not delete: [ome.model.core.OriginalFile#252];
nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [ome.model.core.OriginalFile#252]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:624)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
I tried to reproduce with:
public void testDeleteImageWithFileAnnotation() throws Exception {
Image i1 = makeImage(true);
ImageAnnotationLink link = new ImageAnnotationLink();
FileAnnotation fa = new FileAnnotation();
OriginalFile of = new OriginalFile("",0L,"",new Format("text/plain"),"");
fa.setFile(of);
link.link(i1, fa);
iUpdate.saveObject(fa);
IDelete srv = this.factory.getDeleteService();
srv.deleteImage(i1.getId(), true);
}
but this passed (along with the other delete tests). I'll need help reproducing.
Change History (1)
comment:1 Changed 10 years ago by jburel
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
You may also have a look at Agilo extensions to the ticket.
Josh:
I have not seen that problem happening recently, so I assume this is fixed.