commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trenton D. Adams" <>
Subject Re: failed to find abandoned connection
Date Wed, 30 Mar 2005 22:37:59 GMT
Ok, I'm a total moron.  I was using 
Boolean.getBoolean(dbProperties.getString("removeAbandoned")) instead of 

I remember doing that code.  And I was thinking to myself, "I don't 
remember the Boolean object ever having a static method that would 
return a primitive type of boolean, that's really odd.  Well, I guess if 
it's there, I might as well use it."

As I'm sure many of you know, most of the primitive data type wrappers, 
such as Integer and Double have a static parse function, which directly 
returns the primitive data type you want, and Boolean does not.

So, the first line of code above was actually returning the system 
property, not the property from the file.

ahhhhhhhhhhhhhhh!!! ROFL

Trenton D. Adams wrote:
> dbcp was unable to find our abandoned connections.  The pool slowly 
> creeped up to the limit, and then just started failing, instead of 
> cleaning up the connections.  I do know that my settings work, because I 
> made some of our code not release connections back to the pool, and it 
> detected them.  So, why it couldn't find the ones we have in production, 
> I don't know.
> What makes a connection look like it's been abandoned to the dbcp code?
> Any ideas?  I'm getting an exception like this...
> Mar 22 14:53:19 MST 2005: Error: attempting to get a free connection.
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, 
> pool exhausted
>         at 
> org.apache.commons.dbcp.PoolingDriver.connect(
>         at java.sql.DriverManager.getConnection(
>         at java.sql.DriverManager.getConnection(
>         at ca.montage.banner.db.DBCPPool.getConnection(
>         at 
> ca.montage.banner.db.DBConnectionManager.getConnection(

>         at 
> ca.montage.banner.server.RemoteCatalog.getSubjectList( 
>         at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(

>         at java.lang.reflect.Method.invoke(
>         at 
> sun.rmi.server.UnicastServerRef.dispatch(
>         at sun.rmi.transport.Transport$
>         at Method)
>         at sun.rmi.transport.Transport.serviceCall(
>         at 
> sun.rmi.transport.tcp.TCPTransport.handleMessages(
>         at 
> sun.rmi.transport.tcp.TCPTransport$ 
>         at
> Caused by: java.util.NoSuchElementException
>         at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(

>         at 
> org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(

>         at 
> org.apache.commons.dbcp.PoolingDriver.connect(
>         ... 15 more

Trenton D. Adams
Web Programmer Analyst
Navy Penguins at your service!
Athabasca University
(780) 675-6195

    This communication is intended for the use of the recipient to whom it
    is addressed, and may contain confidential, personal, and or privileged
    information. Please contact us immediately if you are not the intended
    recipient of this communication, and do not copy, distribute, or take
    action relying on it. Any communications received in error, or
    subsequent reply, should be deleted or destroyed.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message