I am trying to work with C3PO to connect with DB and automatically needs to re-establish a connection with the DB when network is down.
Actually I downloaded some applications from Internet and try to working on that. But its not working. First I want to know, How can I check, the first time connection happened through C3po like?
Becuase I want not able to idenfity it is happened with C3po or normal SessionFactory.
Becuase when ever my network down and up at that time I am getting error.
16:23:03,578 INFO EmployeeAction:37 - Local Port:8080
16:23:03,578 INFO EmployeeAction:36 - Local Addr:192.168.1.129
16:23:03,578 DEBUG SessionImpl:247 - opened session at timestamp: 13696519835
16:23:03,578 INFO EmployeeAction:37 - Local Port:8080
16:23:03,578 DEBUG AbstractBatcher:410 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
16:23:03,578 DEBUG SessionImpl:247 - opened session at timestamp: 13696519835
16:23:03,578 DEBUG ConnectionManager:444 - opening JDBC connection
16:23:03,578 DEBUG AbstractBatcher:410 - about to open PreparedStatement (open PreparedStatements: 0, globally: 1)
16:23:03,578 DEBUG SQL:111 - select * from dual
Hibernate: select * from dual
16:23:03,578 DEBUG ConnectionManager:444 - opening JDBC connection
16:23:03,578 DEBUG SQL:111 - select * from dual
Hibernate: select * from dual
16:23:03,578 DEBUG AbstractBatcher:418 - about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
16:23:03,578 DEBUG AbstractBatcher:418 - about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
16:23:03,578 DEBUG ConnectionManager:427 - aggressively releasing JDBC connection
16:23:03,578 DEBUG ConnectionManager:427 - aggressively releasing JDBC connection
16:23:03,593 DEBUG ConnectionManager:464 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
16:23:03,593 DEBUG ConnectionManager:464 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
16:23:03,593 DEBUG JDBCExceptionReporter:92 - could not execute query [select * from dual]
java.sql.SQLException: Io exception: Connection reset by peer: socket write error
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:255)
at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:826)
at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3384)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(Ab stractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.ja va:1808)
at org.hibernate.loader.Loader.doQuery(Loader.java:69 7)
at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:222 8)
at org.hibernate.loader.Loader.listIgnoreQueryCache(L oader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.custom.CustomLoader.list(Cust omLoader.java:312)
at org.hibernate.impl.SessionImpl.listCustomQuery(Ses sionImpl.java:1722)
at org.hibernate.impl.AbstractSessionImpl.list(Abstra ctSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl. java:175)
at com.example.action.EmployeeAction.saveData(Employe eAction.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(D ispatchAction.java:194)
at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:595)
16:23:03,593 DEBUG JDBCExceptionReporter:92 - could not execute query [select * from dual]
java.sql.SQLException: Io exception: Connection reset by peer: socket write error
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:255)
at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:826)
at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3384)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(Ab stractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.ja va:1808)
at org.hibernate.loader.Loader.doQuery(Loader.java:69 7)
at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:222 8)
at org.hibernate.loader.Loader.listIgnoreQueryCache(L oader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.custom.CustomLoader.list(Cust omLoader.java:312)
at org.hibernate.impl.SessionImpl.listCustomQuery(Ses sionImpl.java:1722)
at org.hibernate.impl.AbstractSessionImpl.list(Abstra ctSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl. java:175)
at com.example.action.EmployeeAction.saveData(Employe eAction.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(D ispatchAction.java:194)
at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:595)
16:23:03,593 WARN JDBCExceptionReporter:100 - SQL Error: 17002, SQLState: null
16:23:03,593 WARN JDBCExceptionReporter:100 - SQL Error: 17002, SQLState: null
16:23:03,593 ERROR JDBCExceptionReporter:101 - Io exception: Connection reset by peer: socket write error
16:23:03,593 ERROR JDBCExceptionReporter:101 - Io exception: Connection reset by peer: socket write error
16:23:03,609 DEBUG ConnectionManager:427 - aggressively releasing JDBC connection
like I am not getting plz plz can any one help me.
Thanks to all..