-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: disable logging LazyInitializationException
PostPosted: Tue Oct 09, 2007 6:57 am 
Newbie

Joined: Tue Dec 12, 2006 9:07 am
Posts: 13
We have a multi-tiered application with as many as 750 and odd tables mapped using hibernate. In one of the layers, we require the domain objects mapped using hibernate, to be converted to value objects as the usage of these value objects is totally different. (This is an architecture decision and nothing much can be done to change this).

Keeping the volume of conversion code to be written in mind, a program was written to automatically convert the DO-VO and VO-DO using reflection. As expected the logs are full of LazyInitializationException. This becomes a problem as it is difficult to debug as the logs are filled with these exceptions.

We explored checking every object with Hibernate.initialize() before converting, but this is still not helpful in case of proxy objects where only the primary keys are populated and other properties are not initialized. So this still results in LazyInitializationException.

Modifying hibernate source code and removing the logging statement seems to be the only option.

Are there any more options I can try, before changing the source code?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 09, 2007 11:13 am 
Regular
Regular

Joined: Tue Feb 24, 2004 11:42 am
Posts: 56
Obviously the session is being closed so look at opensessionview .
please do rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.