I experience this exception from time to time, when I use maven wagon to deploy artifact to remote repository. Maven generates command "umask 2; mkdir -p /repo/repository/com/o2bs/components/valuelist/parent/1.1.1" and NPE occurs on line 52, where there is a check for io.in
if (io.in!=null){
thread=new Thread(this);
...
thread.start();
}
Problem is, that sometimes (I did not find when) io is null. During debugging I have found that it becomes null somewhere in request.request(_session, this); call on line 43 in ChannelExec. This happens occasionally and irregularly.
I suggest to alter the check to
if (io != null && io.in!=null){
I recompiled jsch with this modification and maven deploy than succeeds all right (even if io is null).
I am using maven version 2.1.0 and I think it is using jsch v. 0.1.41 (hard to say as jsch is part of maven.jar, however I replicated the bug with simple java class using 0.1.41 jsch library)
E:\prj\libs\jsch-0.1.41\maven-error-log.log