Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #1482 (closed)

Opened 15 years ago

Closed 14 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 14 years ago by jburel

  • Resolution set to fixed
  • Status changed from new to closed

Josh:
I have not seen that problem happening recently, so I assume this is fixed.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.83119 sec.)

We're Hiring!