http://www9.javaeye.com/blog/471098
from: myeclipse to display Java heap Space exception resolution when deploying EJBS
Error message:
Buildfile:g:/workspace/weblogic/intrustejb/xdoclet-build.xml
N65540:
[Ejbdoclet] 2009-9-18 2:57:48 xdoclet. Xdocletmain start
[Ejbdoclet] Info: Running <localinterface/>
[Ejbdoclet] 2009-9-18 2:58:21 xdoclet. Xdocletmain start
[Ejbdoclet] Info: Running <localhomeinterface/>
[Ejbdoclet] 2009-9-18 2:58:51 xdoclet. Xdocletmain start
[Ejbdoclet] Info: Running <deploymentdescriptor/>
[Ejbdoclet] 2009-9-18 2:59:36 xdoclet. Xdocletmain start
[Ejbdoclet] Info: Running <weblogic/>
[Ejbdoclet] Java Heap Space
[Ejbdoclet] Parameterimpl instances:20
[Ejbdoclet] MethodImpl instances:22377
[Ejbdoclet] Constructorimpl instances:19
[Ejbdoclet] Simplenode instances:0
[Ejbdoclet] Sourceclass instances:573
[Ejbdoclet] Xdoc instances:577
[Ejbdoclet] Defaultxtag instances:1664
[Ejbdoclet] Binaryclass instances:135
[Ejbdoclet] Unknownclass instances:0
[Ejbdoclet] Total memory:63
[Ejbdoclet] Free memory:0
[Ejbdoclet] Try to increase heap size. Can do by defining ant_opts=-xmx640m
[Ejbdoclet] The JDK Tooldocs.
Build FAILED
G:/workspace/weblogic/intrustejb/xdoclet-build.xml:44:java Heap Space
Total time:1 minute seconds
Solution:
window->preferences->java->installed Jres->edit JRE
Set the default VM arguments parameter to-xms64m-xmx512m
---------------------- JBoss Outofmemoryerror:permgen Space
Keywords: jboos
Recently, when the project developed on Tomcat 5.5 was deploy to JBoss 4.2, Java.lang.OutOfMemoryError:PermGen space appeared in the operation for some time, starting to think that there was a dead loop in the code that caused such Problem, but later found that the problem is random, not a certain place caused such a problem, suspicion is memory leak, by increasing the heap memory method to try, still not, but the same problem did not appear in Tomcat, is the problem of JBoss.
Done a search on the internet to get some relevant content.
PermGen space is the full name of the permanent Generation spaces, refers to the memory of the permanent storage area Outofmemoryerror:permgen from the surface is the memory benefits, the solution must also be to increase memory. Explain why memory benefits out: This section is used to store class and meta information, class is placed in the PermGen space area when it is load, and is different from the heap area where instance is stored, GC (garbage Collection) PermGen space will not be cleaned up during the main program run, so if your app will load a lot of classes, PermGen space error is likely to occur. This error is common when the Web server is pre compile the JSP.
Correction method, add in Run.bat:-xms256m-xmx512m-xx:maxnewsize=256m-xx:maxpermsize=256m
Because many of the jar packages are referenced in the project, the class information in these jar packages is loaded into the PermGen space area by the JBoss class loader, which, in the JVM's default case, is only 4 m in size, with a lot of love in the jar package condition, it is obviously not enough, so you can solve the problem by-xx:maxpermsize=256m the maximum value.
Additionally, if heap memory appears Java.lang.OutOfMemoryError:Java heap space, you can resolve the problem by specifying the maximum heap memory by-xmx512m.