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.
|