We're Hiring!

Database-guest account

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: Database-guest account

Postby jmoore » Mon Dec 12, 2011 12:31 pm

You shouldn't need to (and probably can't) delete group 103. Instead, you could just change the child value of the "guests" groupxperimentermap to 2:
Code: Select all
update groupexperimentermap set parent = 2 where id = 703 and child = 1 and parent = 103;


~J.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 12:36 pm

Sorry i just reread it. I've got another group called guest as

2 -103 guest 0
and
103 -7 not used 0


ERROR: duplicate key value violates unique constraint "experimentergroup_name_key"

is it ok if i just change the name of guest to guest2 or something using

update experimentergroup set name = 'guest2' where id = 2;
update experimentergroup set name = 'guest' where id = 103;
Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 12:39 pm

ok i'll try that.
Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 12:50 pm

update groupexperimentermap set parent = 2 where id = 703 and child = 1 and parent = 103;
Query returned successfully: 1 rows affected, 605 ms execution time.

update groupexperimentermap set child_index = 0 where id = 0 and child = 0 and parent = 0;
update groupexperimentermap set child_index = 1 where id = 1 and child = 0 and parent = 1;
update groupexperimentermap set child_index = 2 where id = 3 and child = 0 and parent = 3;
update groupexperimentermap set child_index = 3 where id = 9 and child = 0 and parent = 4;


NOTICE: Remapping groupexperimentermap 407 via (-1 - oldvalue )
NOTICE: Remapping groupexperimentermap 406 via (-1 - oldvalue )
Query returned successfully: 1 rows affected, 1833 ms execution time.
Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 12:53 pm

Still getting error

Code: Select all
Traceback (most recent call last):

  File "/opt/OmeroServer/lib/python/django/core/handlers/base.py", line 92, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/opt/OmeroServer/lib/python/omeroweb/webadmin/views.py", line 154, in wrapped
    return f(request, *args, **kwargs)

  File "/opt/OmeroServer/lib/python/omeroweb/webadmin/views.py", line 223, in wrapped
    return f(request, *args, **kwargs)

  File "/opt/OmeroServer/lib/python/omeroweb/webadmin/views.py", line 379, in experimenters
    controller = BaseExperimenters(conn)

  File "/opt/OmeroServer/lib/python/omeroweb/webadmin/controller/experimenter.py", line 38, in __init__
    self.experimentersList = list(self.conn.listExperimenters())

  File "/opt/OmeroServer/lib/python/omero/gateway/__init__.py", line 2080, in listExperimenters
    for exp in admin_serv.lookupExperimenters():

  File "/opt/OmeroServer/lib/python/omero/gateway/__init__.py", line 2980, in wrapped
    return inner(*args, **kwargs)

  File "/opt/OmeroServer/lib/python/omero/gateway/__init__.py", line 2885, in inner
    return f(*args, **kwargs)

  File "/opt/OmeroServer/lib/python/omero_api_IAdmin_ice.py", line 141, 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:1072)
   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:2449)
   at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2192)
   at org.hibernate.loader.Loader.list(Loader.java:2187)
   at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
   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:1260)
   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:142)
   at ome.logic.QueryImpl.findAllByQuery(QueryImpl.java:392)
   at ome.logic.AdminImpl.lookupExperimenters(AdminImpl.java:311)
   at sun.reflect.GeneratedMethodAccessor776.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   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:150)
   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:231)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy75.lookupExperimenters(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor776.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   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:43)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy75.lookupExperimenters(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor777.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   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:136)
   at ome.services.blitz.impl.AdminI.lookupExperimenters_async(AdminI.java:242)
   at omero.api._IAdminTie.lookupExperimenters_async(_IAdminTie.java:260)
   at omero.api._IAdminDisp.___lookupExperimenters(_IAdminDisp.java:466)
   at omero.api._IAdminDisp.__dispatch(_IAdminDisp.java:1603)
   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:{'_#srchist': '',
'_#uid': '1323679824052.1698376514.2414.336944327',
'__utma': '43582067.738122027.1323679824.1323679824.1323679824.1',
'__utmc': '43582067',
'__utmz': '43582067.1323679824.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=eskitis%20institute%20brisbane',
'dActual': 'desktop',
'dVice': 'desktop',
'device': 'theme-standard',
'sessionid': '450795100aac8e1e450629ea365638be',
'setSSO': '',
'text-size': '2'},
META:{'DOCUMENT_ROOT': '/var/www/html',
'GATEWAY_INTERFACE': 'CGI/1.1',
'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.3',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'dVice=desktop; dActual=desktop; setSSO=; __utma=43582067.738122027.1323679824.1323679824.1323679824.1; __utmc=43582067; __utmz=43582067.1323679824.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=eskitis%20institute%20brisbane; _#uid=1323679824052.1698376514.2414.336944327; _#srchist=; device=theme-standard; text-size=2; sessionid=450795100aac8e1e450629ea365638be',
'HTTP_HOST': 'omero.rcs.griffith.edu.au',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.04 Chromium/14.0.835.202 Chrome/14.0.835.202 Safari/535.1',
'PATH': '/sbin:/usr/sbin:/bin:/usr/bin',
'PATH_INFO': u'/webadmin/experimenters/',
'PATH_TRANSLATED': '/opt/OmeroServer/var/omero.fcgi/webadmin/experimenters/',
'QUERY_STRING': '',
'REMOTE_ADDR': '132.234.220.105',
'REMOTE_PORT': '55118',
'REQUEST_METHOD': 'GET',
'REQUEST_URI': '/webadmin/experimenters/',
'SCRIPT_FILENAME': '/opt/OmeroServer/var/omero.fcgi',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '132.234.221.194',
'SERVER_ADMIN': 'root@localhost',
'SERVER_NAME': 'omero.rcs.griffith.edu.au',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at omero.rcs.griffith.edu.au Port 80</address>\n',
'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)',
'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0xdc839d0>,
'wsgi.input': <flup.server.fcgi_base.InputStream object at 0xdc68310>,
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0)}>



