Hei,

we are using Jakarta Apache commons-net which relies jsch to deliver
files using sftp.
Thanks for the great work BTW.

Our unit tests work, but for some reason our test server fails with
the following error:

Caused by: com.jcraft.jsch.JSchException: Session.connect:
javax.crypto.ShortBufferException: 32 needed, 20480 supplied
  at com.jcraft.jsch.Session.connect(Session.java:494)
  at com.jcraft.jsch.Session.connect(Session.java:145)
  at 
org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)

I've seen several case of swallowed ShortBufferException in the jsch
code (practice which scares me a little bit).

Any idea what could trigger this exception ? This sounds like a crypto
or algorythm issue. Could it be related to the Java runtime classes ?



Otherwise, can you help us troubleshoot the issue ?

I want to fully understand what causes the issue to be able to fix it.
For example if simply upgrading jsch seems to fix it, but the
changelog doesn't specifically mention the problem, I won't be
convinced that the issue is truly fixed and will not reappear later on
while in production.

Unfortunately Jsch eats the cause so I am not able to have the original failure:

l494:      throw new JSchException("Session.connect: "+e);

I've tried to debug but jsch as found in ibiblio (for maven2 projects)
is compiled without debug symbols, making it again impossible to get
the original stack trace exception.

I've modified jsch sources to add the cause:

      throw new JSchException("Session.connect: "+e, e);

but when I use my compiled jar (compiled with 1.5.0_11), I don't seem
to be able to reproduce the problem.
But as I said, I won't consider it fixed until I get a proof it was
fixed in some way.

Jsch 0.1.31 seems to be compiled with Sun's java compiler version
1.4.0. I don't have this compiler with me and probably won't be able
to get it (1.4.2 at best).

Is there a way to get a version of jsch 0.1.31 compiled with debug
mode so that I can try to reproduce and investigate the issue ?

Thanks for your time,

-- 
Jerome Lacoste

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to