Solving memory problem when starting Weblogic Server to run Oracle SOA suite 30th Ramadan 1431 Hijra
I Installed the Oracle Fusion Middleware version 11.1.1.3 mainly to run some SOA tutorial.
I am the kind of a guy who starts installation immediately before really reading lots of installation manuals. This does not mean that i am right! If you are not an experienced professional capable of maneuvering software issues nimbly, I found an excellent step by step document that you can use to finish the installation steps safely
http://www.installationwiki.org/Installing_Oracle_SOA_Suite_11gR1
Note: Jdeveloper 11g does not come with the SOA Composite Editor built-in so you need to go the Help menu idea and then click on Check for Updates
In order to deploy the SOA project, you need to start the Weblogic application server. I used the Weblogic Server that is shipped with the fusion software that i downloaded.
First step i invoked the node Manager
The node manager will open up a Command Window and shows node manager console:-
Next I tried to run the Admin Server
The command Window starts showing the console, but soon enough an error is generated and the console is immediately terminated
The error was
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
By capturing the Console information, i spotted the current memory setting
JAVA Memory arguments: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
I decided to decrease the Xmx from 1024 to 512
To execute this modification, I learned that the Weblogic reads default env variables from a file called SetDomainEnv located (in my case) inside the following folder
C:\oracle\Middleware\user_projects\domains\base_domain\bin
I searched for the string 1024 in the file , but could not find such a value, so I decided to check the scrip file the runs the Server which is
StartWeblogic.cmd
found in the same folder specified above
Below, you can find an excerpt of the code
%JAVA_HOME%\bin\java %JAVA_VM% -version
@REM added by ammar
set MEM_ARGS=-Xms512m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=512m
if "%WLS_REDIRECT_LOG%"=="" (
echo Starting WLS with line:
echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS%
-Dweblogic.Name=%SERVER_NAME% -
Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %
PROXY_SETTINGS% %SERVER_CLASS% %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -
the highlighted argument above is the variable that the JVM is using to set the memory arguments, therefore, I decided to modify the value in the startup file
Therefore, I added the following line just above the above code segment
@REM added by ammar
set MEM_ARGS=-Xms512m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=512m
This modification allowed the Admin Server for the Weblogic doman to run
Next :
Start the admin console
Ops , I noticed that the SOA Server is Down
I tried to start it as shown below
But starting the soa_server1 kept failing.
I examined the logfile called soa_server1.log in the directoy:
C:\oracle\Middleware\user_projects\domains\base_domain\servers\soa_server1\logs
and found the error
java.lang.OutOfMemoryError: PermGen space
repeating in many places in the logfile
####<Sep 9, 2010 12:45:33 PM EEST> <Info> <Deployer> <Ammar>
<soa_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default
(self-tuning)'> <<WLS Kernel>> <> <> <1284025533968> <BEA-149059> <Module /inspection.wsil
of application wsil-wls is transitioning from STATE_PREPARED to STATE_NEW on
server soa_server1.>
####<Sep 9, 2010 12:45:33 PM EEST> <Info> <Deployer> <Ammar> <soa_server1>
<[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'>
<<WLS Kernel>> <> <> <1284025533968> <BEA-149060> <Module /inspection.wsil of
application wsil-wls successfully transitioned from STATE_PREPARED to STATE_NEW
on server soa_server1.>
####<Sep 9, 2010 12:45:35 PM EEST> <Info> <Diagnostics> <Ammar> <soa_server1>
<[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'>
<<WLS Kernel>> <> <> <1284025535281> <BEA-320000> <The Diagnostics subsystem is
initializing on Server soa_server1.>
####<Sep 9, 2010 12:45:35 PM EEST> <Critical> <WebLogicServer> <Ammar>
<soa_server1> <main> <<WLS Kernel>> <> <> <1284025535906> <BEA-000386> <Server
subsystem failed. Reason: java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
To fix the issue, i found two references
One from metalink that says
Solution
1. Edit the file <middleware home>/wlserver_10.3/common/nodemanager/nodemanager.properties.
Change the parameter StartScriptEnabled to "true"
StartScriptEnabled=true
Save the changes.
2. Restart Node Manager
3. Login to the WLS console and verify that you can stop and start the managed
server
Unfortunately, it did not work
The other was to set the memory env variable directly using the Admin Console in the Setting for soa_server1 page
and filling the values in the arguments Text Area
make sure you save the setting, and try to start the soa_serve1 again
If you could not navigate your way around to this page, the following image will help
Environment (Shown below) --> Servers (shown below) -- Select Soa_server1 (Shown below) -- Configuration Tab (show above), Server Starts (Show above)
then Go to Control Tab, check Soa_server1 and click on the link
It should run successfully
Ok, the soa_server1 is running, i then created a simple SOA task and tried to deploy it on the soa_server1, but the deployment failed. The soa-infra component is not alive within the soa_server1 due to the fact that soa-infra.ear is not found . After some investigation, i found out that you need to install the entire SOA Suite (some 1.7 GB).
I installed SOA Suite Version 11.1.1.2
The current WLS version was 11.1.1.3
I faced the same memory issues (Which incidentally work without a problem using the Jrocket JDK)
and the soa-infra deployment failed due to wsdl class not found error. After more and more investigation, i had to upgrade the SOA to 11.1.1.3 (another 1.9 GB) and then all worked fine
Ammar