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

Opened 11 years ago

Closed 11 years ago

ISession.updateSession can't be called with two different groups.

Reported by: jamoore Owned by: jamoore
Priority: major Cc: carlos@…
Sprint: n.a.
Total Remaining Time: n.a.

Description

btw, I can't change the group (could be "can't update session") twice for the same connection, it seems
learned it the hard way
just try to set 2 different groups and call updateSession twice
gives you that error I pasted before
also if you have created a new group

Change History (2)

comment:1 Changed 11 years ago by jmoore

In the following block:

import omero
c = omero.client(host='localhost', port=4063)
c.ic.getProperties().setProperty(omero.constants.USERNAME, 'root')
c.ic.getProperties().setProperty(omero.constants.PASSWORD, 'ome')
session = c.createSession()
session.detachOnDestroy()

gname = "default"

try:
    sservice = c.sf.getSessionService()
    sid = c.sf.ice_getIdentity().name
    xsession = sservice.getSession(sid)
    admin = c.sf.getAdminService()
    g = admin.lookupGroup(gname)
    xsession.getDetails().setGroup(g)
    sservice.updateSession(xsession)
except:
    print "Error in first block"
else:
    sservice = c.sf.getSessionService()
    sid = c.sf.ice_getIdentity().name
    xsession = sservice.getSession(sid) # THIS THROWS!
    admin = c.sf.getAdminService()
    g = admin.lookupGroup(gname)
    xsession.getDetails().setGroup(g)
    sservice.updateSession(xsession)

the marked line throws:

> ".../lib/omero_API_ice.py", 
 > line 1626, in getSession
 >     return _M_omero.api.ISession._op_getSession.invoke(self, 
 > ((sessionUuid, ), _ctx))
 > Ice.UnknownException: exception ::Ice::UnknownException
 > {
 >     unknown = org.hibernate.LazyInitializationException: failed to 
 > lazily initialize a collection, no session or session was closed
 >     at 

Commenting it out, works. The groupExperimenterMap counts map inside of a CGLIB-based experimenter is throwing the exception.

comment:2 Changed 11 years ago by jmoore

  • Priority changed from minor to major
  • Resolution set to fixed
  • Status changed from new to closed

r4508 allows the test above to pass without commenting. The bug was that a SessionContext was being bassed back through the Executor.execute method, rather than something that ProxyCleanupHandler could parse. Refactored to pass back a list of "primivites (sessions, experimenters, groups, etc.).

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

We're Hiring!