Weblogic Startup Failed in Eclipse Helio [Stopped, Unable to validate WebLogic Domain]

Source: Internet
Author: User
Tags xms


Problem:

I downloaded and installed:
-Eclipse 3.6 (Helios) + WTP 3.2.1 = eclipse JEE
-OEPE 11.1.1.6 from http://download.oracle.com/otn_software/oepe/helios
-Weblogic 9.2
After I started the server I can see the weblogic starting up but then its says:
"Starting Bea Weblogic Server 9.2 at localhost encountered a problem.
Server Bea Weblogic Server 9.2 at localhost failed to start. "(but the server is started)
Then at the server view I can see the following message: "Stopped, Unable to validate WebLogic Domain"
Accessing the server console with a browser works-I can even deploy my app there! However it must work in eclipse somehow, right ?!

Solution

The problem is connected with this bug:

Http://bugs.sun.com/bugdatabase/view_bug.do? Bug_id = 6434149

And shows when eclipse is working on Java 6 (and it has to, because Oracle development tools for Helios requires Java 6) and WebLogic is running on Java 5.
The workaround is simple:
Add
-Dsun. Lang. classloader. allowarraysyntax = true

After-vmargs string in eclipse. ini

------------------------- Introduction to eclipse. ini ---------------------------------------------------

Eclipse startup is controlled by $ eclipse_home/eclipse. ini. If $ eclipse_home is not defined, the default eclipse. ini under the eclipse installation directory will take effect.
Eclipse. INI is a text file whose content is equivalent to the command line parameter added to eclipse.exe during eclipse runtime.
Format requirements:
1: all options and their related parameters must be within a single row.
2: All parameters after-vmargs will be transmitted to JVM, all parameters set for eclipse must be written before-vmargs (just like using these parameters on the command line)
By default, eclipse. ini contains the following content:
-Showsplash
Org. Eclipse. Platform
-- Launcher. xxmaxpermsize
256 m
-Vmargs
-Xms40m
-Xmx256m
The preceding configuration indicates that the initial size of the heap space is 40 MB, the maximum size is 256 MB, and the maximum permgen size is 256 MB.

Virtual Machine
We recommend that you use eclipse. INI to specify a specific JVM, instead of using the default situation, because in many cases you cannot confirm which JVM is installed on your machine using your eclipse, use eclipse. INI to specify so that you can specify and confirm it.

The following example shows how to use the-VM option correctly.
Note: the format of VM options has strict requirements:
1:-The VM option and its value (PATH) must be in a separate line
2: The value must strictly point to the Java executable file, not just the Java home directory.
3:-The VM option must be included before the-vmargs option. As mentioned earlier, all options after-vmargs will be passed directly to the JVM.

Windows example
-Showsplash
Org. Eclipse. Platform
-- Launcher. xxmaxpermsize
256 m
-VM
C: Java \ JDK \ 1.5 \ bin \ javaw.exe
-Vmargs
-Xms40m
-Xmx512m

Linux example
In Linux, the format is similar to that in windows.
-Showsplash
Org. Eclipse. Platform
-- Launcher. xxmaxpermsize
256 m
-Vm
/Opt/sun-jdk-1.6.0.02/bin/java
-Vmargs
-Xms40m
-Xmx512m

Mac OS X Example
Specify Java 6:
-Showsplash
Org. eclipse. platform
-- Launcher. XXMaxPermSize
256 m
-Vm
/System/Library/Frameworks/JavaVM. framework/Versions/1.6.0/Home/bin/java
-Vmargs
-Xms40m
-Xmx512m

Heap and Non-heap memory
According to the official statement: "A Java virtual machine has a heap. The heap is the runtime data area, and the memory of all class instances and arrays is allocated from this place. Heap is in Java
Created when the VM is started ." "Memory outside of the heap in JVM is called Non-heap memory )". JVM manages two types of memory: heap and non-heap.
In short, heap is the memory available for Java code and is reserved for developers;
Non-heap is reserved for the JVM, so the memory required for processing or optimization in the Method Area and JVM (such as the code cache after JIT compilation), the structure of each class (such as the runtime data pool, field and method data), and methods and constructor
The code is in non-heap memory.
Heap memory allocation:
The memory initially allocated by JVM is specified by-Xms. By default, it is 1/64 of the physical memory;
The maximum memory allocated by the JVM is specified by-xmx. By default, it is 1/4 of the physical memory.
By default, when the free heap memory is less than 40%, the JVM will increase the heap until the maximum limit of-xmx is reached;
When the free heap memory is greater than 70%, the JVM will reduce the minimum heap-to-XMS limit.
Therefore, the server generally sets-XMS and-xmx to be equal to each other to avoid adjusting the heap size after each GC.

