on 07-28-2008 1:47 AM
Hi
I am using Dynamic configuration for getting file name
Error:
RuntimeException in Message-Mapping transformation: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._I813_Proxy_2_EModMCS_MM_ method DateStamp$[Test, com.sap.aii.mappingtool.tf3.rt.Context@78237823]
I am using following java code but when I am testing the same in mapping.
// get the dynamic values from the container object
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// create a key to access the Filename parameter
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//below you access the file name from header if it was set in the sender file channel
//String filename= conf.get(key);
String fileName = IFRECID; // date stamp is an input field to the UDF
// Here you set the fileName(ur datestamp) in the Header of the message
conf.put(key, fileName);
return fileName;
Please help ! ! !
Edited by: ria sen on Jul 28, 2008 3:18 AM
Hi Ria,
Please note that as far as the code is concerned .There are some errors in it.
String fileName = IFRECID; // date stamp is an input field to the UDF
This should be
String fileName = "IFRECID";
In java when u r declaring the String literals the correct syntax must be used.
Please check the message type attributes in the file adapter whether it is perfectly done or not.
Finally do the End to End testing rather than standalone testing in the Message mapping tab.
Thanks
Arijit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Test this mapping in the Interface mapping test tab and not in the message mapping...
Acknowledge if any error comes/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the UDF what is the cache that you have selected
Make sure it is "Value" and not context
*I am using Dynamic configuration for getting file name
Error:
RuntimeException in Message-Mapping transformation: Exception:http://java.lang.NullPointerException in class com.sap.xi.tf._I813
*
Are you getting or putting filename?
Edited by: Progirl Progirl on Jul 28, 2008 11:46 AM
Hi,
R u "Testing" using "Test Tab" of the Message mapping.
if so below behavoiur is normal. Run u r scenario as per configuration u wud get the output.
Donot test using"Test Tab"
rwd pnts if useful
rgds
srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.