掲示板

fixing com.liferay.portal.DuplicateUserScreenNameException on LDAP Import

15年前 に Lucas A Blancher によって更新されました。

fixing com.liferay.portal.DuplicateUserScreenNameException on LDAP Import

Junior Member 投稿: 32 参加年月日: 08/06/04 最新の投稿
Hello,
For one of our users, instead of changing the users properties in our LDAP system, we deleted the user and recreated it with the correct information. Now, in our logs we are getting the following message when it does an LDAP import.

[PortalLDAPUtil:60] Problem adding user with screen name XXXXX and email address XXXXX@xxxxxxx.com
com.liferay.portal.DuplicateUserScreenNameException
at com.liferay.portal.service.impl.UserLocalServiceImpl.validateScreenName(UserLocalServiceImpl.java:2648)
at com.liferay.portal.service.impl.UserLocalServiceImpl.validate(UserLocalServiceImpl.java:2531)
at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:222)
at sun.reflect.GeneratedMethodAccessor1100.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:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy241.addUser(Unknown Source)
at com.liferay.portal.service.UserLocalServiceUtil.addUser(UserLocalServiceUtil.java:160)
at com.liferay.portal.security.ldap.PortalLDAPUtil.importLDAPUser(PortalLDAPUtil.java:790)
at com.liferay.portal.security.ldap.PortalLDAPUtil.importFromLDAP(PortalLDAPUtil.java:496)
at com.liferay.portal.security.ldap.PortalLDAPUtil.importFromLDAP(PortalLDAPUtil.java:465)
at com.liferay.portlet.admin.job.LDAPImportJob.execute(LDAPImportJob.java:63)
at com.liferay.portal.job.JobWrapper.execute(JobWrapper.java:62)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

How can I resolve this problem? I was thinking that we could just change the screen name in LDAP, but we are unable to change the users email address, so that would lead to a conflict on the users email address.

I'm not sure on how to clean up this little mess.

Idea's?

Lucas
14年前 に Mike Bosworth によって更新されました。

RE: fixing com.liferay.portal.DuplicateUserScreenNameException on LDAP Impo

New Member 投稿: 2 参加年月日: 08/09/15 最新の投稿
I ran into a similar problem.

The user does not exist in the user_ table.

But...

Something is leaving behind data in the group_ table.

Try running this SQL.

select * from group_ where friendlyurl like '%login%'

I found that there was still a row with a friendlyurl matching the login of the user in question.

I fixed the issue by deleting that row:

delete from group_ where friendlyurl like '%login%'

Cheers,
14年前 に Mike Bosworth によって更新されました。

RE: fixing com.liferay.portal.DuplicateUserScreenNameException on LDAP Impo

New Member 投稿: 2 参加年月日: 08/09/15 最新の投稿
Following up on this...

It looks like...

UserLocalServiceUtil.delete(User user);

...behaves differently from...

UserLocalServiceUtil.delete(long userId);

...in that the second method delete's the user's group but the first method does not.

So make sure you use the second method.

This is with Liferay 5.0.1. Maybe they've patched it since then.
14年前 に Axel Nagel によって更新されました。

RE: fixing com.liferay.portal.DuplicateUserScreenNameException on LDAP Impo

New Member 投稿: 20 参加年月日: 09/09/02 最新の投稿
Mike Bosworth:
I ran into a similar problem.

The user does not exist in the user_ table.

But...

Something is leaving behind data in the group_ table.

Try running this SQL.

select * from group_ where friendlyurl like '%login%'

I found that there was still a row with a friendlyurl matching the login of the user in question.

I fixed the issue by deleting that row:

delete from group_ where friendlyurl like '%login%'

Cheers,


Your post helped me by deleting users via sql in a TEST instance where I program insert user scripts:

delete from group_ where creatoruserid not in(select userid from user_)

same goes for contact_

delete from contact_ where userid not in(select userid from user_)

cleans up groups after missing user.

Cheers
Axel
12年前 に Ash J によって更新されました。

RE: fixing com.liferay.portal.DuplicateUserScreenNameException on LDAP Impo

Junior Member 投稿: 83 参加年月日: 11/03/22 最新の投稿
Hi,

We have lots of users having problem and this keeps on happening when the users get married, their Surname changes. In all these cases, while importing users from LDAP we get this error.

Can anyone help with how to resolve this error without manual intervention. Users keeps on complaining that they are not able to login.

Thanks in advance..
-ash