commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Cryder <>
Subject DBCP - Socket Exceptions
Date Wed, 18 Jan 2006 21:10:09 GMT
Hi guys,

I have searched through recent archives and haven't seen anything about
this, so if I'm just not looking in the right place, please feel free to
point me in the right direction.

I am trying to wrap NetDirect's JSQLConnect driver in DBCP (because
NetDirect seems to have a problem in their own connection pooler).

So I am setting up the data source like this:

    <object name="$ds" class="org.apache.commons.dbcp.BasicDataSource">
        <method name="setDriverClassName">com.jnetdirect.jsql.JSQLDriver
        <method name="setUrl">jdbc:

This is how we use DBCP for Postgres drivers, and it seems to work fine
there (in all cases). It seems to work ok, here, at least for individual
junit test cases. The problem is, about half way through our test cases, we
start getting failures like this:

DBComms.transmit exception:[ Connection reset by
> peer: socket write error] context:[(2) [Thread[main,5,main], IO:21e9e,
> Dbc:4997]]]
> com.jnetdirect.jsql.v: DBComms.transmit exception:[
> Connection reset by peer: socket write error]
> context:[(2) [Thread[main,5,main], IO:21e9e, Dbc:4997]]]
> at com.jnetdirect.jsql.v.a(Unknown Source)
> at com.jnetdirect.jsql.h.a(Unknown Source)
> at com.jnetdirect.jsql.av.a(Unknown Source)
> at Source)
> at Source)
> at com.jnetdirect.jsql.ap.executeQuery(Unknown Source)
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
> at
> com.atmr.kilimanjaro.core.sql.jdbc.PreparedStatementWrapper.executeQuery(
> at com.atmr.kilimanjaro.testbed.SQLValidator.validateSQLQuery(
> at com.atmr.kilimanjaro.testbed.DefaultTestCase.validateSQLQuery(
> at
> com.atmr.kilimanjaro.core.sql.samples.sql.TestBinary99SQL.testBinary99SQL(
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(

My guess is that the underlying NetDirect driver might be closing something
when it shouldn't, or something like that. But the test cases work fine when
run individually (even those test cases that use many connections).

I am hoping that there might be some configuration option that would make
things work better. I have tried playing w/ the settings I've found here (like initialSize,
maxActive, maxIdle, etc), but none of them seem to make any difference.

Does anyone have any suggestions?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message