-->
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: Memory leak problems
PostPosted: Mon Nov 29, 2010 11:48 am 
Newbie

Joined: Mon Nov 29, 2010 11:43 am
Posts: 2
Hi,
I'm having memory leak problems in my jEE application running on jboss-4.0.3SP1 using hibernate 3.6.

It seems to overtime more and more hash entities and string are created and stored in entityPersisters and collectionPersisters which are in org.hibernate.impl.SessionFactoryImpl.

The strings seem to be sql statements (probably generated by hibernate by the look of them).

Can someone tell me what could be the reason for this?


Top
 Profile  
 
 Post subject: Re: Memory leak problems
PostPosted: Thu Dec 02, 2010 5:19 am 
Newbie

Joined: Mon Nov 29, 2010 11:43 am
Posts: 2
Ok,
I know know the memory leak isnt because of the org.hibernate.impl.SessionFactoryImpl.

When hibernate run hql statements for some reason it tries to load a class for every where statement , and that class gets into jboss class loader black list (that has no limit for some reason).

Example:

int userId = 4;
String hql = "select from user where user.id = " + userId + " and user.type = 'admin'";

When hibernate will run this hql, it will try to load these classes and will fail (it is caught internally and handled, happens in WhereParser.doToken(line 412)) "4.class", "'admin'.class" and "and.class".
This will lead for jboss to black list these classes (in a hashSet).

This process leads over time to a big memory leak.

Is there a way to make hibernate stop doing this class loading?

thanks,
Ran.


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.