[hibernate-issues] [Hibernate-JIRA] Commented: (HB-1363) Remove log from LazyInitializationException constructor

Chris Lee (JIRA) noreply at atlassian.com
Thu Jan 11 10:30:47 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HB-1363?page=comments#action_25782 ] 

Chris Lee commented on HB-1363:
-------------------------------


Please remove this error from the exception constructor; it should be up to the developer to control if/when/where they want to log exceptions (i.e. it should not be forced on them).

In our case, we have a diagnostics filter that outputs web request and session attributes - this filter is run *after* an open session in view filter, ergo we are expecting LazyInitializationExceptions (which are ignored) - except that our logs are polluted with useless log messages.

While we could reconfigure log4j for this, it seems silly to do supress something that shouldn't be output in the first place.

> Remove log from LazyInitializationException constructor
> -------------------------------------------------------
>
>          Key: HB-1363
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1363
>      Project: Hibernate2
>         Type: Bug

>     Versions: 3.0 beta 1, 2.1.7, 2.1.8
>     Reporter: Maarten Winkels

>
> Original Estimate: 5 minutes
>         Remaining: 5 minutes
>
> In the LazyInitializationException constructor, the message is appended to the error log. The exception should be logged when caught, not when created.

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