I've had to use a custom build of DBCP as well to get around this related
issue which only happened for Oracle and exhausted the pool over time:
http://issues.apache.org/jira/browse/DBCP-28. I ran into it months before
the fix was even committed to the DBCP trunk, even though the fix was
already proposed in JIRA. The fixed build worked well, but I would not
choose DBCP again if I had the choice. I would try C3P0, which supposedly is
much better at running in a multi-threaded environment (DBCP is known for
slowdowns and even deadlocks because of synchronization issues) and
recovering from outages. It's also the default connection pool for Hibernate
and I assume that they would know which is best ;)

An alternative to switching might be to create a custom build based on DBCP
1.2.2.

Regards,

Wouter

On Tue, Apr 21, 2009 at 4:31 PM, Reinier van den Born <
[email protected]> wrote:

> Hello Elvin,
>
> Thanks for your reply.
>
> I did a bit of investigation and found that throwing an Exception when
> closing an already closed connection is actually considered a bug. And that
> it has been fixed for dbcp/PoolableConnection, see discussion at:
>        http://issues.apache.org/jira/browse/DBCP-3
>
> But the fix, in commons-dbpc.jar, is unfortunately not available off the
> shelf.
>
> The version of commons-dbcp used by the editor (v6.5.*) is 1.2.1 which is
> from 2004
> The latest official version of the library is 1.2.2, which is from April
> 2007.
> Although the discussion started in 2006, the fix was only put in July 2007.
> So it is not in any official release.
> The fix was intended for a version 1.3 (see discussion), but that one
> hasn't seen the light yet.
> But there are nightly builds from August 2007, see
>
> http://people.apache.org/builds/jakarta-commons/nightly/commons-dbcp/
> that contain the fix.
>
> According to the SVN log, a couple of files were modified for this issue
> (rev 557176), including some tests.
>        http://svn.apache.org/repos/asf/commons/proper/dbcp/
>
> So far the information I found. I'm not decided what to do yet.
>
> Reinier
>
>
>
>
>
> Elvin Priyadi wrote:
>
>> Hi Reinier,
>>
>> I have seen the same error occurs in CMS 6, and after some time, it
>> actually
>> works again.
>>
>> I have some theories regarding the error, but have not manage to actually
>> find the error and the fix. The db connection was the first theory. I
>> would
>> suggest you check yours, and see if there are any disconnected session, db
>> update or db restart.
>>
>> If there are no disconnected session, another theory is, it might be the
>> SQL
>> connection time out expires faster than the quartz job scheduler time out.
>> I
>> haven't check this one out, but it may give you some ideas.
>>
>>
>> Good luck,
>>
>> elvin
>>
>>
>> On Tue, Apr 21, 2009 at 10:06 AM, Reinier van den Born <
>> [email protected]> wrote:
>>
>>  Hi
>>>
>>> I have a problem with CMS 6.5.3 used with a SqlServer database (on
>>> separate
>>> server). Not a big one, just annoying.
>>> The CMS is running fine, except that once in a while, after a long while
>>> of
>>> no use, it appears to hang.
>>> In log4j.log I find SQLexceptions with "Already closed" messages. See
>>> excerpt below.
>>> Seems a problem interacting with SQLserver or maybe a network thing?
>>>
>>> Before I dig into this: anyone seen this before, solutions, suggestions?
>>>
>>>
>>> Thanks, Reinier
>>>
>>>
>>> Log4j.log:
>>> 2009-04-21 05:17:15,621 ERROR org.quartz.impl.jdbcjobstore.JobStoreTX
>>>  ClusterManager: Error managing cluster: Couldn't close jdbc connection.
>>> Already closed.
>>> org.quartz.JobPersistenceException: Couldn't close jdbc connection.
>>> Already
>>> closed. [See nested exception: java.sql.SQLException: Already closed.]
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport.closeConnection(JobStoreSupport.java:2299)
>>>       at
>>> org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1413)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2378)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2409)
>>> * Nested Exception (Underlying Cause) ---------------
>>> java.sql.SQLException: Already closed.
>>>       at
>>>
>>> org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:77)
>>>       at
>>>
>>> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport.closeConnection(JobStoreSupport.java:2297)
>>>       at
>>> org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1413)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2378)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2409)
>>> 2009-04-21 05:17:29,681 ERROR org.quartz.core.ErrorLogger              An
>>> error occured while scanning for the next trigger to fire.
>>> org.quartz.JobPersistenceException: Couldn't close jdbc connection.
>>> Already
>>> closed. [See nested exception: java.sql.SQLException: Already closed.]
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport.closeConnection(JobStoreSupport.java:2299)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreTX.acquireNextTrigger(JobStoreTX.java:1228)
>>>       at
>>> org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:233)
>>> * Nested Exception (Underlying Cause) ---------------
>>> java.sql.SQLException: Already closed.
>>>       at
>>>
>>> org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:77)
>>>       at
>>>
>>> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)
>>>       ...
>>> ....
>>> 2009-04-21 05:17:56,195 ERROR org.quartz.impl.jdbcjobstore.JobStoreTX
>>>  ClusterManager: Error managing cluster: Couldn't close jdbc connection.
>>> Already closed.
>>> org.quartz.JobPersistenceException: Couldn't close jdbc connection.
>>> Already
>>> closed. [See nested exception: java.sql.SQLException: Already closed.]
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport.closeConnection(JobStoreSupport.java:2299)
>>>       at
>>> org.quartz.impl.jdbcjobstore.JobStoreTX.doCheckin(JobStoreTX.java:1413)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:2378)
>>>       at
>>>
>>> org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:2409)
>>> * Nested Exception (Underlying Cause) ---------------
>>> java.sql.SQLException: Already closed.
>>>       at
>>>
>>> org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:77)
>>>       at
>>>
>>> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:180)
>>>       ...
>>> ....
>>> etc
>>>
>>>
>>>
>>> --
>>>
>>> Reinier van den Born
>>> HintTech B.V.
>>>
>>> T: +31(0)15 268 2573
>>> F: +31(0)15 268 2567
>>> M: +31(0)6 494 171 36
>>>
>>> ATTENTION: WE HAVE MOVED!!
>>> Delftechpark 37i | 2628 XH Delft | www.hinttech.com
>>>
>>> HintTech is a specialist in eBusiness Technology ( .Net, Java platform,
>>> Tridion ) and IT-Projects.
>>> Chamber of Commerce The Hague nr. 27242282 | Sales Tax nr.
>>> NL8062.16.396.B01
>>>
>>>
>>> ********************************************
>>> Hippocms-dev: Hippo CMS development public mailinglist
>>>
>>> Searchable archives can be found at:
>>> MarkMail: http://hippocms-dev.markmail.org
>>> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>>>
>>>
>>>
>>>
>>
>>
> --
>
> Reinier van den Born
> HintTech B.V.
>
> T: +31(0)15 268 2573
> F: +31(0)15 268 2567
> M: +31(0)6 494 171 36
>
> ATTENTION: WE HAVE MOVED!!
> Delftechpark 37i | 2628 XH Delft | www.hinttech.com
>
> HintTech is a specialist in eBusiness Technology ( .Net, Java platform,
> Tridion ) and IT-Projects.
> Chamber of Commerce The Hague nr. 27242282 | Sales Tax nr.
> NL8062.16.396.B01
>
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
> Searchable archives can be found at:
> MarkMail: http://hippocms-dev.markmail.org
> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>
>
>


-- 
Met vriendelijke groet,

Wouter Zelle
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html

Reply via email to