----- Original Message -----
From: "Thangavel Sankaranarayanan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, September 08, 2008 12:49 PM
Subject: Intermitant DB Problem in tomcat:java.sql.SQLException: Io
exception: Connection reset by peer: JVM_recv in socket input stream read
Hi ,
I am getting the following error when connecting to oracle database,
Has any one seen this kind of errors before? is this the problem with
tomcat in loosing the connections??
I am getting this error once in 5 hrs and i get a HTTPStatus500 error and
when a user tries again it gets okay and it is working
How can i resolve this Intermitant DB Problem in tomcat!!!
java.sql.SQLException: Io exception: Connection reset by peer: JVM_recv in
socket input stream read
This is the Exception details in my application logs:
DEBUG au.com.vodafone.mpp.bos.MPPFactory - Calling getConnection method
of Datasrc Class:600991
DEBUG au.com.vodafone.mpp.da.DataSrc - Inside getConnection() method of
DataScr
DEBUG au.com.vodafone.mpp.da.DataSrc - About to get a Connection from
SharedPoolDatasrc and return it back...
ERROR au.com.vodafone.mpp.da.DataSrc - Exception while get a Datasource
connection
ERROR au.com.vodafone.mpp.da.DataSrc - java.sql.SQLException: Io
exception: Connection reset by peer: JVM_recv in socket input stream read
DEBUG au.com.vodafone.mpp.bos.MPPFactory -
Exception:java.sql.SQLException: Io exception: Connection reset by peer:
JVM_recv in socket input stream read
WARN org.apache.struts.action.RequestProcessor - Unhandled Exception
thrown: class java.sql.SQLException
This is my code:
static public Connection getConnection() throws Exception {
theLog.debug("Inside getConnection() method of DataScr");
try
{
if (ds == null)
{
theLog.debug("SharedPoolDatasrc is NULL: Serious
Error ");
System.out.println("SERIOUS ERROR 99");
}
theLog.debug("About to get a Connection from
SharedPoolDatasrc and return it back...");
return ds.getConnection();
}
catch(Exception exp)
{
theLog.error("Exception while get a Datasource
connection");
theLog.error(exp);
throw exp;
}
}
Regards,
Thangavel Sankaranarayanan
Thangavel... what are the system details JRE and db driver version if you
know...
I've seen some wierd behaviour as well, but I think its the latest JDBC
drivers on Java 6 that make a pool lose its connection...
I'm not even using TC's pool, so I dont think its a TC thing, we saw
something similar after upgrading Java...
Stick this in your exception....
SQLException tmp = e;
do {//Ever since Java 6 extra
issues
//This just to see what the
hell is going on
System.out.println("====");
System.out.println("createStatement
failed: " + e.toString());
tmp.printStackTrace();
tmp =
tmp.getNextException();
} while (tmp != null);
It will show you the exception that is causing the exception.... the real
trouble.... ours was CONNECTION NOT FOUND
Which means the driver is dropping connections in the pool... trouble is the
pool doesnt know it...
If you refresh, the pool gives you next connection, so that naturally works,
until it cycles in on the bad dummy connection again...
Maybe its the same thing... we went back to older drivers... other thing is
that it wasnt Oracle either, but symptom is the same..
In our case.... exact same setup... on Java 5 perfect, on Java 6 broken...
maybe?
Good Luck
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]