Re: [JSch-users] put large binary file with compression cause java.lang.ArrayIndexOutOfBoundsExcept
Status: Alpha
Brought to you by:
ymnk
From: <ym...@jc...> - 2011-02-16 02:17:52
|
Hi, +-From: Nguyen Tran Vu Linh <vls...@ya...> -- |_Date: Mon, 14 Feb 2011 23:31:35 -0800 (PST) ___________ | |Thank you for your update, I got the same exception as Xiao. |In my case, file type is .pgp and its size >=100KBs with compression |enabled. |I downloaded http://www.jcraft.com/jsch/jsch-0.1.45-deflate.zip and |apply to my application but exception still occurs. Thanks to some file sent from Nguyen directly to me, I could reproduce that problem. Please try http://www.jcraft.com/jsch/jsch-0.1.45-deflate2.zip I guess that the problem will happen in sending deflated(compressed) data with the packet compression. You know that the deflation for deflated data will usually inflate data, and jsch had not cared for such a case. In debugging this problem, we have found some bug in JZlib in such situations. It will not cause the exception, and break data implicitly. So we suggest you to stop the packet compress mode for a while. We will working on it. FYI, you can enable/disable the packet compression dynamically, session.connect(); ... session.setConfig("compression.s2c", "none"); session.setConfig("compression.c2s", "none"); session.reky() ... session.setConfig("compression.s2c", "zl...@op..."); session.setConfig("compression.c2s", "zl...@op..."); session.reky() Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk |