[ROO-3515] ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE); OutOfMemory on MAC Created: 01/Jul/14  Updated: 02/Jul/14  Resolved: 02/Jul/14

Status: Resolved
Project: Spring Roo
Component/s: SPRING PLATFORM
Affects Version/s: 1.2.5.RELEASE
Fix Version/s: None

Type: Improvement Priority: Blocker
Reporter: Denis Putnam Assignee: Jose Manuel Vivó ( Chema ) - DISID.
Resolution: Works as Designed Votes: 0
Labels: roo
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MAC OSX Version 10.9.3
Spring Tool Suite

Version: 3.5.1.RELEASE
Build Id: 201405030657
Platform: Eclipse Kepler SR2 (4.3.2)
JDK1.7

Machine has 16G of RAM


Attachments: File _TLC.mwb    

 Description   

The ReflectionToStringBuilder.toString() is running out of memory for tables/objects that have One-To-Many, Many-To-One, and Many-To-Many relationships with only a few records.

I tried compressing the project tree, but it is 14MBs. Is there another way I can get it to you?

The _TLC.mwb is the MySQL Workbench file that show the database ERD.

Jul 01, 2014 7:28:58 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.lang.StringBuilder.toString(StringBuilder.java:405)
at java.util.AbstractCollection.toString(AbstractCollection.java:452)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Quarter_Roo_ToString.ajc$interMethod$com_app_myschool_model_Quarter_Roo_ToString$com_app_myschool_model_Quarter$toString(Quarter_Roo_ToString.aj:13)
at com.app.myschool.model.Quarter.toString(Quarter.java:1)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at java.util.AbstractCollection.toString(AbstractCollection.java:450)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Student_Roo_ToString.ajc$interMethod$com_app_myschool_model_Student_Roo_ToString$com_app_myschool_model_Student$toString(Student_Roo_ToString.aj:13)

Jul 01, 2014 7:28:58 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.lang.StringBuilder.toString(StringBuilder.java:405)
at java.util.AbstractCollection.toString(AbstractCollection.java:452)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Quarter_Roo_ToString.ajc$interMethod$com_app_myschool_model_Quarter_Roo_ToString$com_app_myschool_model_Quarter$toString(Quarter_Roo_ToString.aj:13)
at com.app.myschool.model.Quarter.toString(Quarter.java:1)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at java.util.AbstractCollection.toString(AbstractCollection.java:450)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Student_Roo_ToString.ajc$interMethod$com_app_myschool_model_Student_Roo_ToString$com_app_myschool_model_Student$toString(Student_Roo_ToString.aj:13)

