02 Nov 2004 19:27:07 - org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter - WARNING - java.sql.SQLException: Already closed java.sql.SQLException: Already closed at org.apache.commons.dbcp.PoolablePreparedStatement.close(PoolablePreparedStateme nt.java:75) at org.apache.commons.dbcp.DelegatingStatement.close(DelegatingStatement.java:165) at org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.close(Unknown Source) at org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.retrieveRevisionContent( Unknown Source) at org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.retrieveRevisionContent(Un known Source) at org.apache.slide.store.AbstractStore.retrieveRevisionContent(Unknown Source) at org.apache.slide.store.ExtendedStore.retrieveRevisionContent(Unknown Source) at org.apache.slide.content.ContentImpl.retrieve(Unknown Source) at org.apache.slide.content.ContentImpl.retrieve(Unknown Source) at org.apache.slide.webdav.method.GetMethod.executeRequest(Unknown Source) at org.apache.slide.webdav.method.AbstractWebdavMethod.run(Unknown Source) at org.apache.slide.webdav.WebdavServlet.service(Unknown Source)
Created attachment 13324 [details] Patch to fix; ensures we close connection after statement when compression is enabled, and sets statement to null in close to ensure we don't use a statement that's been previously closed.
Happens if you've got compression enabled, as we close the temporary connection and then close the statement afterwards. Users of DBCP pooling will probably, like me, receive the error below, when the prepared statement was closed in the background by the closing of the connection. Changing the order cleans up the problem.
No reason for this exception not to get fixed, folks. :) Set compression = true on the database, where DBCP connection pooling is provided by JNDI name lookup configuration for that connection, and dbcp is configured to pool prepared statements, and you're buggered. The patch works. It's safe. All you have to do is close the result set before closing the connection, and bob's your uncle. Please make sure it gets into the codebase before release, so I don't have to keep building top-of-tree once 2.1 is released.
Patch applied to both release and head branch
Oh, and by the way, this issue certainly wasn't a major one. I beware of the inflationary use of severity levels. Thanks :)
Thanks. :) Without the fix, my logs drive will fill, and be full of things that aren't as interesting as I'd like them to be, so it's important to me. :) Closing.