0 Replies Latest reply on Apr 4, 2014 3:49 AM by Gaurav Parmar

    Issue with Hibernate Native queries in JBoss

    Gaurav Parmar Newbie

      Hi all,


             I am a new user of JBoss application servers.


            We have Java portal application. We use Hibernate as ORM tool for that. 


            Recently we have been observing lot of memory leaks. Perm Gen would fill up and the application would die.


            After few weeks of research and fixing the code we were able to fix 70% of memory leaks.


            For the remaining 30%, after lot of trial and error we figured out that only when we execute native queries in hibernate on JBoss server we faced this issue. When I run my application on TomCat I don't see any issue.


            Here is the relevant code which is creating this issue

      SQLQuery sqlQuery = session.createSQLQuery(query);


      aliasToValueMapList = sqlQuery.list();


      I found that there was such issue some time back in Jboss but it appears to be fixed



      The relevant versions are as follows

      Hibernate -  4.2.0.Final

      Jboss - 6.1.0.GA

      Jdk - 1.6.0_24