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 #662 (closed)

Opened 17 years ago

Closed 17 years ago

Querying Experimenters produces strange results and exception

Reported by: jamoore Owned by: jamoore
Priority: blocker Cc: atarkowska, cxallan
Sprint: n.a.
Total Remaining Time: n.a.

Description

        Login l = new Login(...);
        Server s = new Server(...);
        ServiceFactory sf = new ServiceFactory(s,l);
        List<Experimenter> list = sf.getQueryService().findAll(Experimenter.class, null);
        System.out.println(list);
        Set<Experimenter> set = new HashSet<Experimenter>(list);
        System.out.println(set);

produces:

[Experimenter:Id_0, Experimenter:Id_4, Experimenter:Id_5, Experimenter:Id_5, Experimenter:Id_15, Experimenter:Id_15, Experimenter:Id_15, Experimenter:Id_15, Experimenter:Id_16, Experimenter:Id_16, Experimenter:Id_16, Experimenter:Id_17, Experimenter:Id_18, Experimenter:Id_18, Experimenter:Id_19, Experimenter:Id_21]
[Experimenter:Id_4, Experimenter:Id_19, Experimenter:Id_21, Experimenter:Id_18, Experimenter:Id_15, Experimenter:Id_5, Experimenter:Id_0, Experimenter:Id_17, Experimenter:Id_16]
PASSED: mageHasTooManyExperimenters

Then calling get on one of the duplicated ids produces:

sf.getQueryService().get(Experimenter.class, 15l);

ome.conditions.InternalException:  Wrapped Exception: (org.springframework.orm.hibernate3.HibernateSystemException):
More than one row with the given identifier was found: 15, for class: ome.model.meta.Experimenter; nested exception is org.hibernate.HibernateException: More than one row with the given identifier was found: 15, for class: ome.model.meta.Experimenter

Change History (2)

comment:1 Changed 17 years ago by jmoore

  • Keywords changed from queries, api, exception to queries, api, exception, iteration6

comment:2 Changed 17 years ago by jmoore

  • Cc atarkowska callan added
  • Resolution set to fixed
  • Status changed from new to closed

r1575 should solve this. It's most likely occuring because of the multiple experimenter/group links that were being created. Can one of you (Chris/Ola?) try to reproduce before and after applying this patch? (I never saw it here locally only with mage)

The multiple groupexperimentermaps is something we should perhaps look into. We can discuss on the conference call: http://cvs.openmicroscopy.org.uk/tiki/tiki-index.php?page=ConferenceCall+2007-06-01

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.72223 sec.)

We're Hiring!