[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2233?page=all ]
Max Rydahl Andersen closed HHH-2233:
------------------------------------
Resolution: Rejected
noncompletion of sf startup with respect to the db connection should prevent the building
of the session factory. The connection is only used to gather (optional) information about
the capabilities of the db/driver and/or run schemaupdate/export which might fail for
reasons (more often than not) that shouldn't stop the startup of the db.
if you want shcemaupdate/export to fail hardly when any failure occour run them
seperatly.
Rethrow HibernateException instead of "catch and log only"
SQLException.
------------------------------------------------------------------------
Key: HHH-2233
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2233
Project: Hibernate3
Type: Improvement
Components: core
Versions: 3.2.0.ga
Environment: Hibernate v 3.2.0, October 16, 2006,
HSQLDB 1.8.0.7 (Using In-process mode)
Reporter: Mark Gorokhov
Steps to reproduce:
AnnotationConfiguration ac = new AnnotationConfiguration();
ac.addAnnotatedClass(Foo.class); // with annotations
ac.setProperty(Environment.URL, "jdbc:hsqldb:file:C:\\abc\\dbTest");
ac.setProperty(Environment.DRIVER, "org.hsqldb.jdbcDriver");
ac.setProperty(Environment.USER, "wrong_user"); // note: not "sa"
user
ac.setProperty(Environment.PASS, "bad");
ac.setProperty(Environment.DIALECT, "org.hibernate.dialect.HSQLDialect");
ac.setProperty(Environment.CACHE_PROVIDER,"org.hibernate.cache.NoCacheProvider");
ac.setProperty(Environment.HBM2DDL_AUTO, "update"); // creates missing DB
SessionFactory sessionFactory = ac.buildSessionFactory();
There are *logged* SQLExceptions "User not found" but ac.buildSessionFactory()
does not *throw* any exceptions. SessionFactory is not functional but there are no
exceptions thrown!
Probably there are other places in the code when exception is logged but not rethrown.
Exception in a log is useless because client code does not know about exception and does
not report problem to a user and does not make attempts to recover.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira