We intermittently get "java.io.IOException: the pipe closes" with the code below. There is a very intermittent nature. Any advice? I tried to replicate this, and when I unplug my machine, I can get this error. This class reads and writes information after a Siebel CRM session.
Here with the Java class code.
private Process _process; private OutputStream _processOut; private ByteArrayOutputStream _sessionOutput; .... _processOut = _process.getOutputStream(); _sessionOutput = new ByteArrayOutputStream(); .... public void writeCommand(String command) throws IOException { _processOut.write(command.getBytes()); _processOut.flush(); _sessionOutput.write(command.getBytes()); }
Here with the actual error:
java.io.IOException: The pipe is being closed at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:260) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at mySession.writeCommand(mySession.java:169)
source share