Solved

I am getting this error suddenly.Till now the application was working fine from sterday i am getting this error java.sql.SQLException: Closed Connection

Posted on 2006-10-31
5
320 Views
Last Modified: 2008-02-01
Hi ,

  I was testing my application in the cluster environment and it was working fine for 1 hr and suddenly i got the following error please help me out

2006-10-30 20:25:51,927 ERROR [com.carrier.arm.common.utils.JDBCUtil] Closed Connection
com.carrier.arm.common.exceptions.ARMException: java.sql.SQLException: Closed Connection
      at com.carrier.arm.common.utils.JDBCUtil.getPreparedStatement(JDBCUtil.java:560)
      at com.carrier.arm.common.utils.JDBCUtil.executeQuery(JDBCUtil.java:695)
      at com.carrier.arm.common.utils.JDBCUtil.executeQuery(JDBCUtil.java:668)
      at com.carrier.arm.integration.dataaccess.common.MasterDAO.getUserContext(MasterDAO.java:100)
      at com.carrier.arm.business.common.ejb.MasterSBean.getUserContext(MasterSBean.java:88)
      at com.carrier.arm.business.common.ejb.MasterSBean_k8fmao_EOImpl.getUserContext(MasterSBean_k8fmao_EOImpl.java:260)
      at com.carrier.arm.business.sessionfacade.MasterSFacade.getUserContext(MasterSFacade.java:390)
      at com.carrier.arm.business.sessionfacade.MasterSFacade_xj4o2o_EOImpl.getUserContext(MasterSFacade_xj4o2o_EOImpl.java:424)
      at com.carrier.arm.client.bd.MasterBD.getUserContext(MasterBD.java:315)
      at com.carrier.arm.client.web.actions.LoginAction.armexecute(LoginAction.java:405)
      at com.carrier.arm.client.web.actions.ARMBaseAction.execute(ARMBaseAction.java:100)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
      at com.carrier.arm.client.web.actions.common.filterAction.doFilter(filterAction.java:63)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
      at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Caused by: java.sql.SQLException: Closed Connection
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
      at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:735)
      at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:652)
      at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:1206)
      at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:994)
      at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:933)
      at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:359)
      at com.carrier.arm.common.utils.JDBCUtil.getPreparedStatement(JDBCUtil.java:553)
      ... 29 more


Thanks
0
Comment
Question by:gocoool
  • 2
  • 2
5 Comments
 
LVL 24

Accepted Solution

by:
sciuriware earned 250 total points
ID: 17842132
Is your server still up and running?
Then is the server process on the server still running?

If possible you might reboot the server machine.

..... unless it's just a loose cable ......

;JOOP!
0
 
LVL 9

Expert Comment

by:owenli27
ID: 17842411
- Check your database server to see if any problems happened

- Exception thrown from JDBCUtil.java Line 560; There is a line code, something like  conn.prepareStatement()
The DB connection also could be closed by code in some line. So, you can add a couple of line code before it
if (conn == null || conn.isClosed())
    conn = JDBCUtil.getConnection....to reconnect database.
0
 
LVL 9

Assisted Solution

by:owenli27
owenli27 earned 250 total points
ID: 17842620
Also, DB connection could be dropped by timeout
0
 

Author Comment

by:gocoool
ID: 17845796
Thanks a lot guys...

  I restarted the server and it is working fine till now.. I also think tht it may be dropped out by the timeout....But when i restarted the server it worked fine...


Thanks

0
 
LVL 24

Expert Comment

by:sciuriware
ID: 17847762
:)
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question