group experimentermap
Code: Select all
0      -35      TRUE      0      0            0      0
1      -35      FALSE      0      0            1      1
3      -103      TRUE      0      0            3      2
4      -103      FALSE      0      2            3      0
7      -103      FALSE      0      3            3      3
8      -103      FALSE      0      3            1      2
9      -103      TRUE      0      0            4      3
10      -103      TRUE      0      4            4      2
11      -103      FALSE      0      4            1      1
12      -103      TRUE      0      4            5      0
13      -103      FALSE      0      5            4      0
14      -103      FALSE      0      5            1      1
15      -103      FALSE      0      5            5      2
53      -103      FALSE      0      52            3      0
54      -103      FALSE      0      52            1      1
103      -103      TRUE      0      102            5      0
105      -103      TRUE      0      3            4      0
153      -103      FALSE      0      3            53      1
203      -103      TRUE      0      102            4      3
254      -103      TRUE      0      0            5      4
303      -103      TRUE      0      102            154      4
304      -103      TRUE      0      102            153      2
305      -103      FALSE      0      102            0      5
353      -7      TRUE      0      3            5      5
403      -7      FALSE      0      3            153      6
404      -7      FALSE      0      3            154      4
405      -7      TRUE      0      0            153      6
406      -7      TRUE      0      0            154      -4
407      -7      TRUE      0      0            53      -3
453      -103      FALSE      0      52            53      2
503      -103      FALSE      0      152            5      0
504      -103      FALSE      0      152            1      1
505      -103      FALSE      0      4            0      3
506      -103      FALSE      0      153            4      0
507      -103      FALSE      0      153            1      1
508      -103      FALSE      0      153            5      2
509      -103      FALSE      0      152            4      2
510      -103      FALSE      0      102            3      1
511      -103      FALSE      0      102            53      6
512      -103      FALSE      0      3            0      7
553      -103      FALSE      0      102            1      7
605      -103      FALSE      0      202            5      0
703      -103      FALSE      0      1            103      0

Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 1:09 pm

Would i need to repair the entries id 406/407 by the following?


update groupexperimentermap set child_index = 4 where id = 406 and child = 0 and parent = 154;
update groupexperimentermap set child_index = 5 where id = 407 and child = 0 and parent = 53;
Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

Re: Database-guest account

Postby jmoore » Mon Dec 12, 2011 1:21 pm

Those two lines are definitely invalid, but you will need to make sure that there is not already a child_index entry "4" for root (child = 0).
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 1:27 pm

Okay there's a 4 (on the following line) then it jumps straight to a 6. next line

254;-103;TRUE;0;0;;5;4
405;-7;TRUE;0;0;;153;6

so

update groupexperimentermap set child_index = 5 where id = 407 and child = 0 and parent = 53;
update groupexperimentermap set child_index = 6 where id = 405 and child = 0 and parent = 153;
update groupexperimentermap set child_index = 7 where id = 406 and child = 0 and parent = 154;

would that work?
Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

Re: Database-guest account

Postby jmoore » Mon Dec 12, 2011 1:47 pm

Sorry, I'm losing track of where we are. Can you show me the output of:
Code: Select all
copy groupexperimentermap to stdout with  delimiter '\t';


Thanks, ~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Database-guest account

Postby Manz » Mon Dec 12, 2011 1:50 pm

0 -35 TRUE 0 0 0 0
1 -35 FALSE 0 0 1 1
3 -103 TRUE 0 0 3 2
4 -103 FALSE 0 2 3 0
7 -103 FALSE 0 3 3 3
8 -103 FALSE 0 3 1 2
9 -103 TRUE 0 0 4 3
10 -103 TRUE 0 4 4 2
11 -103 FALSE 0 4 1 1
12 -103 TRUE 0 4 5 0
13 -103 FALSE 0 5 4 0
14 -103 FALSE 0 5 1 1
15 -103 FALSE 0 5 5 2
53 -103 FALSE 0 52 3 0
54 -103 FALSE 0 52 1 1
103 -103 TRUE 0 102 5 0
105 -103 TRUE 0 3 4 0
153 -103 FALSE 0 3 53 1
203 -103 TRUE 0 102 4 3
254 -103 TRUE 0 0 5 4
303 -103 TRUE 0 102 154 4
304 -103 TRUE 0 102 153 2
305 -103 FALSE 0 102 0 5
353 -7 TRUE 0 3 5 5
403 -7 FALSE 0 3 153 6
404 -7 FALSE 0 3 154 4
405 -7 TRUE 0 0 153 6
406 -7 TRUE 0 0 154 -4
407 -7 TRUE 0 0 53 -3
453 -103 FALSE 0 52 53 2
503 -103 FALSE 0 152 5 0
504 -103 FALSE 0 152 1 1
505 -103 FALSE 0 4 0 3
506 -103 FALSE 0 153 4 0
507 -103 FALSE 0 153 1 1
508 -103 FALSE 0 153 5 2
509 -103 FALSE 0 152 4 2
510 -103 FALSE 0 102 3 1
511 -103 FALSE 0 102 53 6
512 -103 FALSE 0 3 0 7
553 -103 FALSE 0 102 1 7
605 -103 FALSE 0 202 5 0
703 -103 FALSE 0 1 2 0
Manz
 
Posts: 72
Joined: Wed Jun 29, 2011 11:48 pm

PreviousNext

Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest