Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
327 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 1000 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 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

877 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