Details
-
Bug
-
Resolution: Done
-
Major
-
WCM 4.0
-
None
-
Operating System: All
Platform: All
Description
In Jahia's core code, as well as the Time reporting application, and probably
other locations, JDBC ResultSet objects aren't closed after use. Since a
connection pool is used, the connections don't get closed quickly, so the number
of open resultsets grows and grows. In Oracle, this translates directly into
open cursors, and open cursors are a limited resource in Oracle. So after a
not-too-long while, errors like these bring down Jahia:
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:120)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:586)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:385)
at
oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:772)
at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:712)
at com.mycomponents.webapps.timereporting.DBServices.executeQuery(DBServices.java:71)
at
com.mycomponents.webapps.timereporting.DBServices.createProject(DBServices.java:893)
at
com.mycomponents.webapps.timereporting.TimeReportingServlet.doPost(TimeReportingServlet.java:284)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
I believe that fixing this requires a complete audit of the Jahia code to find
all occurrences of unclosed resultsets. A workaround is to disable the
connection pool, so that connections are closed immediately. This makes Jahia
much slower.