Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Null Pointer Exception: Dynamic Configuration

Hi,

I am getting a null pointer exception in dynamic configuration

Below is the screenshot of input queue and error.

Code:

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/" + "/sap.com/xi/XI/System/File","FileName");

conf.put(key,strCompCodeDesc);

return strCompCodeDesc;

Please guide.

Thanks & Regards,

Nida

Former Member
Former Member replied

Add error handling in your UDF for when you want to test this mapping directly (but this dynamic parameter doesn't exist because you aren't testing end-to-end):

try{

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/" + "/sap.com/xi/XI/System/File","FileName");

conf.put(key,strCompCodeDesc);

return strCompCodeDesc;

}

catch(Exception ex){}

return strCompCodeDesc;

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question