Upgrade Fails on Deleting Hierarchy Views with error ODF-0958: Cannot modify view owned by others.
Upgrading the advanced search filter of RMI custom views is completed
Deleting Hierarchy Views.
com.niku.dbtools.ant.ExecutableException: $NIKU_HOME/upgrade/15.9.2/components/database.xml:100: Java returned: 1
at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:109)
at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:84)
at com.niku.dbtools.Utilities.executeAntScript(Utilities.java:2409)
at com.niku.dbtools.Utilities.run(Utilities.java:2002)
at com.niku.dbtools.Utilities.main(Utilities.java:1055)
Caused by: /opt/ppm/upgrade/15.9.2/component/postupgrade/database.xml:100: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at com.niku.dbtools.ant.AntUtil.executeTargets(AntUtil.java:141)
at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:105)
... 4 more
Exception in thread "main" com.niku.union.odf.exception.ODFValidationException: ODF-0958: Cannot modify view owned by others.
at com.ca.platform.osf.object.service.ViewObjectAPIImpl.validate(ViewObjectAPIImpl.java:77)
at com.ca.platform.osf.object.service.ViewInstanceClass.doPreDelete(ViewInstanceClass.java:251)
at com.niku.odf.object.ObjectInstanceImpl.delete(ObjectInstanceImpl.java:3439)
at com.ca.ppm.database.upgrade.DropHierarchyViews.doUpgrade(DropHierarchyViews.java:56)
at com.niku.union.utility.AbstractUpgrade.run(AbstractUpgrade.java:361)
at com.ca.ppm.database.upgrade.DropHierarchyViews.main(DropHierarchyViews.java:24)
Total time: 0H:0M:24S
Mon May 17 01:17:37 PDT 2021 (run-postupgrade-script) database: failed.
ERROR: Upgrade failed for tenant
Release : 15.9.2
Component : CA PPM INSTALL AND UPGRADE
This occurs when there are views created on Hierarchies module and "admin" user doesn't have proper permissions.
Logged as DE60958 with Engineering to find an automated way to avoid this in future versions
Workaround:
1. Run the below query to identify if you will run into the issue or not.
SELECT count(1) FROM odf_ui_views WHERE ASSOCIATED_OBJECT_TYPE = 'odf_hierarchy' AND IS_SYSTEM = 0
2. If the query returns results provide "Views - Administer" and "API - Access" global Rights to "admin" user before starting the upgrade.