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

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (4)

Answers (4)

Former Member
0 Kudos

Did it work? If so please close the question Nida.

naveen_chichili
Active Contributor
0 Kudos

Hi Nida,

if you are testing in mapping part you will get this error.

Try to test the interface end-to-end you will not get this error.

Thanks,

Naveen

binod8
Active Participant
0 Kudos

Hi Nida,

you may refer the details that has already been shared by Muniyappan. Please note that you will get this error if you directly try to test this in ID as file name is only captured in the global variable at runtime when you do end to end testing (file is read by channel and processed in XI). Please also make sure that file name is checked in ASMA of sender channel.

Thanks,

Binod

Muniyappan
Active Contributor
0 Kudos

Hi,

can you try testing it end to end?

did you define string strCompCodeDesc in the udf?

check this for more on udf

Combining three different aspects of PI in one shot - Process Integration - SCN Wiki