Thursday 28 April 2016

JCA FTP Adapter limitation in OSB


When we use FTPAdapter with OSB 11g (specifically 11.1.1.6 in our case), Then we can encountered below error in osb_server1.out log file: 

<BEA-000000> <onReject: The resource adapter 'FTP Adapter' requested handling of a malformed inbound message. However, the following activation property has not been defined: 'rejectedMessageHandlers'. Please define it and redeploy. Will use the default Rejection Directory file://jca/Get/rejectedMessages for now.>
We were stuck with the problem of handling large file (Specifically 5 MB file) with OSB. Which was continuously getting polled and deleted from the FTP server and OSB logs was showing the rejection handler error.

Solution:

The default properties in the JCA FTP Adapter limits files to 4MB when polling for inbound messages.
Reason is when the FTP Adapter is used as inbound to receive files from an FTP server, it is possible to limit the size of files by using the payloadSizeThreshold property.
E.g. when the following below endpoint property
<property name="payloadSizeThreshold" type="xs:string" many="false" override="may">50000</property>
then files that are larger than 50000 bytes will be rejected.

This is properly working for all files that are smaller than around 4 MB, but for files larger than that a so-called scalable DOM is created and in this case the payload threshold check is not performed.
To ensure that the payloadSizeThreshold is properly recognized for files of all sizes, ensure that the SupportsScalableDOM property for the FTP Adapter is set to false.
1. Edit the FTPAdapter and add the following property inside the JCA file:
<property name="SupportsScalableDOM" value="false"/>

But changing it and making JCA adapter to poll the large files can result into out of memory error as file size depend on various factor such as (System resources, Load on the server and memory) to process the large files.

ODI is the best tool for processing files having size in GB’s.

3 comments:

  1. Would you know the limit of file size in file adapter inbound for 12c?

    ReplyDelete
    Replies
    1. File size as per Documentation is claimed as 7MB. But it still it all depends on load on server and space in memory.

      Delete