Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.7k views
in Java FTP by (220 points)
I have a business object that contains a method to FTP files to a remote server. This method creates an SSLFTPClient object, sets it up, logs in, and then calls the put command. The put() succeeds without error, but the result is a zero length file being created on the FTP server.

The business object is a JMX MBean running within a JBoss J2EE application server. When I execute the same code from a test case outside of the application server there are no problems, the file is the correct size.

Anyone have experience with running SSLFTPClient in a J2EE environment?

- M

2 Answers

0 votes
by (162k points)
What do the logs say? Are there any exceptions being thrown?
Is it possible that it is unable to find the file?

You can set a property that integrates j/ssl logging with log4j - see the devguide.

You could also try setting an FTPProgressMonitor that simply logs bytes as they get transferred. Also, there is an FTPMessageCollector that you can set to get a record of FTP commands and server reply codes - that should tell you what is happening.

There shouldn't be any problem running SSLFTPClient within JBoss, or any J2EE server unless file access is restricted (which I don't believe is the case with JBoss).

I have a business object that contains a method to FTP files to a remote server. This method creates an SSLFTPClient object, sets it up, logs in, and then calls the put command. The put() succeeds without error, but the result is a zero length file being created on the FTP server.

The business object is a JMX MBean running within a JBoss J2EE application server. When I execute the same code from a test case outside of the application server there are no problems, the file is the correct size.

Anyone have experience with running SSLFTPClient in a J2EE environment?

- M
0 votes
by (220 points)
Thanks, your reply put us on the right track. It was an issue with one of our IO objects, not with the SSLFTPClient. We have it working now.

- M

Categories

...