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

VerifyDynamicDataMapping doesn't handle non-existent users well

    Details

      Description

      Steps to reproduce

      0) Have a 6.1 GA3 up and running
      1) Create a user u1
      2) Create a role r1
      3) Assign all the DDM and DDL related permissions to r1
      4) Assign r1 to u1
      5) Add page p1
      6) Add the DDL portlet to p1
      7) Give all permissions on the newly added portlet on p1 to r1
      8) Log in with u1 and go to p1
      9) Add a new list l1
      10) Define a new definition d1
      11) Within the definition of d1, add a file upload field
      12) For l1 select difinition d1
      13) Save l1
      14) On the portlet add a new record to l1
      15) Upload a file to the record
      16) Logout and login as admin again
      17) Deactivate user u1
      18) Delete user u1
      19) Compile ee-6.2.x and perform an upgrade
      20) Observe the following exception at VerifyDynamicDataMapping

      Caused by: com.liferay.portal.NoSuchUserException: No User exists with the primary key 10516
      	at com.liferay.portal.service.persistence.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:7199)
      	at com.liferay.portal.service.persistence.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:7217)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.addFolder(DLFolderLocalServiceImpl.java:90)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy210.addFolder(Unknown Source)
      	at com.liferay.portal.repository.liferayrepository.LiferayLocalRepository.addFolder(LiferayLocalRepository.java:170)
      	at com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.addFolder(DLAppLocalServiceImpl.java:372)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy196.addFolder(Unknown Source)
      	at com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil.addFolder(DLAppLocalServiceUtil.java:277)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.addFolder(VerifyDynamicDataMapping.java:144)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.addFolder(VerifyDynamicDataMapping.java:121)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateFileUploadReferences(VerifyDynamicDataMapping.java:413)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateDDLFileUploadReferences(VerifyDynamicDataMapping.java:293)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateFileUploadReferences(VerifyDynamicDataMapping.java:386)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.updateFileUploadReferences(VerifyDynamicDataMapping.java:365)
      	at com.liferay.portal.verify.VerifyDynamicDataMapping.doVerify(VerifyDynamicDataMapping.java:191)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58)
      	... 30 more
      Stopping the server due to unexpected startup errors
      

      Notes for QA

      • Full log attached
      • This is probably an issue on Master as well, but the upgrade process fails at an earlier stage

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 8 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.3 CE GA4
                  6.2.X EE
                  7.0.0 M3