Hi All, 

I ve set up AppFuse and am blown away by how neat everything is - Well done
Matt Raible - This is really awesome stuff.

I m seeing an out of memory error when trying to list a 300k table - It
seems to me that the entire dataset is loaded into a hashmap by Hibernate :(

Is this correct?  How can I prevent this from taking place?  

I ve used AppFuse before and it paginates the data so this is exactly what I
want to happen but I DO NOT want it to get loaded up in a gigantic hashmap

I ve double checked my HashCode implementation but I dont think this is the
problem

Heres the stack trace:



java.lang.OutOfMemoryError: Java heap space
        at
org.hibernate.engine.StatefulPersistenceContext.addEntry(StatefulPersistenceContext.java:443)
        at org.hibernate.engine.TwoPhaseLoad.postHydrate(TwoPhaseLoad.java:57)
        at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1415)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
        at org.hibernate.loader.Loader.getRow(Loader.java:1206)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
        at org.hibernate.loader.Loader.doQuery(Loader.java:701)
        at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2213)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
        at org.hibernate.loader.Loader.list(Loader.java:2099)
        at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
        at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
        at
org.springframework.orm.hibernate3.HibernateTemplate$5.doInHibernate(HibernateTemplate.java:596)
        at
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
        at
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
        at
org.springframework.orm.hibernate3.HibernateTemplate.loadAll(HibernateTemplate.java:592)
        at
org.appfuse.dao.hibernate.GenericDaoHibernate.getAll(GenericDaoHibernate.java:54)
        at
org.appfuse.service.impl.GenericManagerImpl.getAll(GenericManagerImpl.java:68)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)



-- 
View this message in context: 
http://www.nabble.com/Out-Of-Memory-When-Listing-Entity-With-300K-Rows-tp19150685s2369p19150685.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

Reply via email to