Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-44355

Hibernate error is thrown at password change when LDAP export is active

    Details

    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Configure LDAP at Control Panel => Portal Settings => Authentication => LDAP
        • Create a new LDAP server and configure its "Export" settings
        • Check "Enabled" at LDAP page
        • Check "Export Enabled" at LDAP page
      2. Create a new User. It must be replicated to LDAP
      3. Login with created User
      4. Open 'My Account' window => Password
      5. Type "Current Password" and a new one at "New Password" and "Enter Again"
      6. Press Save, an Error message will be shown at Window: "Account Settings is temporarily unavailable. "
      7. The following stacktrace will be printed at liferay logfile:
      15:19:11,420 ERROR [http-bio-9080-exec-13][render_portlet_jsp:132] null
      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.UserImpl#11361]
      	at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:485)
      	at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:255)
      	at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84)
      	at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:867)
      	at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:851)
      	at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:855)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.merge(SessionImpl.java:231)
      	at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.merge(ClassLoaderSession.java:389)
      	at com.liferay.portal.service.persistence.UserPersistenceImpl.updateImpl(UserPersistenceImpl.java:6944)
      	at com.liferay.portal.service.persistence.UserPersistenceImpl.updateImpl(UserPersistenceImpl.java:1)
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:335)
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:405)
      	at com.liferay.portal.service.impl.UserLocalServiceImpl.updateUser(UserLocalServiceImpl.java:5045)
      	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:55)
      	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.impl.UserServiceImpl.updateUser(UserServiceImpl.java:2002)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      

      The problem is also reproduced when an Admin tries to change the password of an User using "User and Organizations" page

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 37 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 Beta 4