File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 3753

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!