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

Failed upgrade process for module com.liferay.journal.service

    Details

      Description

      Steps to reproduce:

       

      1. In 6.2 create a new user, and add it as site member with the admin role
      2. Create a new WCM structure and template with a image field
      3. login with this user and add a new article using this structure and add an image
      4. Deactivate and remove the user
      5. Stop 6.2
      6. In master run an upgrade using the database (and the data folder)

      Expected: No errors: 

      Current: The following error is thrown:

       

      Caused by: com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the primary key 21010
       at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:8775)
       at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:8791)
       at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.addFolder(DLFolderLocalServiceImpl.java:100)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at com.liferay.portal.spring.aop.AopMethod.invoke(AopMethod.java:94)
       at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:83)
       at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
       at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
       at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
       at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:86)
       at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:47)
       at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:86)
       at com.liferay.portal.spring.aop.ServiceBeanAopInvocationHandler.invoke(ServiceBeanAopInvocationHandler.java:45)
       at com.sun.proxy.$Proxy132.addFolder(Unknown Source)
       at com.liferay.portal.repository.liferayrepository.LiferayLocalRepository.addFolder(LiferayLocalRepository.java:169)
       at com.liferay.portal.repository.util.LocalRepositoryWrapper.addFolder(LocalRepositoryWrapper.java:83)
       at com.liferay.portal.repository.util.LocalRepositoryWrapper.addFolder(LocalRepositoryWrapper.java:83)
       at com.liferay.portal.repository.capabilities.CapabilityLocalRepository.addFolder(CapabilityLocalRepository.java:115)
       at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl.lambda$addPortletFolder$0(PortletFileRepositoryImpl.java:224)
       at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl._run(PortletFileRepositoryImpl.java:771)
       at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl._run(PortletFileRepositoryImpl.java:785)
       at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl.addPortletFolder(PortletFileRepositoryImpl.java:205)
       at com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil.addPortletFolder(PortletFileRepositoryUtil.java:91)
       at com.liferay.journal.internal.upgrade.util.JournalArticleImageUpgradeUtil.getFolderId(JournalArticleImageUpgradeUtil.java:120)
       at com.liferay.journal.internal.upgrade.v1_1_0.UpgradeImageTypeContent.copyJournalArticleImagesToJournalRepository(UpgradeImageTypeContent.java:90)
       at com.liferay.journal.internal.upgrade.v1_1_0.UpgradeImageTypeContent.doUpgrade(UpgradeImageTypeContent.java:122)
       at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)

       

      Also happens in Blogs:

      Steps to Reproduce

      1. Start a clean 6.2.10 SP20 bundle
      2. Create a new user and add them to the liferay site and make them an administrator
      3. Log in as the newly created user
      4. Go to Admin > Content > Blogs
      5. Create a new Blog and add a small image to it
      6. Go to Admin > Content > Web Content > Manage > Structures
      7. Create a Structure with an image field, also create a Template for the structure
      8. Create a Web Content with the newly created Structure, making sure to add an image
      9. Log back in with Test Test
      10. Go to Admea96bc2b49a04790ce4e662a7a98b244ebc43cc3in > Control Panel > Server Administration > Script
      11. Run the attached groovy script, making sure to change the companyId and screenName to the user created on step 2
      12. Shut down and upgrade to master

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  43 weeks, 5 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP8
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master