18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

java.io.IOException: Stream closed

edited November -1 in Sahi - Open Source
Hi

I am getting the below error message. Can you help me to correct this?

Thanks in advance!

===========================================================
D:\Sankar\sahi\bin>SET EXT_CLASS_PATH=;

D:\Sankar\sahi\bin>REM eg. SET EXT_CLASS_PATH=;;..\extlib\db\mysql-connector-jav
a-5.0.4-bin.jar

D:\Sankar\sahi\bin>SET SAHI_CLASS_PATH=..\lib\sahi.jar;..\extlib\rhino\js.jar;..
\extlib\apc\commons-codec-1.3.jar

D:\Sankar\sahi\bin>REM SET MOZ_NO_REMOTE=1

D:\Sankar\sahi\bin>java -classpath ;;..\lib\sahi.jar;..\extlib\rhino\js.jar;..\e
xtlib\apc\commons-codec-1.3.jar net.sf.sahi.Proxy


NOTE
When running a suite, if you get an 'already running, but is not responding' err
or alert on firefox,
don't worry, just click OK on the alerts and the next time you run the suite thi
ngs will work fine.


>>>> Sahi started. Listening on port:9999
>>>> Configure your browser to use this server and port as its proxy
>>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Cont
roller
java.io.IOException: Stream closed
at java.io.BufferedInputStream.getInIfOpen(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at net.sf.sahi.util.Utils.getBytes(Utils.java:66)
at net.sf.sahi.response.HttpModifiedResponse.sampleBytes(HttpModifiedRes
ponse.java:129)
at net.sf.sahi.response.HttpModifiedResponse.getSampleContent(HttpModifi
edResponse.java:141)
at net.sf.sahi.response.HttpModifiedResponse.getSampleContent(HttpModifi
edResponse.java:120)
at net.sf.sahi.response.HttpModifiedResponse.isXHTML(HttpModifiedRespons
e.java:72)
at net.sf.sahi.response.HttpModifiedResponse.<init>(HttpModifiedResponse
.java:51)
at net.sf.sahi.RemoteRequestProcessor.processHttp(RemoteRequestProcessor
.java:107)
at net.sf.sahi.RemoteRequestProcessor.processHttp(RemoteRequestProcessor
.java:70)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:129)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:86)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at java.lang.String.<init>(Unknown Source)
at net.sf.sahi.response.HttpModifiedResponse.getSampleContent(HttpModifi
edResponse.java:141)
at net.sf.sahi.response.HttpModifiedResponse.getSampleContent(HttpModifi
edResponse.java:120)
at net.sf.sahi.response.HttpModifiedResponse.isXHTML(HttpModifiedRespons
e.java:72)
at net.sf.sahi.response.HttpModifiedResponse.<init>(HttpModifiedResponse
.java:51)
at net.sf.sahi.RemoteRequestProcessor.processHttp(RemoteRequestProcessor
.java:107)
at net.sf.sahi.RemoteRequestProcessor.processHttp(RemoteRequestProcessor
.java:70)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:129)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:86)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:130)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:86)
at java.lang.Thread.run(Unknown Source)

Comments

  • narayannarayan Administrators
    Sankar,

    This can occur occasionally when the server closes its connection. Is this error causing a problem for you? Can you elaborate on which server you are using, what happens when this error occurs and what should be the expected behaviour?

    Regards,
    Narayan
  • Hi Narayan

    Thanks for the quick response.

    I was trying to configure Sahi and updated the browser settings to localhost and port to 9999.

    And tried to open google.com for testing it.

    That's where i got the above error message.

    I am not able to open the none of the web pages.

    Please let me know what could be the problem.

    thanks
    Sankar
  • narayannarayan Administrators
    Looks like you have configured an external proxy incorrectly. Can you tell us what changes you have made to Sahi's settings?
Sign In or Register to comment.