Non-heap memory allocation:
JVM uses-XX: permsize to set the non-heap memory initial value. The default value is 1/64 of the physical memory;
Set the maximum non-heap memory size by XX: maxpermsize. The default value is 1/4 of the physical memory.

JVM memory limit (maximum)
First, the JVM memory is limited to the actual maximum physical memory. If the physical memory is infinitely large, the maximum JVM memory has a great relationship with the operating system.
Simply put, although the 32-bit processor has a controllable memory space of 4 GB, the specific operating system will impose a limit, which is generally 2 GB-3 GB (generally
In Windows, the processor is 1.5 GB-2 GB, and in Linux, the processor is 2 GB-3 GB.

Setting VM parameters causes program startup failure mainly due to the following reasons:
1) In the parameter, the value of-XMS is greater than-xmx, or the value of-XX: permsize is greater than-XX: maxpermsize;
2)-xmx value and-XX: The sum of maxpermsize exceeds the maximum JVM memory limit, such as the maximum memory limit of the current operating system or the actual physical memory.
Speaking of the actual physical memory, it should be noted that if your memory is 1024 MB, but it is not likely to be 1024 MB in the actual system, because some of them are occupied by hardware.

Why didn't the corresponding settings be executed when writing the above parameters to the eclipse. ini file eclipse?
Why is the same parameter valid in the shortcut or command line and invalid in the eclipse. ini file? This is because we have not followed the setting rules of the eclipse. ini file:
Parameters are in the form of "item value". If there is a space in the middle, you need to wrap it. If there is a space in the value, you need to include it in double quotation marks. For example, we use-vm
Set the virtual machine with the C: \ Java \ jre1.6.0 \ bin \ javaw.exe parameter. In the eclipse. ini file, write as follows:
-Vm
C: \ Java \ jre1.6.0 \ bin \ javaw.exe

As mentioned above, the final parameter can be written in eclipse. ini as follows:
-Vmargs
-Xms128M
-Xmx512M

-XX: PermSize = 64 M
-XX: MaxPermSize = 128 M
The actual running result can be found in Eclipse
Click the "Configuration Details" button in the "Help"-"About Eclipse SDK" window to view Details.
Note
The content of the Eclipse. ini file in the eclipse compressed package is as follows:
-Showsplash
Org. eclipse. platform

-- Launcher. XXMaxPermSize
256 m
-Vmargs
-Xms40m
-Xmx256m

Among them, the-launcher. XXMaxPermSize (note that there are two connection lines at the top) has the same meaning as the-XX: MaxPermSize parameter. I
The only difference is that the parameter set during startup of eclipse.exe is the parameter in the JVM used by eclipse. In fact, you can set one of them, so
Here we can comment out-launcher. XXMaxPermSize and # In the next line.

Other startup parameters. If you have a dual-core CPU, you can try this parameter:
-XX: + UseParallelGC
Enables faster GC execution.

