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

NoSuchUserException at com.liferay.portal.workflow.kaleo.designer.web.internal.upgrade.v1_0_1.KaleoDefinitionVersionUpgradeProcess._addKaleoDefinition(KaleoDefinitionVersionUpgradeProcess.java:77)

Details

    Description

      When upgrading from 7.0 to master, with a KaleoDraftDefinition created by an user that is being deleted from the database an error is thrown.

      Steps to reproduce:

      1. Start a 7.0 bundle
      2. Create a new administrator user (pruebaUser)
      3. log in with this user
      4. Go to (Control panel -> Configuration  ->  Workflow Definition)
      5. Create a new definition, you can use attached single-approver.xml to create it 
      6. Log out with prueba user and log in with test
      7. deactivate pruebaUser
      8. delete pruebaUser
      9. stop 7.0 bundle.
      10. Go to database and delete kaleoDefinition with name "Prueba Approverr"
      11. Configure the upgrade tool and start the upgrade to 7.4

      Expected result:

      No errors

      Current result:

      2022-04-13 09:13:47.671 INFO  [Portal Dependency Manager Component Executor--1][UpgradeProcess:129] Failed upgrade process com.liferay.portal.workflow.kaleo.designer.web.internal.upgrade.v1_0_1.KaleoDefinitionVersionUpgradeProcess in 30 ms
      2022-04-13 09:13:47.679 ERROR [Portal Dependency Manager Component Executor--1][UpgradeStepRegistratorTracker:221] Failed upgrade process for module com.liferay.portal.workflow.kaleo.designer.web
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the primary key 32094
      
      ...
      Caused by: com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the primary key 32094Caused by: com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the primary key 32094 at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:8647) ~[portal-impl.jar:?] at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:8663) ~[portal-impl.jar:?] at com.liferay.portal.service.base.UserLocalServiceBaseImpl.getUser(UserLocalServiceBaseImpl.java:318) ~[portal-impl.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_261] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_261] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_261] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_261] at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?] at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?] at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?] at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?] at com.sun.proxy.$Proxy170.getUser(Unknown Source) ~[?:?] at com.liferay.portal.workflow.kaleo.designer.web.internal.upgrade.v1_0_1.KaleoDefinitionVersionUpgradeProcess._addKaleoDefinition(KaleoDefinitionVersionUpgradeProcess.java:77) ~[?:?] at com.liferay.portal.workflow.kaleo.designer.web.internal.upgrade.v1_0_1.KaleoDefinitionVersionUpgradeProcess._addKaleoDefinitionVersion(KaleoDefinitionVersionUpgradeProcess.java:124) ~[?:?] at com.liferay.portal.workflow.kaleo.designer.web.internal.upgrade.v1_0_1.KaleoDefinitionVersionUpgradeProcess._upgradeKaleoDefinitionVersion(KaleoDefinitionVersionUpgradeProcess.java:217) ~[?:?] at com.liferay.portal.workflow.kaleo.designer.web.internal.upgrade.v1_0_1.KaleoDefinitionVersionUpgradeProcess.doUpgrade(KaleoDefinitionVersionUpgradeProcess.java:59) ~[?:?]
      

      fails on 7.0 fp-101. > Master

      Attachments

        Activity

          People

            pt-zulu Product Team Zulu (Inactive)
            jorge.garcia Jorge García Jiménez
            Kiyoshi Lee Kiyoshi Lee
            Jorge García Jiménez Jorge García Jiménez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25 weeks, 2 days ago

              Packages

                Version Package
                7.4.3.22 CE GA22
                7.4.3.37 CE GA37
                7.4.3.38 CE GA38
                Master