Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.9k views
in Java FTP by (320 points)
Here is the code:

      // create client
      ftp = new SSLFTPClient();

      // disable standard SSL closure
      ftp.setConfigFlags(SSLFTPClient.ConfigFlags.DISABLE_SSL_CLOSURE);

      // set remote host
      ftp.setRemoteHost(host);

      // turn off server validation
      ftp.setValidateServer(false);

      // connect to the server
      cat.debug("attempting connect...");
      ftp.connect();
      cat.debug("are we connected? " + ftp.connected());

      // switch to SSL on control channel
      cat.debug("switching to SSL");
      ftp.auth(SSLFTPClient.AUTH_TLS);

      // log in
      cat.debug("logging in with u: " + username + " p: " + password);
      ftp.login(username, password);

      // set up active binary transfers
      ftp.setConnectMode(com.enterprisedt.net.ftp.FTPConnectMode.ACTIVE);
      ftp.setType(FTPTransferType.BINARY);
         
      // set timeout
      ftp.setTimeout(timeout);


Here is the log file:

INFO [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.579 : edtFTPj - PRO version
DEBUG [com.enterprisedt.net.ftp.FTPClient] 17 Aug 2006 14:34:49.585 : Class: com.enterprisedt.net.ftp.ssl.SSLFTPClient
Version: 1.2.8
Build timestamp: 24-May-2006 12:04:20 EST
Java version: 1.4.2_09
CLASSPATH: :/usr/local/apache-tomcat-5.5.17/bin/bootstrap.jar:/usr/local/apache-tomcat-5.5.17/bin/commons-logging-api.jar
OS name: Linux
OS arch: i386
OS version: 2.4.21-40.ELsmp

INFO [com.enterprisedt.util.license.LicenseProperties] 17 Aug 2006 14:34:49.591 : Licence expiry date: 31 Dec 2099
INFO [com.enterprisedt.util.license.LicenseProperties] 17 Aug 2006 14:34:49.591 : Production licence
INFO [puretls] 17 Aug 2006 14:34:49.635 : PureTLS debug level=0
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.638 : Setting custom validator to com.enterprisedt.net.ftp.ssl.SSLFTPStandardValidator
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.652 : Turned server validation off
DEBUG [com.intellicare.FTPS.FtpsHandler] 17 Aug 2006 14:34:49.652 : attempting connect...
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.652 : Created explicit FTPS client.
DEBUG [com.enterprisedt.net.ftp.ssl.SSLFTPClient] 17 Aug 2006 14:34:49.652 : Connecting to /192.168.253.76:21
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.709 : 220 ftps X2 WS_FTP Server 5.0.0 (443739523)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.714 : DISABLE_CONTROL_SSL_CLOSURE=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.714 : DISABLE_CONTROL_WAIT_ON_CLOSE=true
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.715 : ALLOW_BASIC_CONSTRAINTS_IN_NON_CA=false
DEBUG [com.intellicare.FTPS.FtpsHandler] 17 Aug 2006 14:34:49.715 : are we connected? true
DEBUG [com.intellicare.FTPS.FtpsHandler] 17 Aug 2006 14:34:49.715 : switching to SSL
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:49.715 : ---> AUTH TLS
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:50.266 : 234 SSL enabled and waiting for negotiation
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:50.267 : Starting SSL handshake on control socket
INFO [cryptix] 17 Aug 2006 14:34:50.342 : GLOBAL_TRACE=false
INFO [cryptix] 17 Aug 2006 14:34:50.342 : GLOBAL_DEBUG=false
INFO [cryptix] 17 Aug 2006 14:34:50.342 : GLOBAL_DEBUG_SLOW=false
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:51.763 : ---> QUIT
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 17 Aug 2006 14:34:51.773 : ^UUI^@^B^BF530 Please login with USER and PASS

As you can see, my program fails BEFORE the line:
// log in
      cat.debug("logging in with u: " + username + " p: " + password);
      ftp.login(username, password);


What is going on?? This is the "pro" version, for which I have paid. Can I get some love here?
Thanks,
-Jack

2 Answers

0 votes
by (162k points)
For our readers' information - this has turned out to be a CLASSPATH problem with Tomcat.
0 votes
by (320 points)
yes, my problem was that I had two different web services deployed in Tomcat that were both including the edt pro jar. This resulted in two copies of it being loaded in the classpath. My solution was to marry the two web services together so only one copy of the jar would be loaded. Another possible solution as support pointed out would be to put the jar in Tomcat itself and not include it in my individual web services.

Thanks EDT!

Categories

...