I hava some code to access database (DBConector.java)
I use Mysql and the table structure in db_simaba.sql
file. if run that code i have some error like ;
java.sql.SQLException: Unable to connect to any hosts
due to exception:
java.lang.ArrayIndexOutOfBoundsException: 42
at
com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
at
com.mysql.jdbc.Connection.<init>(Connection.java:562)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361)
at java.sql.DriverManager.getConnection(Unknown
Source)
at java.sql.DriverManager.getConnection(Unknown
Source)
at
hen.tools.DBConector.getConnection(DBConector.java:34)
at
hen.tools.DBConector.getInstance(DBConector.java:25)
at hen.tools.DBConector.main(DBConector.java:56)
------
But if the data base name is change for example
'db_test', the code run well....
what wrong any body know...?