[ome-users] Issues with NewUserGroupBean implementation

Harri Jäälinoja harri.jaalinoja at helsinki.fi
Fri Mar 23 16:32:48 GMT 2012


Hi,

attached is my first attempt at implementing NewUserGroupBean to get 
group info from our LDAP.When I try to login, it prints this in the 
Blitz log file:

2012-03-23 17:36:37,490 DEBUG [             hyldap.HyHcNewUserGroupBean] 
(l.Server-1) grpName matched 
uid=grp-A91900-bi-vart,ou=alma_workgroups,ou=groups,o=hy
2012-03-23 17:36:37,490 DEBUG [             hyldap.HyHcNewUserGroupBean] 
(l.Server-1) grpName matched BI-Vartiainen

So it seems the code should next call
provider.createGroup(grpOmeName, null, false)
to create a new group "BI-Vartiainen".


However, login fails, and I find this in the log:

2012-03-23 17:36:37,641 WARN  [ome.services.sessions.SessionManagerImpl] 
(l.Server-5) Exception while running executeDefaultGroup
ome.conditions.ValidationException: The user 2 has no default group set.
         at ome.logic.AdminImpl.getDefaultGroup(AdminImpl.java:802)
         at 
ome.services.sessions.SessionManagerImpl._getDefaultGroup(SessionManagerImpl.java:1216)

2012-03-23 17:36:37,644 INFO  [        ome.services.util.ServiceHandler] 
(l.Server-5)  Excp:    ome.conditions.ApiUsageException: Can't find 
default group for hajaalin


At an earlier attempt (difference between this was only amount of 
logging) I got also this error:

2012-03-23 17:24:47,249 INFO  [                      ome.logic.LdapImpl] 
(l.Server-1) Removing groups for hajaalin: [3]
2012-03-23 17:24:47,285 ERROR [.event.def.AbstractFlushingEventListener] 
(l.Server-1) Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert: 
[ome.model.meta.ExperimenterGroup]
         at 
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
         at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
         at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

...

Caused by: org.postgresql.util.PSQLException: ERROR: transaction is 
read-only
         at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
         at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
         at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)



Since it behaved differently on the second time, it might be interesting 
to see if I can reproduce the first error by removing the user I was 
logging in as. But how can I remove a user? In webadmin I saw only a 
button to inactivate a user.

I have set like this:
[omero at lmu-omero2 OMERO.server-Beta-4.3.3]$ omero config set 
omero.ldap.sync_on_login true
This sounds like it should make the same checks every time, so that the 
first login would not be special in any way.

I am new to git, but from the example that Josh sent me earlier I got 
the impression that somewhere in the OMERO source code system is now 
also a little pocket reserved for this "hyldap" component. If this is 
so, would it make sense that I upload my code there, instead of sending 
it attached in email? But how do I do that?

Regards,
Harri

-- 
__________________________________________________
Harri Jäälinoja
Light Microscopy Unit
Institute of Biotechnology, University of Helsinki
http://www.biocenter.helsinki.fi/bi/lmu/
+358 9 191 59370 fax +358 9 191 59366

-------------- next part --------------
A non-text attachment was scrubbed...
Name: HyHcNewUserGroupBean.java
Type: text/x-java
Size: 2353 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20120323/ec5e79ad/attachment.java>


More information about the ome-users mailing list