views:

343

answers:

1

I am getting an Out of Memory exception sometimes during or after the validation of component happens. I was trying to profile a large validation result <= 20000, and it worked, so I went bigger. The exception occurs at values > 20000, does anyone know of any inherent jgoodies memory leaks, with the validation framework, the component binder, or anything else?

Exception in thread "signal-validationPerformanceTest" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuffer.append(StringBuffer.java:224) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:107) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:72) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:100) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:87) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:66) at org.springframework.core.style.StylerUtils.style(StylerUtils.java:47) at org.springframework.webflow.core.collection.LocalAttributeMap.toString(LocalAttributeMap.java:312) at java.lang.String.valueOf(String.java:2827) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:78) at org.springframework.core.style.DefaultToStringStyler.styleValue(DefaultToStringStyler.java:91) at org.springframework.core.style.DefaultToStringStyler.styleField(DefaultToStringStyler.java:79) at org.springframework.core.style.ToStringCreator.append(ToStringCreator.java:156) at org.springframework.webflow.engine.impl.FlowSessionImpl.toString(FlowSessionImpl.java:207) at java.lang.String.valueOf(String.java:2827) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:78) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:107) at org.springframework.core.style.DefaultValueStyler.style(DefaultValueStyler.java:72) at org.springframework.core.style.DefaultToStringStyler.styleValue(DefaultToStringStyler.java:91) at org.springframework.core.style.DefaultToStringStyler.styleField(DefaultToStringStyler.java:79) at org.springframework.core.style.ToStringCreator.append(ToStringCreator.java:156) at org.springframework.webflow.engine.impl.FlowExecutionImpl.toString(FlowExecutionImpl.java:499) at java.lang.String.valueOf(String.java:2827) at java.lang.StringBuffer.append(StringBuffer.java:219) at org.springframework.webflow.execution.repository.support.SimpleFlowExecutionRepository.putFlowExecution(SimpleFlowExecutionRepository.java:130) at org.springframework.webflow.executor.FlowExecutorImpl.resume(FlowExecutorImpl.java:226) at com.mason.core.application.flow.ApplicationFlowEngine$SignalEventTask.execute(ApplicationFlowEngine.java:188) at com.mason.core.application.flow.ApplicationFlowEngine$1.run(ApplicationFlowEngine.java:99) at java.lang.Thread.run(Thread.java:619)

+1  A: 

turn on -XX:+HeapDumpOnOutOfMemoryError (assuming you have a SUN JVM) and load the heap dump into the Eclipse Memory Analyzer. It should be easy to find out what is needing too much memory.

kohlerm