Upgrade fails with JSON error on 16.1.0 on UpdateTimesheetFilterForResourceManager
search cancel

Upgrade fails with JSON error on 16.1.0 on UpdateTimesheetFilterForResourceManager


Article ID: 366778


Updated On:


Clarity PPM On Premise Clarity PPM SaaS


Upgrade fails with error on 16.1.0 on UpdateTimesheetFilterForResourceManager

4/17/24 11:10 AM (ExecTask) Executing Ant script: $clarity/upgrade/16.1.0/component/preupgrade/database.xml
4/17/24 11:10 AM (ExecTask) Update started Timesheet Filter For Resource Manager
4/17/24 11:10 AM (ExecTask) Exception in thread "main" org.json.JSONException: JSONArray[0] is not a JSONObject.
4/17/24 11:10 AM (ExecTask) at org.json.JSONArray.getJSONObject(JSONArray.java:301)
4/17/24 11:10 AM (ExecTask) at com.ca.ppm.database.upgrade.UpdateTimesheetFilterForResourceManager.getTransformedFilter(UpdateTimesheetFilterForResourceManager.java:140)
4/17/24 11:10 AM (ExecTask) at com.ca.ppm.database.upgrade.UpdateTimesheetFilterForResourceManager.doUpgrade(UpdateTimesheetFilterForResourceManager.java:86)
4/17/24 11:10 AM (ExecTask) at com.niku.union.utility.AbstractUpgrade.run(AbstractUpgrade.java:361)
4/17/24 11:10 AM (ExecTask) at com.ca.ppm.database.upgrade.UpdateTimesheetFilterForResourceManager.main(UpdateTimesheetFilterForResourceManager.java:54)
4/17/24 11:10 AM (ExecTask)
4/17/24 11:10 AM (ExecTask) Total time: 0H:0M:3S
4/17/24 11:10 AM (ExecTask) com.niku.dbtools.ant.ExecutableException: $clarity/upgrade/16.1.0/component/preupgrade/database.xml:29: Java returned: 1
4/17/24 11:10 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:109)
4/17/24 11:10 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:84)
4/17/24 11:10 AM (ExecTask) at com.niku.dbtools.Utilities.executeAntScript(Utilities.java:2641)
4/17/24 11:10 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:2168)
4/17/24 11:10 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:1161)


  1. Rollback Clarity and the database
  2. On the database, run the below query:
    select ouvs.id, ouvs.value from odf_ui_view_settings ouvs join odf_ui_views ouv on ouv.id = ouvs.view_id and ouv.type = 'timesheets'
    and ouvs.name = 'advFilter' and ouvs.value like '%resourceManager%'
  3. In the results, look for bad format like  [[ or ]]  or "filters":"[null,{\"name\":\"resourceName\"
  4. If you see a bad record, note the id for it
  5. Note the id on a simple view with normal values
  6. Now you can update the value for the bad view records to use the same value as the working view record (example): 
    update odf_ui_view_settings set value = (select value from odf_ui_view_settings where id =5402040) ---working view record
    where id in (5109026, 5361040) ---bad records
  7. Restart the upgrade