mysql jdbc got ArrayIndexOutOfBoundsException when database name length = 9
- by Thang Hoang
this code below will throw :
Exception in thread "main" java.sql.SQLException: Unable to connect to any hosts due to exception: java.lang.ArrayIndexOutOfBoundsException: 40
mysql 5.1, jdbc driver 5.1.21
if I change connection string to any database have name's lengh != 9, it will pass to print 'connected'. or I create other database as…