On Nov 1, 2007 3:19 AM, Atsuhiko Yamanaka <[EMAIL PROTECTED]> wrote:
>
>    +-From: "Jerome Lacoste" <[EMAIL PROTECTED]> --
>    |_Date: Wed, 31 Oct 2007 20:28:20 +0100 ______________
>    |
>
>    |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 have never heard such a problem.
> What kind of environment are you using?

OS: solaris 9,
JDK on the OS: not yet verified. 1.4 at least.

Target host for SFTP: Solaris 9 server
Will check more info about SSH server version, etc...

Do you need something in particular ?

> Have you installed the JCE provider dynamically?

Not sure what that means. We are using a Java Runtime >= 1.4 so no need to
add JCE manually.
I am using commons-net which uses JSCH behind the scenes, transparently, so
not sure how this one initializes jsch.

> I can not understand that message,
>   32 needed, 20480 supplied
> If 32 bytes are required and 20480 bytes are given, why it is the problem?

no idea :)

>    |Any idea what could trigger this exception ? This sounds like a crypto
>    |or algorythm issue. Could it be related to the Java runtime classes ?
>
> com.jcraft.jsch.jce.BlowfishCBC#update(...) or
> com.jcraft.jsch.jce.TripleDESCBC#update(...)
> may throw such an exception.
>
>    |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).
>
> Do you think that the version of 'javac' has related to this problem?
> I hardly believe in it.

My only problem is that when using my own compiled jar, I don't seem to have
the problem.

jsch taken from

http://mirrors.ibiblio.org/pub/mirrors/maven2/com/jcraft/jsch/0.1.31/

Nor can I debug with it.

The request to upload jsch was taken from
http://jira.codehaus.org/browse/MAVENUPLOAD-1394.

So I've now downloaded SDK 1.4.2_16 and created my own jsch.

It's not exactly the same as the one taken from ibiblio

-rw-r--r-- 1 jerome jerome 171980 2007-02-26 23:57 jsch-0.1.31.jar
-rw-r--r-- 1 jerome jerome 172249 2007-11-01 07:27 jsch-0.1.31-mine-1.4.jar

and the manifest files differ. With mine:

> cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.4.2_16 (Sun Microsystems Inc.)
>

instead of
> cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.4.0 (Sun Microsystems Inc.)
>

So the one on ibiblio was perhaps built with an ealier 1.4.x SDK version.

I will see if I am able to reproduce the problem with the one I just built
and take on from there.

It could really be that we are using 1.4 on that server and that JCE has an
issue on 1.4.

I've seen for example that one
http://bugs.sun.com/view_bug.do?bug_id=4979126
While it's not my problem, it could be a side effect.

Cheers,

jerome
-------------------------------------------------------------------------
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