cancel
Showing results for 
Search instead for 
Did you mean: 

Overwriting the File in File Adapter

Former Member
0 Kudos

Hi All,

I hav a module processor (in Receiver file Adapter)which checks the existence of the file by name DOWN.flg befor writing the file by the same name at the same location. if the file already exists, then it has to wait until another system deletes (as per the requirement). if not, it has to write the file. I had done this successfully with an FTP receiver. but when i'm moving the same functionality to the local drive(now the receiver is a local directory on the XI Server), then i'm getting the following error.

<b>Error</b>:Attempt to process file failed with java.lang.Exception: Overwriting file '/cpe/data/DEV/XI_/IN/APD/Commander/DOWN.flg' not allowed due to configuration flag

<b>Error:</b>

Exception caught by adapter framework: Overwriting file '/cpe/data/DEV/XI_/IN/APD/Commander/DOWN.flg' not allowed due to configuration flag

these are the errors which i found in the audit log. i din't check the overwrite Existing File option in the Receiver adapter.Can anyone help me out in resolving this.

Anyhelp wud b greately apprecited...

Thnx in Advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anil,

can you pls give a try with the overwrite existing option checked. This is because, then only the file will be opened in the mode for writing. But what i understood is that if you have given the overwrite existing option on and then doing the checking inside the module because only if this option is checked the file will be overwritten. Also always the standard SAP module will be the last one in your module sequence, so am not sure by checking this option on will override the code whats there in your module to wait if the file exists.

Cheers

JK

Former Member
0 Kudos

Hello Jayakrishnan,

Thank you very much for the tip, actualy it was very tricky, since the overwrite existing file option is not possible in the "append" mode on my XI version (SP12). THis is what we have done :

- modify the communication channel to "create" mode and check the "overwrite existing file option".

- activate it

- chanche back to the "append" mode

- activate it again

And then it works !

Thanks for your help

Guislain

Former Member
0 Kudos

Thanx guys....I cud resolve it in my adapter module itself. my java runtime object is throwing some exception in my adapter module and hence it is failing.

Thnx a lot for ur answers.

Former Member
0 Kudos

Any Clue on this guys?

Former Member
0 Kudos

Hello,

I have just come through the same problem. My Communication channel is on append mode. When the first message went through XI, it has created the file properly, but when the second message came, it gives me this error, although the rights on the file are set to 777. Has anyone a clue ?

Thanks,

Guislain

Former Member
0 Kudos

Hi Guislain,

Since you are using the append mode, the 'overwrite existing file' option should be ticked so that the file written in the first go can be accessed to be modified and appended with the new content. This will solve your problem.

Cheers

JK

PS: Pls mark helpful answers