[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2684) SFI.checkNamedQueries() does not catch all Exceptions

Chris Bredesen (JIRA) noreply at atlassian.com
Mon Jun 25 11:16:53 EDT 2007


SFI.checkNamedQueries() does not catch all Exceptions
-----------------------------------------------------

                 Key: HHH-2684
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2684
             Project: Hibernate3
          Issue Type: Bug
          Components: core
            Reporter: Chris Bredesen
            Priority: Minor


SessionFactoryImpl catches only MappingException and QueryException, thus other exceptions slip through and bypass the useful error logging provided by the method.  We should be catching Throwable.

This manifests itself in both Hibernate and JBAS EJB3.  The user will see a stack trace instead of an ERROR log line naming the problematic query.  This makes diagnosing errant named queries difficult.

The workaround is to set org.hibernate.impl.SessionFactoryImpl to DEBUG which will list each named query before it is processed.

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