PPM Upgrade fails with Failure occurred while applying delete_projects_job_S164940.xml, java.lang.NullPointerException at com.niku.odf.ori.xblhandlers.EntityHandler.modifyBusinessObject(EntityHandler.java:185)

Document ID : KB000124973
Last Modified Date : 25/01/2019
Show Technical Document Details
Upgrade to 15.5.1 fails with error:
During upgrade from 15.5 to 15.5.1
1/07/19 11:55 AM (ExecTask) Error Applying XOG: Failure occurred while applying delete_projects_job_S164940.xml
1/07/19 11:55 AM (ExecTask) Check D:\niku\clarity/logs/xog-seeddata/out/database\delete_projects_job_S164940_out.xml for errors
1/07/19 11:55 AM (ExecTask) ERROR: Upgrade failed for tenant
Error in delete_projects_job_S164940_out.xml file:
XOG-3300: Job Definition record has not been inserted java.lang.NullPointerException
at com.niku.odf.ori.xblhandlers.EntityHandler.modifyBusinessObject(EntityHandler.java:185)
at com.niku.odf.ori.xblhandlers.EntityHandler.processOdfRequest(EntityHandler.java:120)
at com.niku.odf.ori.xblhandlers.EntityHandler.postProcess(EntityHandler.java:57)
at com.niku.xql2.XQLVisitor.postProcess(XQLVisitor.java:1416)
at com.niku.union.xml.dom.DOMWalker.postProcess(DOMWalker.java:210)
Upgrade to 15.5.1
This may occur on other PPM versions, when xogging in a job definition with same root cause and fix.
This is caused by DE46559
 If a job is applied with new parameter(s) which had no parameters before.

delete_projects_job_S164940.xml is a change for a new feature, the Delete Investments job will have an additional parameter:
New Parameter in the Delete Investments Job
  1. 'Delete Marked Investments with Timesheet and Transaction Data'
  2. By Default the option is false / unchecked
The defect is in how the application determines about the new parameters being inserted. It's data dependent so will not occur on all environments.

Workaround, after rollback:
1. Take a backup of <clarity_install_dir>\lib\osf.object.jar
2. Copy the attached osf.object.jar file to <clarity_install_dir>\lib
3. Get the path of the delete_projects_job_S164940.xml
It's usually in:
You may copy it to another location for convenience.
4. Navigate to $clarity/bin
5. Run the command after correcting the path to the files:
serviceant -f <install_dir>\.setup\scripts\db.xml install-xog-seeddata-file -Dfile=<path of delete_projects_job_S164940.xml> -Dtenant.id=clarity -Dinstall.dir=<install_dir>
Example command:
serviceant -f C:\clarity\.setup\scripts\db.xml install-xog-seeddata-file -Dfile=C:\install\install-packages\15.5.1\package\upgrade\database\schema\xog-seeddata\delete_projects_job_S164940.xml -Dtenant.id=clarity -Dinstall.dir=C:\clarity
6. Now replace <clarity_install_dir>\lib\osf.object.jar with the original file you backed up in step 1.
7. Re-run the upgrade to 15.5.1.
File Attachments: