[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3200) Dialect auto-detection provides misleading error message

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Tue Mar 25 12:10:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29877 ] 

Max Rydahl Andersen commented on HHH-3200:
------------------------------------------

wouldn't it not just be better to cahnge the existing exception check to: "Dialect not set nor possible to autodetect from database. Hibernate dialect mut be explicit set" ?

> Dialect auto-detection provides misleading error message
> --------------------------------------------------------
>
>                 Key: HHH-3200
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3200
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.5, 3.2.6
>         Environment: I'm testing with 3.2.5.ga, Windows XP SP2, and SQL Server 2000.  However, I'm fairly certain this will affect any OS/DB combination.
>            Reporter: Gino A Melone
>
> If the DB connection is unable to be created in org.hibernate.cfg.SettingsFactory.buildSettings(Properties props), the error message that is returned indicates "Hibernate Dialect must be explicitly set".  This message is misleading.  The real problem is that auto-detection can not work because the DB connection failed and the metadata could not be retrieved.  A warning is issued that explains this, but production environments often disable log4j warnings for third-party packages to maintain reasonable-sized log files.
> The failure to create a connection should be used to generate a useful error message.  Something like:
> 		//SQL Dialect:
> 		Dialect dialect = determineDialect( props, databaseName, databaseMajorVersion );
> 		settings.setDialect(dialect);
> The relevant log entries are below.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list