<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Null pointer Exception  while using DynamicConfiguration in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636110#M2737535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My scenario is IDoc to CSV where the part of target folder varies according to a field value in input payload to PI, I have written UDF with type as "Single Values"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;public String DynDir(String inp, Container container) throws StreamTransformationException&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;String str = "/Dump/testop/"+inp+"/" ;&lt;/P&gt;&lt;P&gt;DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;DynamicConfigurationKey key1 = DynamicConfigurationKey.create("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sap.com/xi/XI/System/File"&gt;http://sap.com/xi/XI/System/File&lt;/A&gt;&lt;SPAN&gt;", "Directory"); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;conf.put(key1,str);&lt;/P&gt;&lt;P&gt;return str ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the Target folder should be determined according to the input value say &lt;SPAN style="font-size: 13.3333px;"&gt;/Dump/testop/BG for input WERKS value in IDoc BG001.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute the code it throws an error:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/861321" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where DynDir is UDF name and I mapped the input value and UDF to root node of Target structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get an error code like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;"Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 4] in class com.sap.xi.tf._MM_XYZ_ method DynDir[DIR2, com.sap.aii.mappingtool.tf7.rt.Context@efc623]&lt;BR /&gt;com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 4] in class com.sap.xi.tf._MM_XYZ_ method DynDir[DIR2, com.sap.aii.mappingtool.tf7.rt.Context@efc623]&amp;nbsp; .&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Please help to solve this, I can even do this by Variable substitution but I need to achieve this by UDF.&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nithin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jan 2016 12:17:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-01-04T12:17:33Z</dc:date>
    <item>
      <title>Null pointer Exception  while using DynamicConfiguration</title>
      <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaq-p/7636107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the below steps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step 1 - In message mapping a UDF is created to catch errors and store them in a variable using dynamic configuration &lt;/P&gt;&lt;P&gt;step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was using DynamicConfiguration odject as "Conf"&lt;/P&gt;&lt;P&gt;and DynamicConfigurationKey object as "Key".&lt;/P&gt;&lt;P&gt;I wrote below code for Dynamic cofiguration in UDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;String error="";&lt;/P&gt;&lt;P&gt;error=error+ "missing required field" &lt;/P&gt;&lt;P&gt;DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);&lt;/P&gt;&lt;P&gt;//DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Error", "ERROR");&lt;/P&gt;&lt;P&gt;DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Error", "ERROR");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;conf.put(keyHeader1, error);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but while i am trying to test the data in message mapping it will show one error at the time of runtime .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Runtime exception when processing target-field mapping /ns0:MT_DB2_SourcePlant/Record/SourcePlant; root message: Exception:java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of an object loaded from local variable .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using addInfo method inAbstractTrace class.Using this i find error at  conf.put(keyHeader1, error);&lt;/P&gt;&lt;P&gt;before the conf.put(keyHeader1, error);its working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help in finding the solution for getting currect error message from ABAP class?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 11:35:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaq-p/7636107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-01T11:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Null pointer Exception  while using DynamicConfiguration</title>
      <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636108#M2737533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; String error="";&lt;/P&gt;&lt;P&gt;&amp;gt; error=error+ "missing required field" &lt;/P&gt;&lt;P&gt;&amp;gt; DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add this statement here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (conf != null) {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; //DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Error", "ERROR");&lt;/P&gt;&lt;P&gt;&amp;gt; DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Error", "ERROR");&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; conf.put(keyHeader1, error);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 11:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636108#M2737533</guid>
      <dc:creator>stefan_grube</dc:creator>
      <dc:date>2011-02-01T11:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Null pointer Exception  while using DynamicConfiguration</title>
      <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636109#M2737534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 12:22:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636109#M2737534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-01T12:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Null pointer Exception  while using DynamicConfiguration</title>
      <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636110#M2737535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My scenario is IDoc to CSV where the part of target folder varies according to a field value in input payload to PI, I have written UDF with type as "Single Values"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;public String DynDir(String inp, Container container) throws StreamTransformationException&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;String str = "/Dump/testop/"+inp+"/" ;&lt;/P&gt;&lt;P&gt;DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;DynamicConfigurationKey key1 = DynamicConfigurationKey.create("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sap.com/xi/XI/System/File"&gt;http://sap.com/xi/XI/System/File&lt;/A&gt;&lt;SPAN&gt;", "Directory"); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;conf.put(key1,str);&lt;/P&gt;&lt;P&gt;return str ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where the Target folder should be determined according to the input value say &lt;SPAN style="font-size: 13.3333px;"&gt;/Dump/testop/BG for input WERKS value in IDoc BG001.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute the code it throws an error:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/861321" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where DynDir is UDF name and I mapped the input value and UDF to root node of Target structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get an error code like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;"Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 4] in class com.sap.xi.tf._MM_XYZ_ method DynDir[DIR2, com.sap.aii.mappingtool.tf7.rt.Context@efc623]&lt;BR /&gt;com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 4] in class com.sap.xi.tf._MM_XYZ_ method DynDir[DIR2, com.sap.aii.mappingtool.tf7.rt.Context@efc623]&amp;nbsp; .&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Please help to solve this, I can even do this by Variable substitution but I need to achieve this by UDF.&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nithin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 12:17:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636110#M2737535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-01-04T12:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Null pointer Exception  while using DynamicConfiguration</title>
      <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636111#M2737536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI : Dynamic configuration can't be tested in ESR(mapping) directly run the interface from rwb or end to end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 12:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636111#M2737536</guid>
      <dc:creator>manoj_khavatkopp</dc:creator>
      <dc:date>2016-01-04T12:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Null pointer Exception  while using DynamicConfiguration</title>
      <link>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636112#M2737537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manoj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you are right, when I checked end to end it's working now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,Nithin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 12:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/null-pointer-exception-while-using-dynamicconfiguration/qaa-p/7636112#M2737537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-01-04T12:45:49Z</dc:date>
    </item>
  </channel>
</rss>

