You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/08/12 00:56:11 UTC

DO NOT REPLY [Bug 21453] - NullPointerException in DBCP when used for client-server applications

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21453>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21453

NullPointerException  in DBCP when used for client-server applications





------- Additional Comments From dirk.verbeeck@pandora.be  2003-08-11 22:56 -------
Original mail from commons-user list (Vanita Shroff 2003-06-30)
----------------------------------------------------------------
Hello:
I am using DBCP  Jdbc2PoolDataSource and DriverAdapterCPDS for having a pool of
connections for a client-server application (without having an middle layer
application server tier). I am using Sun One Directory Server to bind my
Jdbc2PoolDataSource as a datasource object. I can successfully bind the object.
But from the client machine when I do JNDI lookup as:
Jdbc2PoolDataSource ref = (Jdbc2PoolDataSource)ctx2.lookup(pooldsbindString);

Connection c = ref.getConnection();

I get a nullpointerexception. Any idea what am I doing wrong here? How can I
create a pool of connections on the server and connect it from the client using
JNDI without using an application server tier?

Thanks,

VS