on 06-07-2015 4:36 PM
Hello,
I'm using file adapter(sender) to read additional files as attachments. I'm picking one XML file as payload and two PDF documents as attachments. One of that PDF document is optional. I have the optional parameter for the second attachment set as 'YES'. When both the files are available the channel picks them up with no error. But when only one file is available it gives an error saying
"Could not process due to error: java.lang.NullPointerException: while trying to invoke the method com.sap.aii.adapter.file.io.FileHandle.length() of an object loaded from an array (which itself was loaded from field com.sap.aii.adapter.file.File2XI.attachedFiles_ of an object) with an index loaded from local variable 'ii'"
The error is thrown in the channel but the files get picked up and processed as usual.
Can anyone help? Not sure why I'm getting this error though I marked the second attachment as optional.
Category:com.sap.aii.adapter.file.File2XI
Location:com.sap.aii.adapter.file.File2XI.invoke()
Parameters in the channel:
Source dir ***
Filename *.xml
Additional files checked
File list attach1,attach2
attach1.namePart "_xyz.xml"="_attachment1.pdf"
attach2.namePart "_xyz.xml"="_attachment2.pdf"
attach1.optional NO
attach2.optional YES
attach1.type BIN
attach2.type BIN
Please advise.
Thank you.
Larry.
Please implement note -1863092 - Additional files archiving fails with NullPointerException
It should solve your issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aber,
I think the file name in the additional files option and the file name you are mentioning in the main level in the channel should match except the extension part.
Please refer the below link and can you cross check once again the configuration.
Specifying Additional Files in the Sender File Adapter - Advanced Adapter Engine - SAP Library
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aber,
First of all i think you are using wrong this option.
You have defined filename as *.xml. You have to set the real name for example: "Example_xyz.xml"
Later with the transformation attach1.namePart "_xyz.xml"="_attachment1.pdf", the system will search Example_attachment1.pdf as attachment.
Check this example http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/404ee507-3fbc-2e10-00bc-be90ab28d...
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What do you have set in Quality of service? Best effort/Exactly once?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.