JGoodies утечка памяти ?? - Исключение из нехватки памяти, когда Spring пытается отобразить вид - PullRequest
2 голосов
/ 20 мая 2009

Иногда я получаю исключение "Недостаточно памяти" во время или после проверки компонента. Я пытался профилировать большой результат проверки <= 20000, и это сработало, поэтому я стал больше. Исключение возникает при значениях> 20000, кто-нибудь знает о каких-либо утечках памяти, свойственных jgoodies, с платформой валидации, связующим компонентом или чем-то еще?

Исключение в потоке "signal-validationPerformanceTest" java.lang.OutOfMemoryError: пространство кучи Java в java.util.Arrays.copyOf (Arrays.java:2882) в java.lang.AbstractStringBuilder.expandCapacity (AbstractStringBuilder.java:100) в java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:390) в java.lang.StringBuffer.append (StringBuffer.java:224) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:107) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:72) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:100) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:87) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:66) в org.springframework.core.style.StylerUtils.style (StylerUtils.java:47) в org.springframework.webflow.core.collection.LocalAttributeMap.toString (LocalAttributeMap.java:312) в java.lang.String.valueOf (String.java:2827) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:78) в org.springframework.core.style.DefaultToStringStyler.styleValue (DefaultToStringStyler.java:91) в org.springframework.core.style.DefaultToStringStyler.styleField (DefaultToStringStyler.java:79) в org.springframework.core.style.ToStringCreator.append (ToStringCreator.java:156) в org.springframework.webflow.engine.impl.FlowSessionImpl.toString (FlowSessionImpl.java:207) в java.lang.String.valueOf (String.java:2827) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:78) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:107) в org.springframework.core.style.DefaultValueStyler.style (DefaultValueStyler.java:72) в org.springframework.core.style.DefaultToStringStyler.styleValue (DefaultToStringStyler.java:91) в org.springframework.core.style.DefaultToStringStyler.styleField (DefaultToStringStyler.java:79) в org.springframework.core.style.ToStringCreator.append (ToStringCreator.java:156) в org.springframework.webflow.engine.impl.FlowExecutionImpl.toString (FlowExecutionImpl.java:499) в java.lang.String.valueOf (String.java:2827) в java.lang.StringBuffer.append (StringBuffer.java:219) в org.springframework.webflow.execution.repository.support.SimpleFlowExecutionRepository.putFlowExecution (SimpleFlowExecutionRepository.java:130) в org.springframework.webflow.executor.FlowExecutorImpl.resume (FlowExecutorImpl.java:226) в com.mason.core.application.flow.ApplicationFlowEngine $ SignalEventTask.execute (ApplicationFlowEngine.java:188) в com.mason.core.application.flow.ApplicationFlowEngine $ 1.run (ApplicationFlowEngine.java:99) at java.lang.Thread.run (Thread.java:619)

1 Ответ

2 голосов
/ 21 мая 2009

включите -XX: + HeapDumpOnOutOfMemoryError (при условии, что у вас есть SUN JVM) и загрузите дамп кучи в Eclipse Memory Analyzer . Должно быть легко узнать, что требует слишком много памяти.

...