Issue Type: Bug Bug
Affects Versions: 4.1.8
Assignee: Unassigned
Components: core
Created: 11/Dec/12 7:38 AM
Description:

By default, JdbcServicesImpl will try to get a connection to the database to retrieve the metadata used to configure/determine the Dialect.

It may happen the JdbcServicesImpl gets a connection from the underlying provider but gets an exception when trying to use it. For instance, the connection may be obtained from a pool that doesn't validate the connection state properly...

If that happens, Hibernate logs a message saying "Could not obtain connection metadata" but will not revert to the default strategy it would have followed if no connection was available at the first place.

This leads to a NullPointerException being thrown a bit later when the dialect member field is accessed...

The point here is the JdbcServicesImpl should probably be safer when reading metadata and treat any connection-related errors as-if it never got a connection at all.

Project: Hibernate ORM
Priority: Major Major
Reporter: Bertrand Renuart
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira