Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need urgent clariffication  RSS feed

 
Kishore Babu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Tomcat3.2 and using Microsoft Ms Sql Driver for java.but when the system is idle for few minutes,am able to access JSP pages but not able to access Database thru JSP.am pasting the error below..but when I restart the tomcat..everything is fine..can anyone suggest something abt this???
*****************************************8
java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]System Exception: Conne
ction reset by peer: JVM_recv in socket input stream read
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.submitRequest(Unknown Sou
rce)
at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.submitRequest(Unkn
own Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown S
ource)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown So
urce)
at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
at com.sfa.UserLogin.checkLogin(com/sfa/UserLogin.java:148)
at jsp.com.sfa._0002fjsp_0002fcom_0002fsfa_0002fSFAUserLogin_0002ejspSFA
UserLogin_jsp_1._jspService(_0002fjsp_0002fcom_0002fsfa_0002fSFAUserLogin_0002ej
spSFAUserLogin_jsp_1.java:177)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspSer
vlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
vlet.java:282)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:4
29)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like the driver closes the connection if it has not been used for a while. You would need to check and re-open it.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!