You need to bounce tomcat occasioally

We server a lot of content and we bounce tomcat every morning. Might not need it that often, but better safe than sorry.

We use tomcat 4.xx


Ramadhenu, Giridhar (STSD) wrote:

Hello,



I am encountering IOException while getting input stream using
getInputStream() method on URLConnection class while sending data to
Tomcat. Error is pasted below.



"XML Regular I/O Exception - while getting the input stream from
http://12.34.56.78:80/myApp/servlet/com.myComp.xml.CollectorServlet |
original message -> 2006-03-04 22:20:05.54 java.io.IOException: Server
returned HTTP response code: 500 for URL:
http://12.34.56.78:80/myApp/servlet/com.myComp.xml.CollectorServlet";



The problem occurs after continuous operation of Tomcat server for about
one month. But server does not show any exception when client encounters
this problem.



Please find the client code below.

------------------------------------------------

URLConnection httpConnection = null;



//Code to open connection to URL

........



httpConnection.setDoOutput(true);

httpConnection.setDoInput(true);

httpConnection.setUseCaches(false);

httpConnection.setRequestProperty("Content-Type",
"text/xml;charset=UTF-8");

httpConnection.setRequestProperty("Authorization", authString);



//Code to get the output stream

........



outStream.write(......);

outStream.flush();

outStream.close();



try

{

inStream = httpConnection.getInputStream();

}

catch (IOException e)

{

String sMessage = "XML Regular I/O Exception - while getting the input
stream from " +

url.toString() + " | original message -> " + (e);

throw new XMLExceptionIO(sMessage);

}





Thanks in advance.

Giridhar.


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to