Sub Object copy with Attachment Attributes result in a Null Pointer
search cancel

Sub Object copy with Attachment Attributes result in a Null Pointer

book

Article ID: 429879

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Copying a sub - object with Attachment type attribute is causing a Null Pointer exception to be thrown in the UI and copy is failing. 

Environment

Clarity PPM 16.x

Cause

Investigating the app-ca log files show the following stack trace elements.

java.lang.NullPointerException
	at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.copyEntity
	at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.doCopyEntityAsync
	at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.lambda$copyEntity$0
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run
	at java.base/java.lang.Thread.run
Caused by: com.niku.union.odf.exception.ODFException: <object_code>: <object_code>: java.lang.NullPointerException
	at com.niku.odf.object.copyengine.CopyEngine.copy
	at com.niku.odf.object.copyengine.CopyEngine.copy
	at com.ca.platform.osf.object.rest.provider.ODFResourceProvider.copyEntity
	... 5 more
Caused by: com.niku.union.odf.exception.ODFException: <object_code>: java.lang.NullPointerException
	at com.niku.odf.object.copyengine.CopyEngine.copyAttachmentValue
	at com.niku.odf.object.copyengine.CopyEngine.processAttachment
	at com.niku.odf.object.copyengine.CopyEngine.copySameType
	at com.niku.odf.object.copyengine.CopyEngine.copy
	... 7 more
Caused by: com.niku.union.odf.exception.ODFException: java.lang.NullPointerException
	at com.niku.odf.object.copyengine.CopyEngine.addAttachment
	at com.niku.odf.object.copyengine.CopyEngine.copyAttachmentValue
	... 10 more
Caused by: java.lang.NullPointerException
	at java.base/java.util.Hashtable.put
	at com.niku.odf.object.Utils.getDocDetails
	at com.niku.odf.object.Utils.addAttachmentToObject
	at com.niku.odf.object.Utils.addAttachmentToObject
	at com.niku.odf.object.copyengine.CopyEngine.addAttachment
	... 11 more

Resolution

This is Caused by invalid or missing mime_type for the attachment in CLB_DMS_FILES. 

Please create a case with Support team for information on addressing this.