-->
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: exception detail discarded in ConnectionProviderFactory
PostPosted: Thu Mar 29, 2007 9:16 am 
Newbie

Joined: Wed Jan 17, 2007 11:58 am
Posts: 6
Hibernate version: 3.2

I am reporting what I am fairly sure is a bug in the source for ConnectionProviderFactory, in that in one location exception chaining is not being used. This meant that when an exception was thrown due to configuration issues (of my making) it was much harder than it should have been to find the root cause.

The relevant code is on lines 75-79 of ConnectionProviderFactory, namely

catch (Exception e) {
log.fatal("Could not instantiate connection provider", e);
throw new HibernateException("Could not instantiate connection provider: "
+ providerClass);
}

The problem is that when the HibernateException is created the caught
exception is not chained. This meant I did not see the underlying cause of
the exception (an SQL exception from Oracle) and had to get the source and use the debugger to track down my configuration mistake.

IMHO it would be better if all exceptions were chained. I appreciate this single case may be an oversight.


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.