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
324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

734 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