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"

Task #2547 (closed)

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

BUG: Webadmin Edit user groups

Reported by: wmoore Owned by: jamoore
Priority: critical Milestone: OMERO-Beta4.2
Component: ORM Version: n.a.
Keywords: n.a. Cc: jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2010-06-24 (12)

Description

Edited the name of a user and edited the groups of the user. User was previously in one group. Removed this group and added 3 others. Chose one of these as the default group. Hit save. Stack trace below...

Attachments (1)

log.zip (74.5 KB) - added by wmoore 14 years ago.
Logs with database logging on. Cleaned database & logs then reproduced bug.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 14 years ago by wmoore

  • Owner set to atarkowska
Traceback (most recent call last):

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/django/core/handlers/base.py", line 92, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webadmin/views.py", line 123, in wrapped
    return f(request, *args, **kwargs)

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webadmin/views.py", line 192, in wrapped
    return f(request, *args, **kwargs)

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webadmin/views.py", line 375, in experimenters
    controller = BaseExperimenters(conn)

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webadmin/controller/experimenter.py", line 38, in __init__
    self.experimentersList = list(self.conn.lookupExperimenters())

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/extlib/gateway.py", line 176, in lookupExperimenters
    for exp in admin_serv.lookupExperimenters():

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omero/gateway/__init__.py", line 1829, in wrapped
    return inner(*args, **kwargs)

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omero/gateway/__init__.py", line 1762, in inner
    return f(*args, **kwargs)

  File "/Users/will/Documents/workspace/Omero/dist/lib/python/omero_api_IAdmin_ice.py", line 140, in lookupExperimenters
    return _M_omero.api.IAdmin._op_lookupExperimenters.invoke(self, ((), _ctx))

InternalException: exception ::omero::InternalException
{
    serverStackTrace = ome.conditions.InternalException:  Wrapped Exception: (java.lang.ArrayIndexOutOfBoundsException):
-3
	at java.util.ArrayList.set(ArrayList.java:339)
	at org.hibernate.collection.PersistentList.readFrom(PersistentList.java:409)
	at org.hibernate.loader.Loader.readCollectionElement(Loader.java:1052)
	at org.hibernate.loader.Loader.readCollectionElements(Loader.java:690)
	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:630)
	at org.hibernate.loader.Loader.doQuery(Loader.java:745)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
	at org.hibernate.loader.Loader.doList(Loader.java:2294)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
	at org.hibernate.loader.Loader.list(Loader.java:2167)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
	at ome.services.query.Query.doInHibernate(Query.java:244)
	at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
	at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
	at ome.logic.QueryImpl.execute(QueryImpl.java:141)
	at ome.logic.QueryImpl.findAllByQuery(QueryImpl.java:369)
	at ome.logic.AdminImpl.lookupExperimenters(AdminImpl.java:316)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.EventHandler.invoke(EventHandler.java:144)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:175)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:111)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy64.lookupExperimenters(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:83)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:40)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy64.lookupExperimenters(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
	at ome.services.throttling.Callback.run(Callback.java:56)
	at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
	at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:132)
	at ome.services.blitz.impl.AdminI.lookupExperimenters_async(AdminI.java:236)
	at omero.api._IAdminTie.lookupExperimenters_async(_IAdminTie.java:253)
	at omero.api._IAdminDisp.___lookupExperimenters(_IAdminDisp.java:459)
	at omero.api._IAdminDisp.__dispatch(_IAdminDisp.java:1567)
	at IceInternal.Incoming.invoke(Incoming.java:159)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
	at Ice.ConnectionI.message(ConnectionI.java:972)
	at IceInternal.ThreadPool.run(ThreadPool.java:577)
	at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)

    serverExceptionClass = ome.conditions.InternalException
    message =  Wrapped Exception: (java.lang.ArrayIndexOutOfBoundsException):
-3
}


