-->
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.  [ 2 posts ] 
Author Message
 Post subject: java.net.NoRouteToHostException: No route to host
PostPosted: Fri Nov 24, 2006 12:18 pm 
Newbie

Joined: Fri Nov 24, 2006 12:12 pm
Posts: 1
Hi all,

I would like to test database connections. So, in hibernate configuration file, i changed the database url. I can see this exception in hibernate logs. I would like to know how can I force this exception or HibernateException to be thrown because I have insert the code

sessionFactory = cfg.buildSessionFactory();

between a try/catch block and there isn't any exception being thrown.


Regards


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 8:18 am 
Senior
Senior

Joined: Mon Oct 23, 2006 5:12 am
Posts: 141
Location: Galicia, Spain
The code that will throw the exception is, for example, something like:

session.beginTransaction();

Before that (sessionFactory = cfg.buildSessionFactory(); , for example) no connection is made to the DB.

_________________
andresgr (--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.  [ 2 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.