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.  [ 1 post ] 
Author Message
 Post subject: Hibernate masks connection failure
PostPosted: Wed Sep 28, 2011 5:31 am 
Newbie

Joined: Tue Jul 05, 2011 6:10 am
Posts: 4
Hi,

When I try to establish a connection with invalid details such as incorrect username, incorrect password, incorrect database name etc. Hibernate catches whatever the exception may be such as SQLException and logs it and does not pass on the exception. Specifically line 140 of SettingsFactory.java in Hibernate 3.6.7 shows this behaviour.

I've previously spent a lot of time googling to find a solution and found some discussions of configuring c3p0, however now that I've actually looked at the Hibernate code I can see why I had no chance of getting this to work.

My application requires users to enter their credentials and database connection details, as such it is necessary to provide detailed feedback but I can't see how to do this.

Can anyone make some suggestions on how I extract the reason for failure?

Thanks

Lionel


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

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.