Well, the error message says that some array index does not fit into
the array given to this function as a parameter.
As you mentioned that the DB name "db_test" works, I dare to suppose
that the variable you are using to store the DB name is too small;
have you defined it as a StringBuffer of limited size, or anything
similar? Maybe a char array instead of a String? Then make the array
larger.