on 2018 Mar 13 7:48 AM
Hi guys,
Recently we upgraded our PI system from 7.0 to 7.5 (dual split) we have been using UDF Dynamic file configuration java function to get the filename from ftp from one of our scenario, it was working perfectly fine before upgrade but now giving exception just PRD, while it is running fine in Qas. its giving exception in both end to end scenerio or mapping testing.
please guide me as i am already search on Scn but didn't find a solution
Code of UDF and screenshots are attached for reference please.
public String getFileName(Container container) throws StreamTransformationException
{
String fname = "";
Try
{
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File","FileName");
fname = conf1.get(key1);
conf1.put(key1,fname);
}
catch(Exception ee)
{
fname = " " ;
}
}
Request clarification before answering.
Hi David,
I have to admit I don't understand the logic in your UDF. You read a value from the configuration in one line and then you put it back without any modification in the next line. Why? And the most important problem is that there is no "return" statement in your code. You shouldn't be able to compile it. So how is it possible that this code works on your test environment? Are you sure that's the correct code?
Best Regards,
Andrzej Filusz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Andrzej,
Thanks for reviewing my code, As I mentioned i put try and catch block after upgrade as it was giving mapping error on sxmb_moni right after upgrade same code was working fine before upgrade,
Below is the code was working fine before upgrade and after upgrade giving mapping excpetion on test as well as end to end testing.
String fname = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName"); fname = conf1.get(key1);
conf1.put(key1,fname);
return fname;
Please Guide me.
Regards,
I have changed the code as you said but same error on mapping test.
Dear Andrej,
After adding the above mentioned check. when i test end to end scenario i am having the mapping error in sxmb_moni.
Mapping error Exception.
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<!-- Request Message Mapping -->
-<SAP:Error xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SAP="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MP_SCB_</SAP:P1>
<SAP:P2>com.sap.aii.mappingtool.tf7.MessageMappingExceptio</SAP:P2>
<SAP:P3>n: Runtime exception when processing target-field</SAP:P3>
<SAP:P4>mapping /ns1:YPTCL_BPS_ACK_TRANS/FNAME; root mess~</SAP:P4>
<SAP:AdditionalText/>
<SAP:Stack>A runtime exception was raised in the application mapping com/sap/xi/tf/_MP_SCB_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns1:YPTCL_BPS_ACK_TRANS/FNAME; root mess~ </SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
its the same error when i added the try catch block in the code after Pi upgrade.
Please guide.
Hi,
Test message in Operational Mapping.
Regards,
Anoop Rai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David!
Dynamic Configuration object is not accessible in Message mapping Test.
Try end-to-end testing instead.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
Is ASMA checked in the file receiver adapter?
Regards,
Mark
User | Count |
---|---|
91 | |
11 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.