Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.9k views
in Java FTP by (240 points)
Hi,

We are using ftpj-pro.2.1.0 and we are getting problems to make our software with Websphere. Exactly the same software and configuration works without problems for weblogic, so it seems that the reason of this is the same as explained here:

http://www.enterprisedt.com/forums/viewtopic.php?p=8996

I downloaded the latest trial version version (3.9.1), but now when running the application I am getting this stack trace:

com.enterprisedt.net.ftp.FTPException: 4 Failure
at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.getOKRequestStatus(SftpSubsystemClient.java:1127)
at com.enterprisedt.net.j2ssh.sftp.SftpSubsystemClient.makeDirectory(SftpSubsystemClient.java:374)
at com.enterprisedt.net.j2ssh.SftpClient.mkdir(SftpClient.java:389)
at com.enterprisedt.net.ftp.ssh.SSHFTPClient.mkdir(SSHFTPClient.java:1445)


Why am I getting this exception now? Any ideas?

Thanks

5 Answers

0 votes
by (51.6k points)
I don't think these errors are related as your happened in SFTP and the other was in FTPS; the two protocols are unrelated apart from the fact that they both do file-transfer.

The error "4 Failure" is coming from the server when you try to create a directory. The server doesn't give any clues as to why it disallowed this operation. One possibility would be a permission error. Another might be invalid characters in the directory name. A look at the server log might give a clue.

- Hans (EnterpriseDT)
0 votes
by (240 points)
Hi Hans,

Thanks for your quick response.

I agree that the problems are not related, it is just that I got the first one with our current edtftpj-pro version (2.1.0) and I just tried to avoid that exception upgrading to the latest edtftpj trial (3.9.1), then is when I get the exception I posted before. Still do not understand why I cannot create a directory getting that exception, as I can create directories manually in the ftp server, and also exactly the same code works perfectly with weblogic and our current edtftpj-pro version (2.1.0).

Anyway, I just realized that the exception we got is not exactly the same as the one mentioned in that post ( http://www.enterprisedt.com/forums/viewtopic.php?p=8996 )

Here is the stack trace of the exception I get with 2.1.0 and Websphere 7:

com.enterprisedt.net.j2ssh.transport.publickey.InvalidSshKeySignatureException: SHA-1/RSA/PKCS#1: Not initialized
at com.enterprisedt.net.j2ssh.transport.publickey.rsa.SshRsaPublicKey.verifySignature(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolClient.verifyHostKey(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolClient.performKeyExchange(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.A(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
at com.enterprisedt.net.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
at java.lang.Thread.run(Thread.java:735)
Caused by: java.security.SignatureException: SHA-1/RSA/PKCS#1: Not initialized
at com.enterprisedt.cryptix.provider.rsa.Any_RSA_PKCS1Signature.engineUpdate(Unknown Source)
at java.security.Signature$SignatureImpl.engineUpdate(Signature.java:469)
at java.security.Signature.update(Signature.java:325)
... 8 more

We need to make our software work with Websphere 7, and it would be great if it is without upgrading edtfptj library.

Is this problem related to the IBM JVM? Could it be any other reason?

Another thing it may be of interest, is that our software was working fine for websphere in previous releases, and no code changes have been done in this module. I cannot confirm for what Websphere/JVM version was working though.
Also I tried running Websphere 7 with Sun JDK 1.6 update 18 getting the same problem..

I appreciate any help. Thanks
0 votes
by (240 points)
Just to clarify, when I said "I can create directories manually in the ftp server" I meant I can create a directory with a ftp client (WinSCP). I will have a look at the server logs tomorrow..
0 votes
by (240 points)
We upgraded to 3.9.1 so that the original Websphere JVM problem is not there anymore. Regarding the other problem, the server was returning "4 FAILURE" as it was trying to create a directory that already exists.

Issues gone!
0 votes
by (51.6k points)
Thanks for letting us know.

- Hans (EnterpriseDT)

Categories

...