Attempts to FTP a file using the IBM WebSphere® FTP adapter from a IBM WebSphere® Transformation Extender map fails with a -1003 error code.
The FTP attempted by the WebSphere Transformation Extender Launcher fails.
The FTP session has timed out
Diagnosing the problem
Enable the adapter trace option by adding -TV+ to the corresponding map card command or rule. Using an output card as an example, the cards' command would look like:
-TV+ -is:functionName Create -is:Filename file.txt -wtx:ispec com.ibm.j2ca.ftp.FTPFileInteractionSpec -wtx:record com.ibm.j2ca.ftp.record.FTPInputStreamRecord -mcf:userName userid -mcf:outputDirectory outputdirectoryname -mcf:password password -mcf:protocol FTP -mcf:hostName hostname -mcf:secondServerProtocol FTP[
Recompile and deploy the map/system to your Launcher environment
Restart the Launcher and attempt to FTP files to reproduce the failed behavior.
Once the FTP fails, review the trace file that was generated. By default, the trace file will be named j2ca.mtr and it can be found in the same directory as the compiled map. In this trace file, look for text similar to:
Error code: -1003 , Error message: The specified Directory could not be found for performing this operation. Either it does not exist or there is not adequate permission for performing this operation on it, error code.
Error code: -1003 , Error message: javax/resource/ResourceException.<init>(Ljava/lang/Throwable
Resolving the problem
Edit the WebSphere Transformation Extender configuration file, that has a default name of dtx.ini and add the following parameter:
IdleFTP Resource Adapter=xx
where xx is a numeric value, representing the number of seconds that a FTP connection can remain idle (no activity) before the connection is dropped.
Restart the Launcher.
In this situation, an FTP connection was established then, after a period of inactivity, the FTP connection has become invalid. The connection has timed out based on the FTP servers timeout value, which in most environments is set to 300 seconds (5 minutes). The IdleFTP Resource Adapter parameter instructs the WTX Launcher to remove an FTP connection if it has been idle for more than the specified number of seconds. When an FTP connection is needed, a new FTP connection will be created if no idle FTP connections exists. Check with your FTP server System Administrator to determine the FTP timeout value and then set the IdleFTP Resource Adapter parameter to a value less than the FTP server timeout value.
Ascential Mercator TX WTX