-->
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.  [ 6 posts ] 
Author Message
 Post subject: Memory/Heap Exception
PostPosted: Mon Apr 02, 2007 12:47 pm 
Newbie

Joined: Thu Mar 29, 2007 10:26 am
Posts: 9
Hibernate version: 3.2.0.ga (via spring)
Name and version of the database you are using:MySQL 5.0

Hello,
I am trying to determine why the hibernate application i am using keeps getting heap space errors. I have used a mmeory profiling tool to tack down what is happening and the org.hibernate.persister.entity.SingleTableEntityPersister class seems to be the one that is taking up all the memory - seems the heap will just keep growing. I have disabled first and second level cache - and have tried using a Stateless Session for my objects but to no avail.

Code:
   <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
   <property name="hibernate.c3p0.max_size">80</property>
   <property name="hibernate.c3p0.min_size">20</property>
   <property name="hibernate.c3p0.initial_pool_size">8</property>
   <property name="hibernate.c3p0.min_pool_size">5</property>
   <property name="hibernate.c3p0.max_pool_size">15</property>
   <property name="hibernate.c3p0.timeout">1800</property>
   <property name="hibernate.c3p0.max_statements">15</property>
   <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
      <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
   <property name="hibernate.cache.use_query_cache">false</property>
   <!-- KEPT GETTING ERRORS BECAUSE SPRING CLOSES SESSION
   <property name="hibernate.transaction.auto_close_session">true</property> 
   END ADD -->
   <property name="hibernate.cache.use_second_level_cache">false</property> <!--  fails when enabled. bwilly Aug06 -->
   <property name="current_session_context_class">thread</property>



CODE SAMPLE:

Code:
org.hibernate.impl.StatelessSessionImpl sess = (org.hibernate.impl.StatelessSessionImpl)this.getSessionFactory().openStatelessSession();
Criteria c = sess.createCriteria(ProjectImpl.class);


blah, blah....


Code:
Transaction tr    = sess.beginTransaction();
List list    = sess.list((CriteriaImpl)c);
tr.commit();
//this.getHibernateTemplate().getSessionFactory().evictQueries();
sess.close();
return list;



If i am disabling first and second level caches AND using a stateles session how is possible the application is retqainging these values in memory?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 02, 2007 6:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Try the lastest 3.2.3 ga release. Over the last few versions there have beena few Proxy leaks fixed.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 9:42 am 
Newbie

Joined: Thu Mar 29, 2007 10:26 am
Posts: 9
Thank you for the suggestion - i notice that the version for download currently only goes up to 3.2.2? Do you know where i could get that? Are you referring to one of the other downloads then the core package?
I updated to the 3.2.2 core and 3.3.1 for annotations - but still get heap space exception.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 6:52 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
There is an announcement on the front page of the web site for 3.2.3 with a link to SF download.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 9:27 pm 
Newbie

Joined: Thu Mar 29, 2007 10:26 am
Posts: 9
duh...

You know i did a search on google when i could not find it on hibernate.org. They must not have indexed it yet. Thanks again.

duh...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 04, 2007 2:48 pm 
Newbie

Joined: Thu Mar 29, 2007 10:26 am
Posts: 9
i tried the new release - 3.2.3 - but still getting that error.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.