<WSGIRequest
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'sessionid': '6d2ebe6643b7f57b715241977239cd28'},
META:{'Apple_PubSub_Socket_Render': '/tmp/launch-WCUwTe/Render',
 'COMMAND_MODE': 'unix2003',
 'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'DISPLAY': '/tmp/launch-p5dPjI/:0',
 'DJANGO_SETTINGS_MODULE': 'omeroweb.settings',
 'DYLD_LIBRARY_PATH': '/Applications/IMOD/lib::/opt/Ice-3.3.1/lib:/opt/hdf/lib',
 'EDITOR': 'nano',
 'EMAN2BASE': '/Applications/EMAN2/',
 'EMAN2DIR': '/Applications/EMAN2//EMAN2.cvs',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HDF5_DIR': '/usr/local/HDF5',
 'HOME': '/Users/will',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_COOKIE': 'sessionid=6d2ebe6643b7f57b715241977239cd28',
 'HTTP_HOST': 'localhost:8000',
 'HTTP_KEEP_ALIVE': '115',
 'HTTP_REFERER': 'http://localhost:8000/webadmin/experimenter/edit/2/',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6',
 'ICE_HOME': '/opt/Ice-3.3.1',
 'IMOD_CALIB_DIR': '/usr/local/ImodCalib',
 'IMOD_DIR': '/Applications/IMOD',
 'IMOD_PLUGIN_DIR': '/Applications/IMOD/lib/imodplug',
 'IMOD_QTLIBDIR': '/Applications/IMOD/qtlib',
 'LANG': 'en_GB.UTF-8',
 'LD_LIBRARY_PATH': '/usr/local/HDF5/lib:/opt/SZIP/lib',
 'LOGNAME': 'will',
 'MANPATH': '/opt/local/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/man',
 'OLDPWD': '/Users/will/Documents/workspace/Omero',
 'PATH': '/Applications/EMAN2//EMAN2.cvs/bin:/Applications/EMAN2//EMAN2.cvs/sparx/bin:/opt/local/bin:/opt/local/sbin:/Applications/IMOD/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Library/PostgreSQL/8.3/bin/:/Applications/Chimera.app/Contents/Resources/bin/:/opt/Ice-3.3.1/bin:/usr/local/HDF5/bin:/Applications/spiderweb/spider/bin/:/Applications/spiderweb/web/bin/',
 'PATH_INFO': u'/webadmin/experimenters/',
 'PWD': '/Users/will/Documents/workspace/Omero/dist',
 'PYTHONPATH': '/Applications/EMAN2/EMAN2.cvs/bin/:/Applications/EMAN2//EMAN2.cvs/lib:/Applications/EMAN2//EMAN2.cvs/sparx/libpy:/Applications/EMAN2//extlib/site-packages:/Applications/CecogPackage/CecogAnalyzer.app/Contents/Resources/lib/python2.5/:/Users/will/Documents/workspace/Omero/dist/lib/python/:/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/:/opt/Ice-3.3.1/python::/Users/will/Documents/workspace/Omero/dist/var/lib:/Users/will/Documents/workspace/Omero/dist/lib/python',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': u'',
 'SECURITYSESSIONID': 'a2b860',
 'SERVER_NAME': 'wjm.local',
 'SERVER_PORT': '8000',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.1',
 'SHELL': '/bin/bash',
 'SHLVL': '1',
 'SPBIN_DIR': 'Applications/spiderweb/spider/bin/',
 'SPIDER_DIR': 'Applications/spiderweb/spider',
 'SPMAN_DIR': 'Applications/spiderweb/spider/man/',
 'SPPROC_DIR': 'Applications/spiderweb/spider/proc/',
 'SPRGB_DIR': '/Applications/spiderweb/web/rgb/',
 'SSH_AUTH_SOCK': '/tmp/launch-5mGtZN/Listeners',
 'TERM': 'xterm-color',
 'TERM_PROGRAM': 'Apple_Terminal',
 'TERM_PROGRAM_VERSION': '240.2',
 'TMPDIR': '/var/folders/mk/mkOc3rWtEp8VZpBVn5VFpE+++TI/-Tmp-/',
 'TZ': 'Europe/London',
 'USER': 'will',
 'WEBBIN_DIR': '/Applications/spiderweb/web/bin',
 'WEBMAN_DIR': '/Applications/spiderweb/web/man/',
 'WEB_DIR': '/Applications/spiderweb/web',
 '_': 'bin/omero',
 '__CF_USER_TEXT_ENCODING': '0x1F5:0:0',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x170b0>,
 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>,
 'wsgi.input': <socket._fileobject object at 0x2031030>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>

comment:2 Changed 14 years ago by wmoore

  • Cc jmoore added

comment:3 Changed 14 years ago by wmoore

This is what the tables look like after the bug. Editing the index -3 -> 4 allows you to log into webadmin, but still can't remove groups from users.

omero=> select * from experimenter;
 id | permissions | email | firstname | institution | lastname | middlename | omename | version | external_id 
----+-------------+-------+-----------+-------------+----------+------------+---------+---------+-------------
  0 |           0 |       | root      |             | root     |            | root    |       0 |            
  1 |           0 |       | Guest     |             | Account  |            | guest   |       0 |            
  2 |        -103 |       | O         | root        | E        | M          | ome     |       0 |            
(3 rows)

omero=> select * from groupexperimentermap;
 id | permissions | owner | version | child | external_id | parent | child_index 
----+-------------+-------+---------+-------+-------------+--------+-------------
  0 |         -35 | t     |       0 |     0 |             |      0 |           0
  1 |         -35 | f     |       0 |     0 |             |      1 |           1
  2 |         -35 | f     |       0 |     1 |             |      2 |           0
  3 |        -103 | t     |       0 |     0 |             |      3 |           2
  5 |        -103 | f     |       0 |     2 |             |      1 |           1
  6 |        -103 | f     |       0 |     2 |             |      4 |           0
  4 |        -103 | f     |       0 |     2 |             |      3 |          -3
  7 |        -103 | f     |       0 |     2 |             |      5 |           2
  8 |        -103 | f     |       0 |     2 |             |      6 |           3
(9 rows)

omero=> update groupexperimentermap set child_index = 4 where child_index = -3 ;
UPDATE 1
omero=> select * from groupexperimentermap;
 id | permissions | owner | version | child | external_id | parent | child_index 
----+-------------+-------+---------+-------+-------------+--------+-------------
  0 |         -35 | t     |       0 |     0 |             |      0 |           0
  1 |         -35 | f     |       0 |     0 |             |      1 |           1
  2 |         -35 | f     |       0 |     1 |             |      2 |           0
  3 |        -103 | t     |       0 |     0 |             |      3 |           2
  5 |        -103 | f     |       0 |     2 |             |      1 |           1
  6 |        -103 | f     |       0 |     2 |             |      4 |           0
  7 |        -103 | f     |       0 |     2 |             |      5 |           2
  8 |        -103 | f     |       0 |     2 |             |      6 |           3
  4 |        -103 | f     |       0 |     2 |             |      3 |           4
(9 rows)

comment:4 Changed 14 years ago by jmoore

Will, if you could turn on sql debugging in etc/log4j.xml and reproduce that'd be very useful.

Changed 14 years ago by wmoore

Logs with database logging on. Cleaned database & logs then reproduced bug.

comment:5 Changed 14 years ago by jmoore

This is related to #1056.

comment:6 Changed 14 years ago by jmoore

  • Component changed from General to ORM
  • Owner changed from atarkowska to jmoore
  • Priority changed from minor to critical
  • Status changed from new to assigned

There are several issues here:

  1. the triggers for ordered collections are not run on insert
  2. the method obj.setElement(int index, element) is not calling element.setParent( this )
  3. Possibly the model objects are not being used correctly. That will still have to be tested.

I'll be committing a fix shortly for the first two issues. It requires a new OMERO4.2__0 database!

comment:7 Changed 14 years ago by jmoore

See also #1679

comment:8 Changed 14 years ago by jmoore

Related Hibernate topics:

deferred uniques is a possibility for 8.5, but for the moment we may have to do without the unique constraint.

comment:9 Changed 14 years ago by jmoore

(In [7404]) Reworking list triggers and fixing various model & filter errors. (See #2547)

comment:10 Changed 14 years ago by jmoore

(In [7413]) Readding the old DELETE_ORPHAN cascade (See #2547, #2142)

comment:11 Changed 14 years ago by jmoore

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

There were definitely dangling issues with the triggers from #1056 which needed fixing (which was r7404). However, this issue appeared so recently almost certainly because of the orphan-related issues from #2142. r7413 rolls completely back, and IAdmin.removeGroups() is now working again. Not sure if this will fix #1679 yet.

comment:12 Changed 14 years ago by jmoore

(In [7427]) More tests; see #2547

comment:13 Changed 13 years ago by jmoore <josh@…>

(In [5158bb56ba4cb9bcd8c966d4cfe54bba3d0a7a05/ome.git] on branch dev_4_1_custom) Reworking list triggers and fixing various model & filter errors. (See #2547)

git-svn-id: file:///home/svn/omero/trunk@7404 05709c45-44f0-0310-885b-81a1db45b4a6

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

We're Hiring!