facebook

java.lang.OutOfMemoryError: PermGen space

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #302977 Reply

    Miguel Ruiz
    Member

    Hi good afternoon I have a big problem
    I have been working with myeclipse 7.1, glassfish v2
    and my applications were working fine, now q switch to myeclipse 7.5 m, and the following excepccion SUIRG be changed only by 7.5 myeclipse

    java.lang.OutOfMemoryError: PermGen space

    I have no idea how to solve

    help

    #302985

    mhernandez,
    When are you getting the error message? Is it displayed in the console when you run the glassfish server or when starting ME? If it is when you start the server, can you upgrade the JDK of the server at Windows > Preferences > MyEclipse Enterprise Workbench >Servers > Glassfish 2.x > JDK
    and check if it works for you?

    #303009

    Miguel Ruiz
    Member

    Hi thanks for the advice

    I make deploy an application on
    glassfish and the application behaves well,
    but going up a second application shows me this exception

    [#|2009-10-06T11:03:44.438-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=e2687850-255b-4bb1-bde7-833b238beeeb;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.OutOfMemoryError: PermGen space
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:384)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:547)
    at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:299)
    at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
    at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    |#]

    [#|2009-10-06T11:03:51.406-0500|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=17;_ThreadName=MQTimer-Thread;_RequestID=3b93cfda-6308-4299-a6fa-ad78af8b70c0;|Exception in thread “MQTimer-Thread” |#]

    [#|2009-10-06T11:03:51.406-0500|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=17;_ThreadName=MQTimer-Thread;_RequestID=3b93cfda-6308-4299-a6fa-ad78af8b70c0;|java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at com.sun.messaging.jmq.jmsserver.multibroker.fullyconnected.ClusterImpl.sendPingGPacket(ClusterImpl.java:1197)
    at com.sun.messaging.jmq.jmsserver.multibroker.fullyconnected.ClusterImpl.access$100(ClusterImpl.java:80)
    at com.sun.messaging.jmq.jmsserver.multibroker.fullyconnected.ClusterImpl$PingTimerTask.run(ClusterImpl.java:1243)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    |#]

    The JDK for Glassfish V2 is integrated with myeclipse q is 1.6.0.013, like that used with applications that I installed.

    The parameter compiler compliance level: 1.5

    But the funny thing is q behaves well only with myeclipse 7.5

    any suggestions?

    thanks in advance

    #303027

    Miguel Ruiz
    Member

    Hello again, now sends this message
    I have only one application in glassfish

    MyEclipse has detected that less than 5% of the 128MB of Perm Gen (Non-heap memory) space remains.

    It is strongly recommended that you exit and restart MyEclipse with new virtual machine
    memory parameters to increase this memory. Failure to do so can result in data loss.

    The recomended Eclipse memory parameters are:
    eclipse.exe -vmargs -Xms128M -Xmx512M -XXPermSize=64M -XX:MaxPermSize=128M

    #303032

    Miguel Ruiz
    Member

    I have an application on glassfish and sends me this excepxion.

    Any ideas

    [#|2009-10-06T15:42:45.967-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=b3a808ca-0e3f-4331-8aae-9b0e4c915d4f;|StandardWrapperValve[Blocking Servlet]: PWC1406: Servlet.service() for servlet Blocking Servlet threw exception
    java.lang.OutOfMemoryError: PermGen space
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
    at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1545)
    at com.icesoft.faces.context.effects.LocalEffectEncoder.encodeLocalEffects(LocalEffectEncoder.java:76)
    at com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer.renderAttributes(PassThruAttributeRenderer.java:176)
    at com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer.renderAttributes(PassThruAttributeRenderer.java:143)
    at com.icesoft.faces.renderkit.dom_html_basic.ImageRenderer.encodeBegin(ImageRenderer.java:74)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
    at com.icesoft.faces.component.menubar.MenuItemRenderer.renderAnchor(MenuItemRenderer.java:708)
    at com.icesoft.faces.component.menubar.MenuItemRenderer.renderSubMenuItem(MenuItemRenderer.java:591)
    at com.icesoft.faces.component.menubar.MenuItemRenderer.renderChildrenRecursive(MenuItemRenderer.java:448)
    at com.icesoft.faces.component.menubar.MenuItemRenderer.renderChildrenRecursive(MenuItemRenderer.java:481)
    at com.icesoft.faces.component.menubar.MenuItemRenderer.encodeBegin(MenuItemRenderer.java:230)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350)
    at com.icesoft.faces.component.menubar.MenuItemsRenderer.renderRecursive(MenuItemsRenderer.java:65)
    at com.icesoft.faces.component.menubar.MenuItemsRenderer.encodeChildren(MenuItemsRenderer.java:55)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
    at com.icesoft.faces.component.menubar.MenuBarRenderer.encodeChildren(MenuBarRenderer.java:117)
    |#]

    #303047

    mhernandez,
    Can you replace -vmargs -Xms128M -Xmx512M -XXPermSize=64M -XX:MaxPermSize=128M with the following in myclipse.ini file located at your installation directory
    -vmargs
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:ReservedCodeCacheSize=64m
    Please make sure that no white spaces or special characters are inserted when doing so.
    Let me know if this works for you.

    #303058

    Miguel Ruiz
    Member

    Greetings again, now if I am worried

    parameters change as desirable and I have the same problem

    [#|2009-10-07T08:22:39.909-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpSSLWorkerThread-8080-2;_RequestID=fe803b77-5ea9-4442-b171-841f259214c4;|StandardWrapperValve[Blocking Servlet]: PWC1406: Servlet.service() for servlet Blocking Servlet threw exception
    java.lang.OutOfMemoryError: PermGen space
    at sun.misc.Unsafe.defineClass(Native Method)
    at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
    at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
    at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1545)
    at com.icesoft.faces.context.effects.LocalEffectEncoder.encodeLocalEffects(LocalEffectEncoder.java:76)
    at com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer.renderAttributes(PassThruAttributeRenderer.java:176)
    at com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer.renderAttributes(PassThruAttributeRenderer.java:143)
    at com.icesoft.faces.renderkit.dom_html_basic.TextRenderer.renderContainingSpan(TextRenderer.java:170)
    at com.icesoft.faces.renderkit.dom_html_basic.TextRenderer.renderUIOutput(TextRenderer.java:95)
    at com.icesoft.faces.renderkit.dom_html_basic.TextRenderer.renderEnd(TextRenderer.java:66)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeEnd(DomBasicRenderer.java:126)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:362)
    at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
    at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
    at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:203)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:571)
    at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
    at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
    at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
    at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:575)
    |#]

    What can I do ???????

    thanks for your kind attentions!!!!!!!!!!!

    #303100

    mhernandez,

    I have an application on glassfish and sends me this excepxion.

    I came across the following article
    http://java.dzone.com/articles/java-performance-tuning?page=0,1
    where it is mentioned that memory leaks could lead to such an exception.
    Can you make sure that you have closed all the database objects as suggested in the above article?

    #303109

    Miguel Ruiz
    Member

    thanks for the article and for your help, but my problem is to use the ide myeclipse 7.5, myeclipse 7.1 when I used never got this kind of exception it can return to myeclipse version 7.1 without upgrade to 7.5 q, or who may support me, I know someone can support q online????

    Now I understand that works very well myeclipse 7.1 myeclipse 7.5 and it does not, even with simple applications do not understand this exception arises q pasa, work well in applications database and use ice faces q 1.8.1, Spring 2.5 and hibernate 3.2 I have therefore q PROCUP by close connections to the database, and q is responsible for the spring session

    thanks in advance

    #303110

    Miguel Ruiz
    Member

    look I found the following article, this is what happens since I installed myeclipse 7.5

    What you have here is a classloader leak.

    The PermGen area holds stuff that the jvm thinks will be required permanently while the server is running. This includes, amongst other things, classes themselves.

    You’re problem is that when you redeploy your app the jvm will load new classes for your new app but still holds onto some old ones as well. Stuff in PermGen is not garbage collected. Trying to trace what is being kept when it is no longer required is pretty painful but there are a couple of other things you can try:

    1. Increase the PermGen size – Add the jvm startup argument -XX:MaxPermSize=WHATEVER
    the default is 64m so maybe just double it
    You also should increase the Max jvm memory size along with the above e.g.
    -Xmx1024m

    2. Restart your server once in a while rather than just redeploy – This will clear up all the old PermGen rubbish as the jvm will be starting from scratch.

    #303146

    Loyal Water
    Member

    look I found the following article, this is what happens since I installed myeclipse 7.5

    Im not clear if going through this article has resolved the issue for you. Could you please clarify if the problem still persists at your end.

    #303188

    Miguel Ruiz
    Member

    I can not solve the problem

    I look myeclipse 7.1 applications behave well and have no problems

    myeclipse 7.5 and change the problems begin, I mark the following exceptions:

    java.lang.OutOfMemoryError: PermGen space

    the funny thing is that applications created in myeclipse 7.5 is behaving well, but the application deployer created in 7.1 with myeclipse myeclipse 7.5 on glassfish mark me the exception:

    java.lang.OutOfMemoryError: PermGen space

    that’s my problem, now if the war genre of the application created in myeclipse 7.1 on the same ide, and the war genre correspondioentes applications to myeclipse 7.5 on 7.5 and then manually deploy on glassfish and I mark the exception

    which do you recommend?

    #303260

    Loyal Water
    Member

    I believe changing the arguments to the glassfish launch will fix that problem. Can you edit the connector settings, under JDK I believe and pass the permgen args there.

    Let me know if the problem persists.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: java.lang.OutOfMemoryError: PermGen space

You must be logged in to post in the forum log in