2014-07-01 19:28:58,764 [tomcat-http--7] DEBUG org.springframework.web.servlet.DispatcherServlet - Could not complete request
org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:692)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.tiles.util.TilesIOException: ServletException including path '/WEB-INF/layouts/default.jspx'.
at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:241)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:243)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)
at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)
... 67 more
Caused by: org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/quarters/update.jspx'.
at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:241)
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105)
at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)
at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.apache.tiles.renderer.impl.ChainedDelegateAttributeRenderer.write(ChainedDelegateAttributeRenderer.java:76)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:336)
at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:210)
at org.apache.tiles.template.InsertAttributeModel.end(InsertAttributeModel.java:126)
at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:311)
at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspx_meth_tiles_005finsertAttribute_005f2(default_jspx.java:234)
at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspService(default_jspx.java:96)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)
... 72 more
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.servlet.jsp.JspException: javax.servlet.jsp.JspException: java.lang.OutOfMemoryError: Java heap space
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx._jspService(update_jspx.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:678)
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:103)
... 97 more
Caused by: javax.servlet.jsp.JspException: javax.servlet.jsp.JspException: java.lang.OutOfMemoryError: Java heap space
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx$Helper.invoke(update_jspx.java:594)
at org.apache.jsp.tag.webform.update_tagx$Helper.invoke0(update_tagx.java:736)
at org.apache.jsp.tag.webform.update_tagx$Helper.invoke(update_tagx.java:782)
at org.apache.jsp.tag.webutil.panel_tagx._jspx_meth_c_005fif_005f0(panel_tagx.java:193)
at org.apache.jsp.tag.webutil.panel_tagx.doTag(panel_tagx.java:139)
at org.apache.jsp.tag.webform.update_tagx.doTag(update_tagx.java:258)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx._jspx_meth_form_005fupdate_005f0(update_jspx.java:111)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx._jspService(update_jspx.java:76)
... 112 more
Caused by: javax.servlet.jsp.JspException: java.lang.OutOfMemoryError: Java heap space
at org.apache.jsp.tag.webform.fields.select_tagx.doTag(select_tagx.java:569)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx._jspx_meth_field_005fselect_005f0(update_jspx.java:185)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx.access$2(update_jspx.java:164)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx$Helper.invoke0(update_jspx.java:540)
at org.apache.jsp.WEB_002dINF.views.quarters.update_jspx$Helper.invoke(update_jspx.java:586)
... 119 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.lang.StringBuilder.toString(StringBuilder.java:405)
at java.util.AbstractCollection.toString(AbstractCollection.java:452)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Quarter_Roo_ToString.ajc$interMethod$com_app_myschool_model_Quarter_Roo_ToString$com_app_myschool_model_Quarter$toString(Quarter_Roo_ToString.aj:13)
at com.app.myschool.model.Quarter.toString(Quarter.java:1)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at java.util.AbstractCollection.toString(AbstractCollection.java:450)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Student_Roo_ToString.ajc$interMethod$com_app_myschool_model_Student_Roo_ToString$com_app_myschool_model_Student$toString(Student_Roo_ToString.aj:13)
2014-07-01 19:28:58,768 [tomcat-http--7] DEBUG org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter - Closing JPA EntityManager in OpenEntityManagerInViewFilter
2014-07-01 19:28:58,768 [tomcat-http--7] DEBUG org.springframework.orm.jpa.EntityManagerFactoryUtils - Closing JPA EntityManager
2014-07-01 19:28:58,768 [tomcat-http--7] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl - Releasing JDBC connection
2014-07-01 19:28:58,769 [tomcat-http--7] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl - Released JDBC connection
2014-07-01 19:28:58,769 [tomcat-http--7] DEBUG org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler - HHH000163: Logical connection releasing its physical connection
2014-07-01 19:28:58,770 [tomcat-http--7] DEBUG org.springframework.security.web.context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
Jul 01, 2014 7:28:58 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [MySchool] in context with path [/MySchool] threw exception [Request processing failed; nested exception is org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.] with root cause
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.lang.StringBuilder.toString(StringBuilder.java:405)
at java.util.AbstractCollection.toString(AbstractCollection.java:452)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Quarter_Roo_ToString.ajc$interMethod$com_app_myschool_model_Quarter_Roo_ToString$com_app_myschool_model_Quarter$toString(Quarter_Roo_ToString.aj:13)
at com.app.myschool.model.Quarter.toString(Quarter.java:1)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at java.util.AbstractCollection.toString(AbstractCollection.java:450)
at org.hibernate.collection.internal.PersistentSet.toString(PersistentSet.java:327)
at java.lang.String.valueOf(String.java:2854)
at java.lang.StringBuffer.append(StringBuffer.java:232)
at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:598)
at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:473)
at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
at com.app.myschool.model.Student_Roo_ToString.ajc$interMethod$com_app_myschool_model_Student_Roo_ToString$com_app_myschool_model_Student$toString(Student_Roo_ToString.aj:13)

2014-07-01 19:28:58,771 [tomcat-http--7] DEBUG org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'MySchool' processing GET request for [/MySchool/uncaughtException]
2014-07-01 19:28:58,771 [tomcat-http--7] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking up handler method for path /uncaughtException
2014-07-01 19:28:58,799 [tomcat-http--7] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Did not find handler method for [/uncaughtException]
2014-07-01 19:28:58,799 [tomcat-http--7] DEBUG org.springframework.web.servlet.handler.SimpleUrlHandlerMapping - Mapping [/uncaughtException] to HandlerExecutionChain with handler [org.springframework.web.servlet.mvc.ParameterizableViewController@6697520] and 1 interceptor
2014-07-01 19:28:58,800 [tomcat-http--7] DEBUG org.springframework.web.servlet.DispatcherServlet - Last-Modified value for [/MySchool/uncaughtException] is: -1
2014-07-01 19:28:58,800 [tomcat-http--7] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Invoking afterPropertiesSet() on bean with name 'uncaughtException'
2014-07-01 19:28:58,800 [tomcat-http--7] DEBUG org.springframework.web.servlet.DispatcherServlet - Rendering view [org.springframework.web.servlet.view.tiles2.TilesView: name 'uncaughtException'; URL [uncaughtException]] in DispatcherServlet with name 'MySchool'
2014-07-01 19:28:58,800 [tomcat-http--7] DEBUG org.springframework.web.servlet.view.tiles2.TilesView - Added model object 'id' of type [java.lang.Long] to request in view with name 'uncaughtException'
2014-07-01 19:28:58,800 [tomcat-http--7] DEBUG org.apache.tiles.impl.BasicTilesContainer - Render request recieved for definition 'uncaughtException'
2014-07-01 19:28:58,883 [tomcat-http--7] DEBUG org.springframework.web.servlet.DispatcherServlet - Successfully completed request



 Comments   
Comment by Jose Manuel Vivó ( Chema ) - DISID. [ 02/Jul/14 ]

By default the @RooToString generates the representation of the instance based on all fields.

You can configure this behaviour using the RooToString annotation attributes to exclude fields (which causes the problem) or identify the method to use to get the representation-string. An example:

@RooJavaBean
@RooToString(excludeFields={"relation1","relation2"})
@RooJpaActiveRecord
public class MyEntity {
    ...
}

This (configure this annotation for all entities), also, will improve your application performance.

Another way to solve this, is push-in the method on entity and implement this by hand.

Generated at Wed Dec 11 23:16:31 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.