[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5770) Memory leak when using hibernate 3.6 and jboss-4.0.3SP1

ran haim (JIRA) noreply at atlassian.com
Thu Dec 2 09:34:13 EST 2010


Memory leak when using hibernate 3.6 and  jboss-4.0.3SP1
--------------------------------------------------------

                 Key: HHH-5770
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5770
             Project: Hibernate Core
          Issue Type: Bug
    Affects Versions: 3.6.0
         Environment: hibernate 3.6, mysql server 5.0 and  jboss-4.0.3SP1
            Reporter: ran haim


When hibernate runs hql statements for some reason it tries to load a class for every where statement token, and that class gets into jboss class loader black list and resource 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.


I also think this still happens in newer jboss versions.

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