Bytes -------------------------------------------------------------------------------------------------------------------
-Vmargs-Xms128M-Xmx512M-XX: PermSize = 64 M-XX: MaxPermSize = 128 M
There are several questions:
1. What are the meanings of each parameter?
2. Why can Eclipse be started after I set-Xmx and-XX: MaxPermSize to 512M on some machines, but some machines cannot be started?
3. Why didn't eclipse execute the corresponding settings when writing the above parameters to the Eclipse. ini file?
Let's answer them one by one.
1. What are the meanings of each parameter?
In the parameters-vmargs indicates setting JVM parameters, so the following are actually JVM parameters. First, let's take a look at the JVM memory management mechanism, and then explain the meaning of each parameter.
Heap and non-heap memory
According to the official statement: "A Java virtual machine has a heap. The heap is the runtime data area, and the memory of all class instances and arrays is allocated from this place. The heap is created when the Java Virtual Machine is started ." "Memory outside of the heap in JVM is called non-heap memory )". JVM manages two types of memory: heap and non-heap. In short, heap is the memory available for Java code and is reserved for developers. Non-heap is reserved for JVM, therefore, the method area, JVM internal processing or optimization of the required memory (such as the code cache after JIT compilation), each class structure (such as the runtime data pool, field and method data) the methods and constructor code are all in non-heap memory.
Heap Memory Allocation
The initial memory allocated by JVM is specified by-XMS. The default value is 1/64 of the physical memory. The maximum memory allocated by JVM is specified by-xmx. The default value is 1/4 of the physical memory. By default, when the free heap memory is less than 40%, the JVM will increase the heap until the maximum limit of-xmx. When the free heap memory is greater than 70%, the JVM will reduce the minimum limit of heap until-XMS. Therefore, the server generally sets-XMS and-xmx to be equal to each other to avoid adjusting the heap size after each GC.
Non-heap memory allocation
JVM uses-XX: permsize to set the non-heap memory initial value. The default value is 1/64 of the physical memory. The maximum non-heap memory size is set by XX: maxpermsize. The default value is 1/4 of the physical memory.
JVM memory limit (maximum)
First, JVM memory is limited to the actual maximum physical memory (nonsense! If the physical memory is infinitely large, the maximum JVM memory has a great relationship with the operating system. Simply put, although the 32-bit processor has a controllable memory space of 4 GB, the specific operating system will impose a limit, this limit is generally 2 GB-3 GB (1.5 GB-2 GB in windows and 2 GB-3 GB in Linux ), the 64-bit and above processors will not be limited.
2. Why can eclipse be started after I set-xmx and-XX: maxpermsize to 512m on some machines, but some machines cannot be started?
Through the introduction of JVM memory management, we have learned that JVM memory includes two types: heap memory and non-heap memory. In addition, the maximum JVM memory depends on the actual physical memory and operating system. Therefore, setting VM parameters causes program startup failure mainly due to the following reasons:
1) In the parameter, the value of-Xms is greater than-Xmx, or the value of-XX: PermSize is greater than-XX: MaxPermSize;
2)-Xmx value and-XX: The sum of MaxPermSize exceeds the maximum JVM memory limit, such as the maximum memory limit of the current operating system or the actual physical memory. Speaking of the actual physical memory, it should be noted that if your memory is 1024 MB, but it is not likely to be 1024 MB in the actual system, because some of them are occupied by hardware.
3. Why didn't eclipse execute the corresponding settings when writing the above parameters to the Eclipse. ini file?
Why is the same parameter valid in the shortcut or command line and invalid in the eclipse. ini file? This is because we have not followed the setting rules of the eclipse. ini file:
Parameters are in the form of "item value". If there is a space in the middle, you need to wrap it. If there is a space in the value, you need to include it in double quotation marks. For example, we use the-vm C: \ Java \ jre1.6.0 \ bin \ javaw.exe parameter to set the virtual machine. In the eclipse. ini file, we need to write it as follows:
-Vm
C: \ Java \ jre1.6.0 \ bin \ javaw.exe
As mentioned above, the final parameter can be written in eclipse. ini as follows:
-Vmargs
-Xms128M
-Xmx512M
-XX: PermSize = 64 M
-XX: MaxPermSize = 128 M
The actual running result can be viewed through the "Configuration Details" button in the "Help"-"About Eclipse SDK" window in Eclipse.
Note that the Eclipse. ini file in the eclipse compressed package contains the following content:
-Showsplash
Org. eclipse. platform
-- Launcher. XXMaxPermSize
256 m
-Vmargs
-Xms40m
-Xmx256m
-Launcher. XXMaxPermSize (note that there are two connection lines at the top) and-XX: the meaning of the MaxPermSize parameter are basically the same. I think the only difference is that the parameter set when eclipse.exe is started, the latter is the JVM parameter used by eclipse. In fact, you can set one of the two, so here you can comment out-launcher. XXMaxPermSize and use # In the next line.
3. Other startup parameters. If you have a dual-core CPU, you can try this parameter:
-XX: + UseParallelGC
Enables faster GC execution. (Only the newly added GC parameters in JDK 5)

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.