Forums de discussion

LDAP export, error when creating new user

Henrik Alstad, modifié il y a 10 années.

LDAP export, error when creating new user

New Member Publications: 4 Date d'inscription: 07/10/13 Publications récentes
Hi.
I'm using OpenDS 2.2.1, and Liferay Portal Community Edition 6.1.1 CE GA2.
I have turned on export to LDAP, and everything works smoothly, except that if I log in with the liferay admin, and create new users, I get the message:
"Users and Organizations is temporarily unavailable. "

in the UI of the admin control panel.

The tomcat log shows:

0:36:42,768 ERROR [http-bio-8082-exec-3][render_portlet_jsp:154] java.lang.NullPointerException
	at com.liferay.portal.security.pwd.PasswordPolicyToolkit.generateDynamic(PasswordPolicyToolkit.java:164)
	at com.liferay.portal.security.pwd.PasswordPolicyToolkit.generate(PasswordPolicyToolkit.java:76)
	at com.liferay.portal.security.pwd.ToolkitWrapper.generate(ToolkitWrapper.java:32)
	at com.liferay.portal.security.pwd.PwdToolkitUtil.generate(PwdToolkitUtil.java:29)



However, the LDAP logs show no sign of trouble(as far as I can see):

[04/Oct/2013:17:17:59 +0200] SEARCH REQ conn=27 op=27 msgID=28 base="dc=test,dc=example,dc=com" scope=wholeSubtree filter="(&(uid=asd)(objectClass=person))" attrs="ALL"
[04/Oct/2013:17:17:59 +0200] SEARCH RES conn=27 op=27 msgID=28 result=0 nentries=0 etime=0
[04/Oct/2013:17:17:59 +0200] SEARCH REQ conn=28 op=6 msgID=7 base="dc=test,dc=example,dc=com" scope=wholeSubtree filter="(&(uid=asd)(objectClass=person))" attrs="ALL"
[04/Oct/2013:17:17:59 +0200] SEARCH RES conn=28 op=6 msgID=7 result=0 nentries=0 etime=1
[04/Oct/2013:17:17:59 +0200] SEARCH REQ conn=28 op=7 msgID=8 base="dc=test,dc=example,dc=com" scope=wholeSubtree filter="(&(uid=asd)(objectClass=person))" attrs="ALL"
[04/Oct/2013:17:17:59 +0200] SEARCH RES conn=28 op=7 msgID=8 result=0 nentries=0 etime=0
[04/Oct/2013:17:17:59 +0200] ADD REQ conn=27 op=28 msgID=29 dn="uid=asd,ou=People, dc=test, dc=example, dc=com"
[04/Oct/2013:17:17:59 +0200] ADD RES conn=27 op=28 msgID=29 result=0 etime=9
[04/Oct/2013:17:17:59 +0200] SEARCH REQ conn=28 op=8 msgID=9 base="dc=test,dc=example,dc=com" scope=wholeSubtree filter="(&(uid=asd)(objectClass=person))" attrs="ALL"
[04/Oct/2013:17:17:59 +0200] SEARCH RES conn=28 op=8 msgID=9 result=0 nentries=1 etime=1
[04/Oct/2013:17:17:59 +0200] MODIFY REQ conn=27 op=29 msgID=30 dn="uid=asd,ou=People,dc=test,dc=example,dc=com"
[04/Oct/2013:17:17:59 +0200] MODIFY RES conn=27 op=29 msgID=30 result=0 etime=2
[04/Oct/2013:17:18:00 +0200] SEARCH REQ conn=28 op=9 msgID=10 base="dc=test,dc=example,dc=com" scope=wholeSubtree filter="(&(uid=asd)(objectClass=person))" attrs="ALL"
[04/Oct/2013:17:18:00 +0200] SEARCH RES conn=28 op=9 msgID=10 result=0 nentries=1 etime=1



Also, when I log out of liferay, and I check OpenDS/LDAP, the created user is indeed exported from liferay and imported to LDAP,
and the user can then log in to liferay.
So why is this error showing up, and how can I get rid of it?
Henrik Alstad, modifié il y a 10 années.

RE: LDAP export, error when creating new user

New Member Publications: 4 Date d'inscription: 07/10/13 Publications récentes
I found that by disabling "Use LDAP Password Policy", the error is gone.
(However, this changes the way liferay exports password changes to LDAP, so it's not a solution.

In case it's not clear, this is the behaviour I want:
- Create a user in Liferay
- Edit the users password
- This user should now exist both in Liferay and LDAP, with the users password being the same on liferay and LDAP.

I'm guessing the error occurs because, when exporting a newly created user(in liferay) to LDAP, it has yet to receive a password, since in liferay you don't specify passwords at the same time as you create a user, and that somehow this results in a null-pointer exception and failure to re-import the user from LDAP to Liferay.
Does anyone know if this is the case? Is there anything I can do in configuration such as settings, or filters in web.xml etc, to make this work as expected?