Java. Lang. outofmemoryerror: permgen space transplanted from Weblogic8.1 to weblogic9.2!

Source: Internet
Author: User

After the Weblogic8.1 project is transplanted to weblogic9.2, the following error is always reported:

<04:13:29 P.M. CST> <error> Java. Lang. outofmemoryerror: permgen Space
>
<04:13:30 P.M. CST> <error> Java. Lang. outofmemoryerror: permgen Space
>

I checked a lot of information online. The solution is as follows:

Solution: Adjust the commenv parameters in BEA, WebLogic, and common.
: Sun
If "% production_mode %" = "true" Goto sun_prod_mode
Set java_vm =-Client
Set mem_args =-xms256m-xmx512m-XX: maxpermsize = 256 m
Set java_options = % java_options %-xverify: None
Goto continue
: Sun_prod_mode
Set java_vm =-Server
Set mem_args =-xms256m-xmx512m-XX: maxpermsize = 256 m
Goto continue

Solve this problem

There are many methods
1.
Configure in weblogic81/common/bin/commenv. Sh
Mem_args = "-xms32m-xmx200m-XX: maxpermsize = 128 M"
-XMS: initial memory value
-Xmx: maximum memory size (do not exceed 80% of the memory size)
Maxpermsize: maximum memory size in the permgen (class and meta storage areas) region.

It can be adjusted:
Mem_args = "-xms512m-xmx512m-XX: maxpermsize = 256 m"

I found several mem_args settings in commenv. Sh, so I had to change them if I didn't understand them.

2.

Set the Java command line parameter startweblogic. CMD in startweblogic. cmd

This method is simple, but I want to use eclipse for debugging. So I started WebLogic with eclipse and reported an error.

3. Change the eclipse WebLogic startup parameters to understand at a glance... ^_^

Set JDK attributes
 
-Xms512m-xmx512m

 
However, the above methods have been tried out, and the problem persists. Later I found it was a JDK problem and there was no need to modify the Weblogic configuration file, Web. XML does not need to be modified to servlet2.4, but also uses the servlet2.3 statement in the original 8.1 environment, just to set weblogic. XML deletion. when the service is started, the system will automatically prompt you to create Weblogic in the 9.2 environment. XML: Change the JDK path configured in preference --> JAVA --> installed jres from C: \ bea9 \ jdk150_12 to c: \ bea9 \ jrockit_150_12.

 

Servlet2.3

<? XML version = "1.0" encoding = "UTF-8"?>
<! Doctype web-app public "-// Sun Microsystems, Inc. // DTD web application 2.3 //" http://java.sun.com/dtd/web-app_2_3.dtd ">

<Web-app>

 

Servlet2.4

<? XML version = "1.0" encoding = "UTF-8"?>
<Web-app id = "webapp_id" version = "2.4" xmlns = "http://java.sun.com/xml/ns/j2ee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee
Http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.