2014年6月30日月曜日

java.lang.OutOfMemoryError: PermGen space with weblogic

Error info:
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
at oracle.cabo.ui.laf.base.xhtml.InlineMessageRenderer._isAccessKeyNotOnPrompt(Unknown Source)
at oracle.cabo.ui.laf.base.xhtml.InlineMessageRenderer._createContentNode(Unknown Source)
at oracle.cabo.ui.laf.base.xhtml.InlineMessageRenderer.__registerMarlinRenderer(Unknown Source)
at oracle.cabo.ui.laf.base.xhtml.XhtmlLookAndFeel._registerDependentRenderers(Unknown Source)
at oracle.cabo.ui.laf.base.xhtml.XhtmlLookAndFeel.createDefaultFactory(Unknown Source)
at oracle.cabo.ui.laf.base.xhtml.XhtmlLookAndFeel.<clinit>(Unknown Source)
at oracle.cabo.ui.laf.base.desktop.BaseDesktopUtils.registerLookAndFeel(Unknown Source)
at oracle.cabo.ui.laf.LookAndFeelManager.createDefaultLookAndFeelManager(Unknown Source)
at oracle.cabo.ui.laf.LookAndFeelManager.getDefaultLookAndFeelManager(Unknown Source)
at oracle.sysman.emSDK.chart.EmChartCacheManager.init(EmChartCacheManager.java:105)
at oracle.sysman.emSDK.svc.ServiceUtil.initService(ServiceUtil.java:94)
at oracle.sysman.eml.app.ContextInitializer.contextInitialized(ContextInitializer.java:600)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1868)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at oracle.sysman.emSDK.svc.ServiceUtil.initService(ServiceUtil.java:91)

Work around:
The reference bug is listed following:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4957990

In my case the solution was to edit the DOMAIN\bin\setDomainEnv.cmd file. The following modifications were made before the server would start as intended:
The -Xms and -Xmx values were increased;
the -XX:PermSize and -XX:MaxPermSize values were increased too
and lastly, but probably most importantly
the if "%JAVA_VENDOR%"=="Sun" (conditions were changed to if "%JAVA_VENDOR%"=="Oracle" ) in order to properly recognize my JVM.

Reference Doc:
http://www.cnblogs.com/pipijiqimao/archive/2013/03/06/2946344.html

0 件のコメント :

コメントを投稿