Fórumok

Liferay 6.2 - Admins not able to add or edit users

Ankur Jaswal, módosítva 9 év-val korábban

Liferay 6.2 - Admins not able to add or edit users

Junior Member Bejegyzések: 42 Csatlakozás dátuma: 2010.08.12. Legújabb bejegyzések
We are upgrading our portal from 6.0 EE to 6.2 EE. After upgrade we are not able to add or edit existing user through the control panel. We see an error message "Users and Organizations is temporarily unavailable." in the page. Below exception is thrown when we edit any user from the list.


com.liferay.portal.NoSuchUserException: No User exists with the primary key 15926
at com.liferay.portal.service.persistence.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:7199)
at com.liferay.portal.service.persistence.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:1)
at com.liferay.portal.service.persistence.impl.TableMapperImpl.getBaseModels(TableMapperImpl.java:400)
at com.liferay.portal.service.persistence.impl.TableMapperImpl.getRightBaseModels(TableMapperImpl.java:265)
at com.liferay.portal.service.persistence.RolePersistenceImpl.getUsers(RolePersistenceImpl.java:9579)
at com.liferay.portal.service.persistence.RolePersistenceImpl.getUsers(RolePersistenceImpl.java:9559)
at com.liferay.portal.service.persistence.RolePersistenceImpl.getUsers(RolePersistenceImpl.java:9540)
at com.liferay.portal.service.base.UserLocalServiceBaseImpl.getRoleUsers(UserLocalServiceBaseImpl.java:772)
at com.liferay.portal.service.impl.UserLocalServiceImpl.getRoleUserIds(UserLocalServiceImpl.java:2303)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.liferay.portal.service.UserLocalServiceUtil.getRoleUserIds(UserLocalServiceUtil.java:1857)
at com.liferay.portlet.usersadmin.util.UsersAdminImpl.addRequiredRoles(UsersAdminImpl.java:173)
at com.liferay.portlet.usersadmin.util.UsersAdminImpl.addRequiredRoles(UsersAdminImpl.java:159)
at com.liferay.portlet.usersadmin.util.UsersAdminUtil.addRequiredRoles(UsersAdminUtil.java:68)
at com.liferay.portal.service.impl.UserServiceImpl.checkRoles(UserServiceImpl.java:2414)
at com.liferay.portal.service.impl.UserServiceImpl.updateUser(UserServiceImpl.java:1915)
thumbnail
Diego Morales, módosítva 9 év-val korábban

RE: Liferay 6.2 - Admins not able to add or edit users

Junior Member Bejegyzések: 50 Csatlakozás dátuma: 2013.11.26. Legújabb bejegyzések
I would check the table users_roles, to see if there are any references to non existing users


select ur.*
from Users_Roles as ur
left join User_ as u on u.userId= ur.userId
where
u.userId is null;


PS: Query for MySQL, adapt it to your needs.
Ankur Jaswal, módosítva 9 év-val korábban

RE: Liferay 6.2 - Admins not able to add or edit users

Junior Member Bejegyzések: 42 Csatlakozás dátuma: 2010.08.12. Legújabb bejegyzések
Hi Diego,
Thanks for your reply. Yes, I found few records in Users_roles table which are not in User_. After deleting those records from Users_roles, now able to add/edit users.
thumbnail
chandan B, módosítva 9 év-val korábban

RE: Liferay 6.2 - Admins not able to add or edit users

Junior Member Bejegyzések: 64 Csatlakozás dátuma: 2014.08.06. Legújabb bejegyzések
Go to users and check if the new users are added.
thumbnail
Nagendra Kumar Busam, módosítva 9 év-val korábban

RE: Liferay 6.2 - Admins not able to add or edit users

Liferay Master Bejegyzések: 678 Csatlakozás dátuma: 2009.07.07. Legújabb bejegyzések
As your users came through upgrade process it's quite difficult to judge what was the root cause

You can probably trouble shoot in below lines

1) take one/two users - check for his roles, user groups, sites/organizations he/she is part of

2) check whether you have roles with proper permissions by navigating to Roles section

2) check whether you have user groups with proper permissions by navigating to User Groups section

4) check whether sites/organizations he should be part of existed by navigating to sites/organizations

5) Try to reindex from server administration section

You may need to check databases entries in different tables accordingly.

You can try accessing JSON api to check for certain things /api/jsonws. Enable debug levels for com.liferay.portlet.usersadmin package from server administration