Hi,
+-From: Adrian Cole <[email protected]> --
|_Date: Sat, 23 Jul 2011 13:11:02 +1000 ___
|
|I'm getting an NPE at the following, which is probably connection related
|and could use a better message:
|Caused by: 4: java.lang.NullPointerException
|at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:577)
|at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:438)
|at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:405)
...
It seems to me that ChannelSftp#connect() has thrown an exception,
but ChannelSftp#put() has been invoked.
IMHO, please check the following method in JschSshClient.java of jclouds,
public void throwChannelNotOpenExceptionOrPropagate(String channel,
JSchException e) throws JSchException {
if (e.getMessage().indexOf("channel is not opened") != -1)
throw new ChannelNotOpenException(String.format("(%s) channel %s is
not open", toString(), channel), e);
}
that method may hide an exception.
And then, for the efficiency, it will be better to cache the sftp connection
in 'sftpConnection' object.
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
Facebook: http://facebook.com/aymnk
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users