(Resending for the group)..
Hi Alan,
Thanks for the reply.
Yes, I am reading both output and error channel. I have run the
following commands in the server and both print fine, i.e., all the
characters are printed. Moreover i could observe in the code that the
input buffer has no content in it AND the channel is never closed.
Please note my source code below which is just exactly as suggested in
the example files.
StringBuilder tmpBuf = new StringBuilder();
byte[] tmp = new byte[1024];
while (true) {
while (in.available() > 0) {
int i = in.read(tmp, 0, 1024);
if (i < 0)
break;
String resp = new String(tmp, 0, i);
tmpBuf.append(resp);
}
if (channel.isClosed()) {
in.close();
break;
}
//for debug, if miss isClosed()
if( !channel.isClosed() && channel.getExitStatus() == 0 ){
System.out.println("before close exit-status changed!" );
}
}
Here, the inputstream 'in', after few cycles, is returning no character
(in.available < 0) and channel.isClosed() is never true.
Please advise.
Regards,
P.V.R.Kartik
________________________________
From: Keith Alan Richardson [mailto:[email protected]]
Sent: Tuesday, November 16, 2010 1:14 PM
To: Kartik Pullabhotla v r (WT01 - GMT-Telecom Equipment)
Cc: [email protected]
Subject: Re: [JSch-users] Oracle exp command with jsch
Are you reading the channel stdout and stderr? One or both buffers may
fill up causing deadlock
SQL*Plus may not produce enough output to fill the buffers but exp
might.
You can test if this is your problem by running the following commands :
# print 1MB to stdout
perl -e 'print "x"x(1*1024*1024)'
# print 1MB to sterr
perl -e 'print STDERR "x"x(1*1024*1024)'
On 16 Nov 2010 09:00, <[email protected]> wrote:
(Resending this since i haven't received any acknowlegement or
the copy)
Hi Team,
We have a project here whose primary purpose is to call a script
on a unix server from...
------------------------------------------------------------------------
------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 &
L3.
Spend less time writing and rewriting code and more time
creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users