I/O error: InputSource: Stream closed

Hi
I am new to XML. I am trying to modify XML content using DOM parser. After the modification I want to check if the changes have taken place or not by printing the XML on the console.
This is what I have done:
1. Read XML from InputSource
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document doc = docBuilder.parse(inputSource);2. Get the nodes to Modify.
NodeList nodeList = (NodeList)doc.getElementsByTagName("XXX");3. Print the InputSource to check the changes.
BufferedReader readerTemp = new BufferedReader(new InputStreamReader(inputSource.getByteStream()));
               String inputLine;
                while ((inputLine = readerTemp.readLine()) != null) {
                  System.out.println(inputLine);
                }But however, when I try to view the changes I get an error STREAM CLOSED.
Please help me, how to open the inputSource again to read the stream from it... what can I do to solve this problem?

The parser closes the input source, having read it all the way to EOF. So there's nothing left to be read even if the parser didn't close the source.
So you need a new input source.
But are the changes taking place on the file, or just in the DOM? In which case re-reading the file won't show any changes - you will need to write the DOM out to the file.
In which case you can look at it with a text editor. Alternatively you can print the DOM to the console directly.
So you don't really need the answer to your original question.

Similar Messages

  • Stream closed error while testing a composite in EM

    HI,
    I have deployed a simple composite and wanted to test it in EM. I am getting a stream closed popup, not sure whats wrong?
    I have restarted the server and problem still persists.

    its actually remote server, I am able to deploy a simple HelloWorld composite and even able to see the same in Em.I can even browse through all the composites deployed there by many other people.But problem is when I try to test it its giving the Stream closed error.
    Is it something to do with access permissions, if so i would not have deployed it in first case..
    the pop up error message----
    Stream Closed
    For more information, please see the server's error log for
    an entry beginning with: Server Esception beginning with PPR, #14
    _______________________________

  • Ejbc error: Stream Closed

    I get this error when i build my ejb jar file using weblogic.ejbc. I
    have defined WL_HOME and have applied sp12 of weblogic. Please help
    D:\xyz>C:\jdk1.2.2\jre\..\bin\java.exe -mx256m -classpath
    C:\xerces-1_2_1\xerces.jar;C:\Weblogic\lib
    \weblogic510sp12.jar;C:\Weblogic\lib\weblogic510sp12boot.jar;C:\Weblogic\classes\boot;C:\Weblogic\li
    cense;C:\Weblogic\classes;C:\Weblogic\lib\weblogicaux.jar;C:\Weblogic\myserver\clientclasses;C:\Webl
    ogic\myserver\serverclasses;C:\Weblogic\mssqlserver4v70\classes;C:\TOPLink3.6\TLJ\Classes\JDK1.2;C:\
    TOPLink3.6\TLJ\Classes\JDK1.2\Tools.jar;C:\TOPLink3.6\TLJ\Classes\JDK1.2\Toplink.jar;C:\TOPLink3.6\T
    LJ\Classes\JDK1.2\Toplinkx.jar;C:\TOPLink3.6\TLWL51\Classes\JDK1.2\TOPLinkWLX.jar;C:\qt_v2001_1p0;%J
    AVAMAIL_CLASSPATH%;%J2EE_CLASSPATH%;D:\hbp\build weblogic.ejbc
    -verbose -normi "-J-mx256m" -nowarn -
    compiler sj D:\abc\dist\lib\abc-generic.jar D:\abc\dist\lib\abc.jar
    I keep getting this error - ejbc error: Stream Closed
    Any help will be appreciated.

    I am using ant 1.4.1 for building this. The error message is just EJB
    Error: Stream Closed. It says that ejbc reported an error. No details
    at all. i know it is difficult to reproduce anywhere. When i installed
    jdk1.3, it gave error on the public id of the toplink meta-inf cmp xml
    files.
    Rob Woollen <[email protected]> wrote in message news:<[email protected]>...
    Can you show us the full error message?
    -- Rob
    Bala wrote:
    I get this error when i build my ejb jar file using weblogic.ejbc. I
    have defined WL_HOME and have applied sp12 of weblogic. Please help
    D:\xyz>C:\jdk1.2.2\jre\..\bin\java.exe -mx256m -classpath
    C:\xerces-1_2_1\xerces.jar;C:\Weblogic\lib
    \weblogic510sp12.jar;C:\Weblogic\lib\weblogic510sp12boot.jar;C:\Weblogic\classes\boot;C:\Weblogic\li
    cense;C:\Weblogic\classes;C:\Weblogic\lib\weblogicaux.jar;C:\Weblogic\myserver\clientclasses;C:\Webl
    ogic\myserver\serverclasses;C:\Weblogic\mssqlserver4v70\classes;C:\TOPLink3.6\TLJ\Classes\JDK1.2;C:\
    TOPLink3.6\TLJ\Classes\JDK1.2\Tools.jar;C:\TOPLink3.6\TLJ\Classes\JDK1.2\Toplink.jar;C:\TOPLink3.6\T
    LJ\Classes\JDK1.2\Toplinkx.jar;C:\TOPLink3.6\TLWL51\Classes\JDK1.2\TOPLinkWLX.jar;C:\qt_v2001_1p0;%J
    AVAMAIL_CLASSPATH%;%J2EE_CLASSPATH%;D:\hbp\build weblogic.ejbc
    -verbose -normi "-J-mx256m" -nowarn -
    compiler sj D:\abc\dist\lib\abc-generic.jar D:\abc\dist\lib\abc.jar
    I keep getting this error - ejbc error: Stream Closed
    Any help will be appreciated.

  • Content Filter - Stream Closed error

    Hello,
    i have created a Content-Filter for xml files. Within the filter i parse the file with SAX. Then i want to render this xml file with an XSLT Filter, but there i get always the error message: 'IOException: stream closed'. Any hints to solve the problem?
    regards,
    Marco

    Hi Marco,
    if the stream is parsed through an steeam handle, ensure that the implementation of the handle does not close the stream. The stream should be reseted after the handler call, or you simply creat a new buffered stream (java.io.BufferedInputStream) containing the parsed data, which is than passed to the RF.
    Regards,
    Thilo

  • Stream Closed Error

    Hello!
    I have this 2-class package which gets informations on Microsoft SQL Server 2005 tables and table content. It worked perfectly on J2SE 5. Today I moved to Java J2SE1.6 u1 and recompiled the project. Now, it triggers bizzare Steam Closed exceptions when trying to read a line from the keyboard (if I let exceptions to be thrown). I found several posts regarding this readLine-stream closed issue on the java forums, but none answered this problem satisfactorily. This is my code:
    package databaseinfo;
    import java.io.*;
    import java.sql.*;
    public class DatabaseInfo {
       private static DBConnection dbConn; // connection to DB
       /** connects to the SQL Server 2005, using the given credntials
       public static boolean connect() {
           String username = "test";
           String password = "test";
           String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; // JDBC driver for connecting to MSSQL 2005
           String url = "jdbc:sqlserver://FIREBLADE\\SQLEXPRESS"; // JDBC connection URL to MSSQL 2005
           try {
               dbConn = new DBConnection(username,password,driver,url);
           catch (Exception e) { return false; }
           return true;
       /** disconnects from the SQL Server 2005
       public static void disconnect() {
           try {
               dbConn.logout();
           catch (Exception e) { }
       /** prints the list of tables belonging to the user (dbo) from the current
        *  database
       public static void printTablesList() {
           try {
                dbConn.printQueryResult("EXEC sp_tables @table_owner=dbo");
           catch (Exception e) { return; }
       /** prints extra information and the content of a user-given table
       public static void printTableInfoAndContent() throws IOException {
           try {
               BufferedReader in = new BufferedReader(
                                   new InputStreamReader(System.in));
               String tableName;
               System.out.println("\nGet extra information and the content of which table? ");
               tableName = in.readLine();
               in.close();
               dbConn.printQueryResult("EXEC sp_columns @table_name=" + tableName);
               System.out.println();
               dbConn.printQueryResult("SELECT * FROM " + tableName);       
           catch (IOException e) { }
       public static void main(String args[]) throws IOException {
           connect();
           printTablesList();
           printTableInfoAndContent();
           disconnect();
    package databaseinfo;
    import java.io.*;
    import java.sql.*;
    public class DBConnection {
        // maximum no. of rows on the user console screen
        private final static int maxRowCount = 25;
        private Connection conn; // connection to DB
        /** connects to the MSSQL 2005 database
        public DBConnection (String username, String password, String driver,
                             String url) throws ClassNotFoundException, SQLException {
             login(username,password,driver,url);
        /** login to SQL Server 2005 for a user having a username and a passsword,
         *  using a certain database driver and a given url
        public int login(String username, String password, String driver, String url)
                                                      throws ClassNotFoundException,
                                                             SQLException {
            Class.forName(driver); // sets the JDBC driver
            conn = DriverManager.getConnection(url,username,password); // obtains the JDBC connection
            if (conn != null)
                System.out.println("\nSQL Server Connection established ...\n");
            else {
                System.out.println("\nBad username and/or password.\n");
                return 0;
            return 1;     
        /** closes the JDBC connection
        public void logout() throws SQLException {   
            conn.close();
            System.out.println("\nSQL Server Connection closed.\n");
        /** executes SQL queries and prints their output to the screen
        public void printQueryResult(String sql) {
            try {
                    BufferedReader in = new BufferedReader(
                                        new InputStreamReader(System.in));
                    int rowCount = 0;
                    Statement st = conn.createStatement();
              ResultSet rs = st.executeQuery(sql);
              ResultSetMetaData rsmd = rs.getMetaData();
              int numberOfColumns = rsmd.getColumnCount();   
              int i;
                    for (i = 1; i <= numberOfColumns; i++)
                        System.out.print(rsmd.getColumnName(i)+"\t");
                    System.out.println();
              while (rs.next()) {
                            if ((rowCount != 0) && (rowCount % maxRowCount == 0)) {
                                    System.out.println("\nPress ENTER to continue ... ");
                                    in.read();
                            for (i = 1; i <= numberOfColumns; i++)     
                       System.out.print(rs.getString(i) + "\t\t");
                            rowCount++;
                            System.out.println();
                    in.close();
             catch (Exception e) { }
    }Thanks for reading this post!

    Don't close the input stream, and don't create a new one every time you want to read - create one for the life of the program.

  • Stream closed while copying?

    Hi, i am trying to open a connection to a url and then trying to save the page to a location. i frequently face a problem in which the copying terminated by itself. This only happens when i try to copy a webpage with big file size. However sometimes it manage to succesfully copy the files. So, can anyone tell me what wrong? Sometimes it can, sometimes cannot. I put my codes in a try catch block but nothing was done in the catch block although i try to print out the error message. My partial codes shown below.
    URL _url = new URL("http://www.google.com");
    OutputStream out = new FileOutputStream("test.html");
    URLConnection conn = _url.openConnection();
    conn.connect();
    BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    while ((inputString = reader.read()) != -1) {
        out.write(inputString);
    out.flush();
    out.close();Thank you.

    i managed to track down the error stack. i think the code dies during the execution of method available() of java.net.PlainSocketImpl. I think this is the socket connection problem which throw the exception. the socket should be instantiaed when i call url.openConnection() if i not wrong. and why it dies i really clueless. and somemore it does not die at all times. most time it is ok. any help is very appreciated. below is the error msg. thanks.
    java.io.IOException: Stream closed.
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.<init>(Throwable.java:87)
    at java.lang.Exception.<init>(Compiled Code)
    at java.io.IOException.<init>(Compiled Code)
    at java.net.PlainSocketImpl.available(Compiled Code)
    at java.net.SocketInputStream.available(Compiled Code)
    at java.io.BufferedInputStream.read(Compiled Code)
    at java.io.FilterInputStream.read(Compiled Code)
    at java.io.PushbackInputStream.read(Compiled Code)
    at java.io.FilterInputStream.read(Compiled Code)
    at java.io.InputStreamReader.fill(Compiled Code)
    at java.io.InputStreamReader.read(Compiled Code)
    at java.io.BufferedReader.fill(Compiled Code)
    at java.io.BufferedReader.readLine(Compiled Code)
    at java.io.BufferedReader.readLine(Compiled Code)
    at ActionPrintReport.loadPage(Compiled Code)
    at ActionPrintReport.<init>(Compiled Code)

  • WebLogic Server 6.1 SP 3 DocumentBuilder throws IOException: Stream closed

    Hi,
              I have a question about XML processing and error handling, and how the
              WebLogic container affects things.
              Here's what happens to us. We have a servlet parsing XML using DOM.
              The servlet has an InputStream with the content. It gets the default
              DocumentBuilderFactory
              (weblogic.xml.jaxp.RegistryDocumentBuilderFactory) and makes it
              validating. It asks for a DocumentBuilder. It gives the builder our
              own custom error handler to collect up all the SAX parse errors. It
              then tells the builder to parse the input stream. We would expect
              that any problems with the content would be reported as an error to
              our error handler, so that we can then report the errors to the user
              as part of the servlet response.
              However, certain malformed XML content causes the WebLogic parser to
              issue several error messages to System.out and throw an IOException
              with the message "Stream closed". No errors are recorded in our error
              handler. This happens on a variety of inputs, which all revolve
              around the root element start tag being malformed or entirely missing.
              We get this behavior with a totally empty stream, with a stream that
              has the <?xml> and <!DOCTYPE> headers but nothing else, with a stream
              that has the headers and then a malformed start tag like
              "<Submit_Contracts a="1"b="2"/>". I think the programmer would expect
              any of these inputs to cause the parser to simply report a fatal error
              and stop. Throwing an IOException makes it look like it's an error in
              the underlying stream, and clearly it's not. (Most of the test code I
              used actually pulled the XML from a ByteArrayInputStream.)
              Shouldn't WebLogic's parser handle these inputs differently? Throwing
              an IOException can't be correct, can it? Should the application
              instead be responsible for checking that the input has a well-formed
              start tag? In that case the application is doing the parsing that we
              want to rely on the parser to do! Should the application instead
              catch IOExceptions from the parser and report them to the user as
              input errors? In that case the application can potentially swallow
              and ignore harmful system errors.
              The messages on System.out are all along the lines of:
              "<Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to open XML
              document. Failed to retrieve PUBLIC id or SYSTEM id from the document.
              Decrease the number of char between the beginning of the document and
              its root element.>
              <Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to open XML
              document. Failed to retrieve PUBLIC id. Stream closed>
              <Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to parse given XML
              document. Failed to retrieve PUBLIC id. The root element is required
              in a well-formed document.>
              <Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to parse given XML
              document. Failed to retrieve SYSTEM id. The root element is required
              in a well-formed document.>
              <Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Failed to open XML
              document. Failed to retrieve root tag. Stream closed>
              <Oct 17, 2002 5:38:03 PM EDT> <Error> <XML> <Could not instantiate
              factory class specified in the Server console. Invalid parameters: at
              least one of publicId,systemId, rootTag must be non-null>
              The IOException looks like:
              "java.io.IOException: Stream closed
              at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:118)
              at java.io.BufferedInputStream.read(BufferedInputStream.java:268)
              at weblogic.apache.xerces.utils.ChunkyByteArray.fill(ChunkyByteArray.java:230)
              at weblogic.apache.xerces.utils.ChunkyByteArray.<init>(ChunkyByteArray.java:106)
              at weblogic.apache.xerces.readers.DefaultReaderFactory.createReader(DefaultReaderFactory.java:153)
              at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:499)
              at weblogic.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:318)
              at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:974)
              at weblogic.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:183)
              at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:140)
              at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
              at com.isone.sms.participant.contracts.web.WebLogicParserContainerTest.testWebLogicParserTanksOnEmptyStream(WebLogicParserContainerTest.java:448)
              at java.lang.reflect.Method.invoke(Native Method)
              at junit.framework.TestCase.runTest(TestCase.java:166)
              at junit.framework.TestCase.runBare(TestCase.java:140)
              at junit.framework.TestResult$1.protect(TestResult.java:106)
              at junit.framework.TestResult.runProtected(TestResult.java:124)
              at junit.framework.TestResult.run(TestResult.java:109)
              at junit.framework.TestCase.run(TestCase.java:131)
              at junit.framework.TestSuite.runTest(TestSuite.java:173)
              at junit.framework.TestSuite.run(TestSuite.java:168)
              at com.isone.sms.participant.contracts.web.ContractTestServlet.doPost(ContractTestServlet.java:23)
              at com.isone.sms.participant.contracts.web.ContractTestServlet.doGet(ContractTestServlet.java:16)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)"
              Judging from the IOException, it looks as though WebLogic's wrapper
              parser, RegistryDocumentBuilder, successfully picked a real parser to
              do its work and is passing off the input to be parsed there, even
              though the input's already closed. Perhaps the
              RegistryDocumentBuilder silently screwed up the stream while trying to
              figure out what parser to use, but didn't take that into account
              before attempting to pass it off for parsing. Perhaps the error
              messages on System.out account for when RegistryDocumentBuilder is
              screwing up the stream.
              But if RegistryDocumentBuilder discovers that the stream can't be
              parsed, why can't it simply report a fatal error and stop before
              starting the real parser?
              Mainly I wanted to put this experience up here on a newsgroup because
              I was so surprised that nobody else had reported similar problems. It
              makes me doubt whether our applications are handling the XML parsing
              correctly. But I can't see any other way that makes sense. Please
              let me know what you think!
              Thanks,
              Jim
              

    Hi,
    I got this error when i used JRUN as plugin server through
    Ineternet Information Server. but it was working fine when used it
    as standalone server.
    The reason was beacuase, the inputstream was getting closed . when i removed it, it started working.
    (To be frank , the Inputstream was closed by XML DOM PARSER , which is third party component.)
    and believe that your case is also the same ....
    If you have doubt on that then see that configuration for proxies under your webservers config files
    best of luck
    LOkesh T.C

  • Axis Client Web Service call problem: java.io.IOException: Stream closed

    Hi, I tried to call a webservice from Axis Client, and I encounter the following error. Do you guys have any idea what actually happens?
    Please help, I am newbie in web services.
    ==============Root Cause===============
    AxisFault
    faultCode: { h t t p : / / schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: Stream closed
    faultActor:
    faultNode:
    faultDetail:
         {h t t p : / / xml.apache.org/axis/}stackTrace:java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
         {h t t p : / / xml.apache.org/axis/}hostname:compname
    java.io.IOException: Stream closed
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:301)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)     
    Caused by: java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         ... 17 more  I am calling through proxy, the setting is as follows:
                System.setProperty("https.proxyHost", [proxyname here]);
                System.setProperty("https.proxyPort", [proxyport here]);
                System.setProperty("http.proxyHost", [proxyname here]);
                System.setProperty("http.proxyPort", [proxyport here]);

    Are there any problems showing up in the server's log?

  • Stream Closed BufferedReader in Java

    I do sometimes see an error "Stream Closed" while trying to read a file which has more than 8192 chars (default size of buffer).
    And the buffer sometimes consumes the entire file and some of the times only 8192 characters.
    Will appreciate some one help me on this urgently

    String fileName = "D:/Venkat/test files/file.txt";
    try{
    BufferedReader in = new BufferedReader ( new FileReader
    (fileName));
    String s1 ;
    while ( ( (s1 =in.readLine())!= null) ) {
    count++;      
    if(s1.length() <=75){
    System.out.println("Record length less than 75 "+s1);
    in.close();
    }catch(Exception e){
    //Each Line "s1" contains 80 chars. and when it reaches Line No. 102 it only reads 11 chars from the line. So it totally reads only 8192 chars from the file.When i try to execute the program again it runs with no errors.
    }

  • Help please!     java.io.IOException: Stream closed

    When I run my webapp under Tomcat5.5, it works fine, but I got the following Exception in Tomcat stdout.log:
    2005.04.19. 15:54:47 org.apache.jasper.runtime.PageContextImpl release
    WARNING: Internal error flushing the buffer in release()
    2005.04.19. 15:54:47 org.apache.catalina.core.StandardWrapperValve invoke
    WARNING: Servlet.service() for servlet jsp threw exception
    java.io.IOException: Stream closed
         at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
         at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:159)
         at org.apache.jsp.pages.tree_jsp._jspService(org.apache.jsp.pages.tree_jsp:58)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:534)I dont have an idea why did my webapp throw this. I got it when I logged in the webapp. I cant find the root problem, because there is no a word from my package in the exception-list above. What happened?
    Thanks in advance.

    SEVERE: Servlet.service() for servlet jsp threw exception
    java.io.IOException: Stream closed
         at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
         at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)
         at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
         at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
         at org.apache.jsp.accSubAccount_jsp._jspService(accSubAccount_jsp.java:244)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)It is in JSP, I was just quoting that looking into error stack I opened genrated java file accSubAccount_jsp.java at line 244 and came to know that this file has only 196 lins.
    At successfull submission I am opening a page through javascript window.location directive, probably it may be the reason?

  • Questions on Stream Closed

    Hi,
    I was just testing on this sequence of reopening the input stream. Im having an error when trying to read again to the System.in after I've closed in another function. Please advise what could be the cause of it. Here's the code and output. Thanks.
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class Streams{
        public static void main(String[] args){
            Streams s = new Streams();
            s.closeOne();
            s.closeTwo();
        public void closeOne(){
            InputStreamReader ir = new InputStreamReader(System.in);
            try{
                ir.read();
                ir.close();
            }catch(IOException io){}
        public void closeTwo(){
            InputStreamReader ir = new InputStreamReader(System.in);
            try{
                ir.read();
                ir.close();
            }catch(IOException ioe){ ioe.printStackTrace(); }
    java Streams
    3
    java.io.IOException: Stream closed
            at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
            at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
            at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
            at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
            at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:131)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:117)
            at java.io.InputStreamReader.read(InputStreamReader.java:151)
            at Streams.closeTwo(Streams.java:21)
            at Streams.main(Streams.java:7)Regards,
    Rhani

    java.io.IOException: Stream closed
    Oh come on. How mch more clearer can the error
    message be? Can you walk through a door after ithas
    been closed?May I interest you in some Midol?Bite me!I'm not big on seafood.
    I just don't think it's that bad a question.

  • Error message when Closing PS CS6

    I keep receiving a error message when closing PS CS6 which says "Adobe Media Core CS6 has stopped working"
    What can I do to resolve this issue?
    I'm running Windows Vista professional

    If you want help you may have to provide some more information … and a Forum- or web-search might also be worth trying.
    http://forums.adobe.com/message/4509053
    http://forums.adobe.com/thread/1025148
    http://forums.adobe.com/message/4495683

  • A  *** ERROR = RFC ====== connection closed (no data)

    I trace data On Instance DEV_W0 the had Error as below
    A  *** ERROR => RFC ======> connection closed (no data)
    Please Kindly  verify  the cuase and recommend in this issue .
    Edited by: SoeyTH on Dec 6, 2010 3:38 PM

    You need to proivde more logs to find what caused.
    Is you SAP up?

  • HT202157 New apple is not asking for the WIFI password.Home sharing is not working,i am getting Error while streaming videos from Youtube.

    I got new Apple TV 10 days back,its not asking for the WIFI password.Home sharing is not working,i am getting Error while streaming videos from Youtube.
    I can only see pics and video saved in my iphone. No other options are working.The worst part is that its not asking wifi passoword.
    Not able to connect istores and itunes.
    I cannot do software update. Can anyone help in this content?

    Thanks Brian- I am not connecting it with iphone teethering. I am using it with my DSL wifi.
    I am using it with ethernet cable then its working fine.If i am trying to use it with WIFI then its giving error.
    I tried using Netwrok testing but its giving same error.

  • Error message when closing down computer

    Adobe photoshop downloader boot will not shut down automatically when I close down the computer. What settings can I change. I cannot find anything to help in edit/preferences. I have the starter edition.

    Error message when closing down computer
    Ainslie Collison - 09:03pm Sep 12, 2008 Pacific
    Adobe photoshop downloader boot will not shut down automatically when I close down the computer. What settings can I change. I cannot find anything to help in edit/preferences. I have the starter edition.

Maybe you are looking for

  • Single sign on and TimeMachine?

    I finally sorted out a typo with my AFP server that was interferring with single sign on for clients, only to find that it appears TimeMachine still requires a username and password to do network backups. Is this true, or am I missing something? I wa

  • Kdelibs-noarts -- help please, doesn't work [solved]

    I'm a xfce user and just want amarok and sometimes k3b and k9copy from kde. I don't want any konqueror, kwrite, arts or any other bloated stuff in my machine. So, i modified the kdelibs PKGBUILD to suit my needs -without arts nor avahi dependency/sup

  • Adobe After effects better on pc or mac?

    adobe after effects run better on a mac or pc?

  • How can I get an HP Deskjet 3050 to work on a macbook air OS 10.9

    How can I get an HP Deskjet 3050 to work on a macbook air OS Maverick 10.9.5?

  • Upgrade to CRM 2007

    Hi All, I want to know the steps to upgrade to CRM 2007 from CRM 5.0. If you atleast give me the links where I can find the info, that is also fine. I need to prepare a document involving the steps and mandatory information to be noted while doing th