[ome-users] Extending OMERO fails

Josh Moore josh at glencoesoftware.com
Thu Mar 22 15:01:55 GMT 2012


On Mar 22, 2012, at 3:42 PM, Harri Jäälinoja wrote:

> Hi,

Hi Harri,

> I'm still working on the same LDAP issue I wrote about earlier today. Now I am trying to bring in the java class I created, and I am not doing it right:
> 
> 2012-03-22 15:54:58,200 ERROR [services.blitz.fire.PermissionsVerifierI] (l.Server-9) Exception thrown while checking password for:3cd91e82-6161-4d36-9c89-c85b219d66f0
> ome.conditions.InternalException:  Wrapped Exception: (java.lang.NullPointerException):
> null
>        at ome.security.auth.LdapPasswordProvider.checkPassword(LdapPasswordProvider.java:106)
>        at ome.security.auth.PasswordProviders.checkPassword(PasswordProviders.java:42)
> 
> and
> 
> 2012-03-22 15:55:27,754 WARN  [        ome.services.util.ServiceHandler] (l.Server-7) Unknown exception thrown.
> 
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ':bean:hyHcNewUserGroupBean' is defined
>        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:509)
>        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
> 
> 
> Here are the steps I took to import my new Bean:
> 
> # this is inside the openmicroscopy directory on my workstation
> mkdir extension
> cd extension/
> mkdir -p ome/services
> mkdir -p ome/security/auth
> cp ../components/server/target/classes/ome/security/auth/HyHcNewUserGroupBean.class ome/security/auth
> 
> hajaalin at biotek973:~/openmicroscopy/extension$ cat ome/services/hyHcNewUserGroupBean.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
> <!--
> //
> // ome/services/hyHcNewUserGroupBean.xml
> //
> -->
> <beans>
>  <bean class="hyHcNewUserGroupBean" class="ome.security.auth.HyHcNewUserGroupBean">
>    <description>
>        This bean will be used to define groups for new OMERO users.
>    </description>
>  </bean>
> 
> </beans>
> 
> jar cvf extensions.jar ome/security/auth/HyHcNewUserGroupBean.class ome/services/hyHcNewUserGroupBean.xml
> scp extensions.jar lmu-omero2.biocenter.helsinki.fi:/tmp
> 
> # this is on the server where OMERO is running
> [omero at lmu-omero2 OMERO.server-Beta-4.3.3]$ cp /tmp/extensions.jar lib/server/
> 
> [omero at lmu-omero2 OMERO.server-Beta-4.3.3]$ omero config set omero.ldap.new_user_group ":bean:hyHcNewUserGroupBean"
> [omero at lmu-omero2 OMERO.server-Beta-4.3.3]$ omero config set omero.ldap.sync_on_login true
> 
> [root at lmu-omero2 nginx]# service omero restart
> 
> 
> Can you spot where this is going wrong?

This looks like a bug in the server itself. This line:

  https://github.com/openmicroscopy/openmicroscopy/blob/dev_4_3/components/server/src/ome/logic/LdapImpl.java#L474

doesn't strip off the ":bean:" prefix as is done in the other beans, e.g.

  https://github.com/openmicroscopy/openmicroscopy/blob/dev_4_3/components/server/src/ome/security/auth/QueryNewUserGroupBean.java#L46

You can try to rename your bean :bean:hyHcNewUserGroupBean and see if that works. And I'll look into fixing this as soon as possible.

Thanks for hanging in there!
~Josh.




More information about the ome-users mailing list