Discussion:
[JSch-users] sporadic ArrayIndexOutOfBoundsException in com.jcraft.jsch.Channel.connect()
Norbert Sensen
2013-09-24 07:39:39 UTC
Permalink
Hello,

we develop an integration-application which does very much sftp-traffic.
(About 20 connections every 5 minutes).
We are using jsch-0.1.46.jar

Very sporadically (about 1 time per week) we get the following Exception:

Caused by: com.jcraft.jsch.JSchException:
java.lang.ArrayIndexOutOfBoundsException
at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:273)
at com.jcraft.jsch.Channel.connect(Channel.java:152)
at com.jcraft.jsch.Channel.connect(Channel.java:145)
at
net.creditlife.clpm.infrastructure.impl.SFTPConnection.initConnection(SFTPConnection.java:80)

Caused by: java.lang.ArrayIndexOutOfBoundsException: null
at com.jcraft.jsch.Buffer.getByte(Buffer.java:148)
at com.jcraft.jsch.Buffer.getString(Buffer.java:188)
at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:260)


What does this mean? What is the cause of the problem?
And most important: How can we avoid this?

We would be very happy if anyone could help us.
Thanks,
Norbert Sensen
Atsuhiko Yamanaka
2013-10-02 08:14:46 UTC
Permalink
Hi,

+-From: Norbert Sensen <***@web.de> --
|_Date: Tue, 24 Sep 2013 09:39:39 +0200 ___
|
|Hello,
|we develop an integration-application which does very much sftp-traffic.
|(About 20 connections every 5 minutes).
|We are using jsch-0.1.46.jar

|Very sporadically (about 1 time per week) we get the following Exception:
...
|Caused by: com.jcraft.jsch.JSchException:
|java.lang.ArrayIndexOutOfBoundsException
| at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:273)
| at com.jcraft.jsch.Channel.connect(Channel.java:152)
| at com.jcraft.jsch.Channel.connect(Channel.java:145)

|What does this mean? What is the cause of the problem?

It seems the session has been dropped in making a channel connection.

|And most important: How can we avoid this?

There must be many reasons for unexpected session drops caused by
external factors, so I suggest to re-try making sessions or channels
at such a case.


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk
Facebook: http://facebook.com/aymnk

Loading...