the info is not sufficient to rectify. Looking at code(the jdbc ones) it seems more like a driver issue. But before proceeding further, i think you should first go thru the basics of jdbc and the types of drivers available with databases.
I'll just give you intro with the 4 types of drivers ->
1. JDBC ODBC driver - this is the driver you have used in your program. This driver converts the jdbc calls into odbc acting as a bridge. So make sure have configured the odbc correctly. eg if you are using oracle as db so you have to configure the odbc for oracle. (for more reference, google

)
2. Native-API partly Java technology-enabled driver - in this the java converts the jdbc calls into db api calls.
3. Net-protocol fully Java technology-enabled driver - in this JDBC API calls is translated into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server
4. Native-protocol fully Java technology-enabled driver - converts JDBC technology calls into the network protocol used by DBMSs directly. This is a pure java based driver !
The above was just informative, don't need to think deep into it. It won't harm to know.
So the take-away is that your code is using the driver of type 1 so first you must check the configuration for Db specific odbc configuration.