Here is the error.
Error in CrsHierarchyHandler.javajava.sql.SQLException: Connection has already been closed.
java.sql.SQLException: Connection has already been closed.
at weblogic.jdbc.pool.Connection.checkIfClosed(Connection.java:62)
at weblogic.jdbc.pool.ResultSet.next(ResultSet.java:198)
at com.crs.action.CrsHierarchyHandler.execute(CrsHierarchyHandler.java:149)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:288)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:212)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2765)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2433)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:172)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:145)
CrsHierarchyHandler.java:149 points to this in the code:
rSet = dbCon.exeQRY(sqlStr);
Line 149:while (rSet.next()) {
hierarchyChunk = hierarchyChunk
+ (rSet.getString("location"));
hierarchyChunk = hierarchyChunk + "|"
+ (rSet.getString("location")) + "||";
}
This is inside a try block with a finally like:
finally {
try {
dbCon.closeConnection();
dbCon = null;
} catch (Exception ex) {
System.out.println(" Inside 2" + ex.toString());
forwardPage = "failure";
ex.printStackTrace();
}
}
This happened in the very first page on the application, so cannot be from anywhere else in the code. Its only happening when there is more than 1 user. Never happened for 1 user while
testing.
Any suggestions?
[ June 08, 2006: Message edited by: Piyush Jain ]