Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
Master
-
3
-
Database Upgrade
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:
- Start a 7.0 bundle
- Create a new administrator user (pruebaUser)
- log in with this user
- Go to (Control panel -> Configuration -> Workflow Definition)
- Create a new definition, you can use attached single-approver.xml to create it
- Log out with prueba user and log in with test
- deactivate pruebaUser
- delete pruebaUser
- stop 7.0 bundle.
- Go to database and delete kaleoDefinition with name "Prueba Approverr"
- 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