cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer Exception: Dynamic Configuration

Former Member
0 Kudos

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

View Entire Topic
Former Member
0 Kudos

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;

Former Member
0 Kudos


Hi Aaron,

It worked.

Thanks &Regards,

Nida