-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Connecting to remote database using Hibernate Tools
PostPosted: Mon Dec 15, 2008 2:39 pm 
Newbie

Joined: Mon Dec 15, 2008 2:28 pm
Posts: 8
I'm using Hibernate 3 with Eclipse 3.4.1 and JBoss Tools 3.0.0

I'm connecting to a local MySQL database using the following URL:
jdbc:mysql://localhost:3306/TEST

The above works, and I can use HQL editor and execute queries etc.

However when I change the URL to point to a remote database server, I get a JDBC exception when I try to expand the Database node in Hibernate Tools Configuration window. The exception is :

Quote:
Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Network is unreachable: connect

STACKTRACE:

java.net.SocketException: Network is unreachable: connect


When I revert to using localhost (after shutting down my locally running MySQL) and use SSH tunneling, it once again works.

Is there some configuration that I need to put either in Hibernate Tools or Eclipse in order for it to be able to reach the remote database server?

In Eclipse, I checked Windows->Preferences->General->Network Connections and it's set to "Direct connection to the Internet" which is correct for my configuration.

Thanks![/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2008 12:24 pm 
Newbie

Joined: Mon Dec 15, 2008 2:28 pm
Posts: 8
Turns out, when I was at my work location where the problem was occurring, I had my Firewall s/w shutdown.

When I turned it back on, Eclipse was able to access the remote databases just fine.

So a configuration problem on my end, nothing to do with either Eclipse or Hibernate Tools.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 24, 2008 3:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yeah, firewalls can be annoying sometimes ;)

Thanks for letting us know what caused it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.