16.1.3 upgrade failure on com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns 
search cancel

16.1.3 upgrade failure on com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns 

book

Article ID: 272555

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Upgrade to 16.1.3 fails with error java.lang.NullPointerException:
 
 
8/22/23 11:51 AM (ExecTask) Migrate the TSV column selection from View Settings to List columns
8/22/23 11:53 AM (ExecTask) com.niku.dbtools.ant.ExecutableException: /apps/clarity/clarity/upgrade/16.1.3/component/postupgrade/osf.xml:36: Java returned: 1
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:109)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:84)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.Utilities.executeAntScript(Utilities.java:2672)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.Utilities.executeAntScript(Utilities.java:2636)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.Utilities.run(Utilities.java:2189)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.Utilities.main(Utilities.java:1161)
8/22/23 11:53 AM (ExecTask) Caused by: /apps/clarity/clarity/upgrade/16.1.3/component/postupgrade/osf.xml:36: Java returned: 1
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
8/22/23 11:53 AM (ExecTask)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
8/22/23 11:53 AM (ExecTask)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
8/22/23 11:53 AM (ExecTask)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
8/22/23 11:53 AM (ExecTask)     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.Task.perform(Task.java:348)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.Target.execute(Target.java:435)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.Target.performTasks(Target.java:456)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
8/22/23 11:53 AM (ExecTask)     at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.ant.AntUtil.executeTargets(AntUtil.java:141)
8/22/23 11:53 AM (ExecTask)     at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:105)
8/22/23 11:53 AM (ExecTask)     ... 5 more
8/22/23 11:53 AM (ExecTask) Exception in thread "main" java.lang.NullPointerException
8/22/23 11:53 AM (ExecTask)     at com.niku.odf.object.ObjectInstanceImpl.setupPartitionCode(ObjectInstanceImpl.java:495)
8/22/23 11:53 AM (ExecTask)     at com.niku.odf.object.ObjectInstanceImpl.populateData(ObjectInstanceImpl.java:5670)
8/22/23 11:53 AM (ExecTask)     at com.niku.odf.object.ObjectInstanceImpl.createOverrideInstance(ObjectInstanceImpl.java:1009)
8/22/23 11:53 AM (ExecTask)     at com.niku.odf.object.ObjectInstanceImpl.create(ObjectInstanceImpl.java:752)
8/22/23 11:53 AM (ExecTask)     at com.niku.odf.object.ODFObjectImpl.createInstance(ODFObjectImpl.java:4469)
8/22/23 11:53 AM (ExecTask)     at com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns.insertInToListColumns(MigrateTsvDataFromSettingsToListColumns.java:159)
8/22/23 11:53 AM (ExecTask)     at com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns.doUpgrade(MigrateTsvDataFromSettingsToListColumns.java:121)
8/22/23 11:53 AM (ExecTask)     at com.niku.union.utility.AbstractUpgrade.run(AbstractUpgrade.java:361)
8/22/23 11:53 AM (ExecTask)     at com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns.main(MigrateTsvDataFromSettingsToListColumns.java:177) 
 
Error in upgrade-ca.log will indicate the view ID:
INFO  2023-08-22 13:56:57,712 [main] niku.upgrade (clarity:admin:-1:none) () Processing ViewId: 5848280 Layout: grid Metadata: cost
ERROR 2023-08-22 13:56:57,726 [main] niku.upgrade (clarity:admin:-1:none) () 
java.lang.NullPointerException
at com.niku.odf.object.ObjectInstanceImpl.setupPartitionCode(ObjectInstanceImpl.java:495)
at com.niku.odf.object.ObjectInstanceImpl.populateData(ObjectInstanceImpl.java:5670)
at com.niku.odf.object.ObjectInstanceImpl.createOverrideInstance(ObjectInstanceImpl.java:1009)
at com.niku.odf.object.ObjectInstanceImpl.create(ObjectInstanceImpl.java:752)
at com.niku.odf.object.ODFObjectImpl.createInstance(ODFObjectImpl.java:4469)
at com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns.insertInToListColumns(MigrateTsvDataFromSettingsToListColumns.java:159)
at com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns.doUpgrade(MigrateTsvDataFromSettingsToListColumns.java:121)
at com.niku.union.utility.AbstractUpgrade.run(AbstractUpgrade.java:361)
at com.clarity.upgrade.MigrateTsvDataFromSettingsToListColumns.main(MigrateTsvDataFromSettingsToListColumns.java:177)

Environment

Release : 16.1.3

Cause

Caused by an orphan record on a view. 

Resolution

Determine the orphan record(s)

  1. Check upgrade-ca.log for the exact view ID. If you have the view ID run the query:
    select * from odf_ui_view_settings where view_id = 5xxxxxx ---ID is taken from logs
  2. Also run the below query to determine all possible orphans:
    select v.is_system, vs.id, vs.view_id, vs.layout, vs.value, vs.setting_md_id, vs.settings_classifier, v.id as view_id_from_views 
    from odf_ui_view_settings vs 
    left outer join odf_ui_views v on (vs.view_id = v.id) 
    where vs.name = 'tsvDatatype' 
    and v.id is null
  3. Ensure the orphans are solely in odf_ui_view_settings by running the queries below:
    Single View ID determined:
    select * from odf_ui_view_settings where view_id = 5848280 ---Replace with the actual view ID
    select * from odf_ui_views ouv where id = 5848280 ---Replace with the actual view ID
    select * from odf_ui_list_cols oulc where view_id = 5848280 ---Replace with the actual view ID
    No determined View ID:
    select * from odf_ui_view_settings where (select vs.view_id from odf_ui_view_settings vs left outer join odf_ui_views v on (vs.view_id = v.id)
                        where vs.name = 'tsvDatatype' and v.id is null)

    select * from odf_ui_list_cols oulc where (select vs.view_id from odf_ui_view_settings vs left outer join odf_ui_views v on (vs.view_id = v.id)
                        where vs.name = 'tsvDatatype' and v.id is null)
  4. If you confirmed entries only in odf_ui_view_settings, you can proceed with the workaround. If not engage Broadcom Support

Workaround:

  1. Rollback to 16.1.2 or earlier.
  2. If you are able to determine the view and its owner, delete the view from UI if possible (recommended)
  3. If not able to delete from UI, follow the below steps based on whether or not you have the View ID (engage Broadcom Support to review if needed)
  4. Delete orphans based on how many orphans you have:
    • Single view ID: 
      • Before upgrade run the queries below:
        create table odf_ui_view_settings_bkp as select * from odf_ui_view_settings
        delete from odf_ui_view_settings where view_id = 5xxxxxx ---replace with ID of the view that fails from the logs
        commit
      • Re-run the upgrade to 16.1.3
    • No determined view ID:
      • Before upgrade, run the following queries to remove all orphans:
        create table odf_ui_view_settings_bkp as select * from odf_ui_view_settings 
        delete from odf_ui_view_settings where view_id in ( select vs.view_id from odf_ui_view_settings vs left outer join odf_ui_views v on (vs.view_id = v.id)
        where vs.name = 'tsvDatatype' and v.id is null)
        commit
      • Re-run the upgrade to 16.1.3