Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exclusive access could not be obtained because the database is in use.

 
mla mla
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have this err "Exclusive access could not be obtained because the database is in use". I disconnect the first connection and create another database connection but I have this error.

firstly what I disconnect is

static Connection con = null;
static Connection con1 = null;
if (con != null) {
con.close();
}
but I bitterly experiencd the error........
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"mla mla",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that you are closing all connections even in the event of exceptions in the rest of your code? Do others use the same database? It could be something as simple as that others have enough connections that the db's quota is full.

It's hard to tell for sure with the info you've given if your code is at fault or not.
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which database are you using? What are you trying to do that requires exclusive access to the database? Are you changing configuration settings or something?

Jules
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic