This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes NoRouteToHostException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "NoRouteToHostException" Watch "NoRouteToHostException" New topic


jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
Hi Guys :

Any idea what a "NoRouteToHostException" is ? Im just trying
to connect to a mysql database locally.

I have tested another schema, on the same database - and dont get an error.


I have also tested the code that im running before and know that
it works (Im not a jdbc newbie).

any ideas ?

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749

Assuming there database server is up and you have the right port, it might be because of a firewall program.

[OCA 8 Book] [Blog]
George Stoianov
Ranch Hand

Joined: Jan 15, 2006
Posts: 94
Try a simple .

No route to host means that your host name could not be resolved or as already suggested if running and on the right port something is blocking the tcp/ip connection.

If that does not work try

that should take the not resolvable name problem out and if it works put it in your code.
I agree. Here's the link:
subject: NoRouteToHostException
It's not a secret anymore!