wood burning stoves*
The moose likes JDBC and the fly likes DB Connection Exception in Multithreaded code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "DB Connection Exception in Multithreaded code" Watch "DB Connection Exception in Multithreaded code" New topic
Author

DB Connection Exception in Multithreaded code

Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi,

There's a multithreaded code that creates N no. of threads, each thread creates a new DB Connection instance to connect to a DB using JDBC. So there are N no. of individual connections to the database created by each thread. In this context find that when one of thread is being created and it tries to get the DB Connection the below Exception is being throwed.

As per the exception, find its relevant to the JDBC URL formation. Please note the method that obtains the DB Connection is a synchronized one.



Would like to know the possible cause for this and the possble solution like implementing colleection pooling would help.

Thanks in advance.

Regards
Roshini
Ammar Shah
Greenhorn

Joined: Jul 15, 2011
Posts: 7
Reasons for "invalid arguments in call" usually are around invalid
configuration (URL, user/pwd).
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi,

Can someone provide me some insight into this issue.

Thanks.
 
 
subject: DB Connection Exception in Multithreaded code