Monday, November 14, 2016

How to increase the Heap Size on Oracle SOA Servers to fix Java Out of Memory Exception

In the startManagedWeblogic script for the managed servers  $DOMAIN_HOME/bin/startManagedWebLogic.cmd
  
                        set JAVA_OPTIONS=-Xms1024m -Xmx1024m %JAVA_OPTIONS%


    In the setDomainEnv script for the managed servers and admin server (domain wide)

                       set USER_MEM_ARGS=-Xms1024m -Xmx1024m -XX:PermSize=256m

How to handle the space between Program Files while setting JAVA_HOME

Its always a confusion how to handle space between Program Files. Some times this space creates an issue. 

Windows provide a shortened path  to resolve this issue. As per that the shortened path for Program Files and Program Files(x86) are as shown below

Progra~1 = 'Program Files'Progra~2 = 'Program Files(x86)'

If your JRE installed on C:\Program Files (x86)\Java\jre1.8.0_111

Now you can set the JAVA_HOME as follows

SET JAVA_HOME= C:\Progra~2\Java\jre1.8.0_111

Missing "server" JVM at `C:\Program Files (x86)\Java\jre1.8.0_111\bin\server\jvm­­.dll'

This is a common error while we set the JAVA_HOME to the JRE directory. To resolve this issue:

Go to

C:\Program Files (x86)\Java\jre1.8.0_111\bin\
Create a directory called server under the bin
copy all the contents from C:\Program Files (x86)\Java\jre1.8.0_111\bin\client to this newly created server folder


Tuesday, September 29, 2015

Port forwarding in VM : How to access the guest weblogic console from the host machine

If we want to access the weblogic console of the guest VM from the host machine we need to do the port forwarding

On the VBox goto settings->Network->Adapter1

Select the type as NAT

Choose the Port forwarding and give the host port corresponding to the default guest port


Now from the guest VM the console can be accessed using http://localhost:7001/console

Where as from the host the same console can be accessed using http://localhost:7201/console

Please note the port number change

jdev fails to open in linux java.lang.UnsatisfiedLinkError

Sometimes the jdev installer or the jdev itself fails to load on linux with the error java.lang.UnsatisfiedLinkError.

In such cases look at the error message. It will tell about the missing libraries/shared files in the OS
For .eg
java.lang.UnsatisfiedLinkError: /opt/app/oracle/Middleware/JDEV/jdk160_24/jre/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory


/


To resolve such issues open the terminal and change to root user, the install the missing libraries using the yum install command




yum install libXtst.so.6




There are cases where in the jdev installer itself may not open in graphical mode due to the missing libraries
Two such libraries are  libXp.so.6   and libXtst.so.6

Try to install these libraries and then  try to start jdev

yum install libXp.so.6
yum install libXtst.so.6

Friday, September 25, 2015

Command to find out ipaddress on linux

on the terminal type the following command

/sbin/ifconfig | grep 'inet addr:'

How to run a bin installer on Linux

Say for e.g we need to install jdeveloper on linux we need to run the  jdevstudio11117install.bin file as follows

[root@fmw12c JDEV]# chmod +x jdevstudio11117install.bin
[root@fmw12c JDEV]# ./jdevstudio11117install.bin

Thursday, September 24, 2015

unable to extend index DEV_MDS.MDS_ATTRIBUTES_U2 by 1024 in tablespace DEV_MDS

This issue sometimes appear while installing AIA

To resolve this we need to extend the datafile associated to the tabelspace

Identify the existing datafile location

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/opt/app/oracle/oradata/fmw12c/system01.dbf
/opt/app/oracle/oradata/fmw12c/DEV_mds.dbf
/opt/app/oracle/oradata/fmw12c/sysaux01.dbf
/opt/app/oracle/oradata/fmw12c/undotbs01.dbf
/opt/app/oracle/oradata/fmw12c/DEV_iassdpm.dbf
/opt/app/oracle/oradata/fmw12c/users01.dbf
/opt/app/oracle/oradata/fmw12c/DEV_soainfra.dbf
/opt/app/oracle/oradata/fmw12c/DEV_orabam.dbf
/opt/app/oracle/oradata/fmw12c/DEV_odi_user.dbf

9 rows selected.

Identify the tables spaces

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
DEV_IAS_ORASDPM
DEV_MDS
DEV_SOAINFRA
DEV_IAS_TEMP
DEV_ORABAM
DEV_ODI_TEMP

TABLESPACE_NAME
------------------------------
DEV_ODI_USER

12 rows selected

Alter the tablespace having space issue as follows

SQL> alter tablespace DEV_MDS add datafile '/opt/app/oracle/oradata/fmw12c/DEV_mds01.dbf' size 1024m;

Tablespace altered.

How to delete/remove an existing weblogic domain

To remove the domain named "base_domain" , do the following steps:

Stop the processes associated with the domain.

Remove the relevant domain entry from the "$MW_HOME/domain-registry.xml" file.

<?xml version="1.0" encoding="UTF-8"?>
<domain-registry xmlns="http://xmlns.oracle.com/weblogic/domain-registry">
  <domain location="/u01/app/oracle/middleware/user_projects/domains/base_domain"/>
</domain-registry>

Remove the relevant domain entry from the "$WLS_HOME/common/nodemanager/nodemanager.domains" file.

#Domains and directories created by Configuration Wizard
base_domain=/u01/app/oracle/middleware/user_projects/domains/base_domain

Delete the "base_domain" application and domain directories.
$ rm -Rf $MW_HOME/user_projects/applications/base_domain
$ rm -Rf $MW_HOME/user_projects/domains/base_domain

Monday, September 21, 2015

How to apply middleware patch using opatch utiltiy

1. Download the patch
2. If it is a .zip file unzip it
3. on the terminal/putty navigate to the root directory of the extracted content
4.Set the path variable

    In Linux, the path variable can be set as follows

export PATH=$ORACLE_HOME/OPatch;$PATH

for e.g for SOA patches

            export PATH=/opt/app/oracle/Middleware/Oracle_SOA1/OPatch:$PATH

for e.g for AIA  patches

               export PATH=/opt/app/oracle/Middleware/AIAHome/OPatch:$PATH

5. run the following command( please note the command is case sensitive)

   opatch apply  -invPtrLoc <path to SOA/AIA oraInstl.loc> -oh <path to SOA/AIA Home> -jre <jre location>


for e.g for AIA patches

  opatch apply -invPtrLoc /opt/app/oracle/Middleware/AIAHome/oraInst.loc -oh /opt/app/oracle/Middleware/AIAHome -jre /opt/app/java/jdk1.7.0_79/jre


Sample Execution:
------------------------------------------------------------------
[oracle@fmw12c 17553612]$ opatch apply -invPtrLoc /opt/app/oracle/Middleware/AIAHome/oraInst.loc -oh /opt/app/oracle/Middleware/AIAHome -jre /opt/app/java/jdk1.7.0_79/jre
Oracle Interim Patch Installer version 11.1.0.9.9
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/app/oracle/Middleware/AIAHome
Central Inventory : /opt/app/oraInventory
   from           : /opt/app/oracle/Middleware/AIAHome/oraInst.loc
OPatch version    : 11.1.0.9.9
OUI version       : 11.1.0.9.0
Log file location : /opt/app/oracle/Middleware/AIAHome/cfgtoollogs/opatch/17553612_Sep_22_2015_14_01_16/apply2015-09-22_14-01-16PM_1.log


OPatch detects the Middleware Home as "/opt/app/oracle/Middleware"

Applying patch set update 17553612 to /opt/app/oracle/Middleware/AIAHome
Applying interim patch '17553612' to OH '/opt/app/oracle/Middleware/AIAHome'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.aia.top, 11.1.1.7.0...
ApplySession adding Patch Set Update '17553612' to inventory

Verifying the update...
Patch 17553612 successfully applied
Log file location: /opt/app/oracle/Middleware/AIAHome/cfgtoollogs/opatch/17553612_Sep_22_2015_14_01_16/apply2015-09-22_14-01-16PM_1.log

OPatch succeeded.

--------------------------

 

How to setup Node Manager for Weblogic on Linux

To Setup Node Manager follow the below steps

1. Start Admin Server
2. logon to console and goto machines
3.Click on the unix machine and verify the node name and status of it. At this point it will be in inactive state

4. Goto  WLS_HOME/server/bin

     Execute the command  ./startNodeManager.sh

5. Once the node manager is started, it will create a nodemanager.properties file under  WLS_HOME/common/nodemanager

6. Open the nodemanager.properties file using vi editor and change the value for   StartScriptEnabled from false to true .

StartScriptEnabled=true


Save the file

7.Now once again start node manager ( kill the previous instance of node manager)

8. Goto WLS_HOME/common/bin

  Start the wlst interpreter by executing ./wlst.sh

9. Now from the wlst console try to connect to the admin server

wls:/offline> connect('weblogic','weblogic1','t3://localhost:7001')
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.

10. Now enroll the node manager to the domain

nmEnroll('/opt/app/oracle/Middleware/user_projects/domains/base_domain','/opt/app/oracle/Middleware/wlserver_10.3/common/nodemanager')

wls:/base_domain/serverConfig> nmEnroll('/opt/app/oracle/Middleware/user_projects/domains/base_domain','/opt/app/oracle/Middleware/wlserver_10.3/common/nodemanager')
Enrolling this machine with the domain directory at /opt/app/oracle/Middleware/user_projects/domains/base_domain ...
Successfully enrolled this machine with the domain directory at /opt/app/oracle/Middleware/user_projects/domains/base_domain.
wls:/base_domain/serverConfig>

11. Now copy the classpath entry which is visible when you start the node manger on the terminal. Then goto admin console, select the managed server. goto startup tab.
In the classpath field past the copied classpath value from the node manager startup window.

12. Now try to start the manged server from the admin console


Friday, September 11, 2015

Illegalstateexception applications is not readable while starting weblogic managed server

This issue comes if the user trying to start the server is not the owner of soa_server1

To fix login as root user

start the managed server as usual

./runManagedServer.sh soa_server1 http://localhost:7001

Thursday, September 10, 2015

ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file

Sometimes while trying to start oracle database the following errors may happen

ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file

This could be due to the invalid value for the ORACLE_SID environment value

To verify the valid value for SID execute the following command

cat /etc/oratab


[oracle@fmw12c ~]$ cat /etc/oratab
#

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
fmw12c:/opt/app/oracle/db/product/12.1.0/dbhome_1:N

---------------------------------------------------------------

At the end of the file the valid SIDs will be visible as shown above.

Now set the ORACLE_SID to any of the valid value from the above file

\[oracle@fmw12c ~]$ export ORACLE_SID=fmw12c

After this logon to sqlplus as sysdba

Then execute startup

SQL> startup

How to increase the disk size for the .vmdk files for oracle VM

To increase the size of .vmdk file, first convert it to .vdi format and then resize.


C:\Installed\Oracle\VirtualBox>VboxManage clonehd "C:\VirtualBox
VMs\FMW12c_Training\OracleLinux_6.6-disk1.vmdk" "C:\VirtualBox VM
s\FMW12c_Training\cloned.vdi" --format vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vdi'. UUID: 101956ff-cd49-46e7-aeb1-26e2ecf12a7c


C:\Installed\Oracle\VirtualBox>VboxManage modifyhd "C:\VirtualBox
 VMs\FMW12c_Training\cloned.vdi" --resize 46080
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

C:\Installed\Oracle\VirtualBox>VboxManage clonehd "C:\VirtualBox
VMs\FMW12c_Training\OracleLinux_6.6-disk2.vmdk" "C:\VirtualBox VM
s\FMW12c_Training\cloned2.vdi" --format vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vdi'. UUID: 30b2ff1d-bb19-4059-bed6-1c79c85dc3a1


C:\Installed\Oracle\VirtualBox>VboxManage modifyhd "C:VirtualBox
 VMs\FMW12c_Training\cloned2.vdi" --resize 46080
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Once the vdi files have been resized

On the VirtualBox->Settings->Storage

Remove the .vmdk storage and then add .vdi storage created above


SOA 11g installation fails on Linux due to missing packages

Sometimes while installing SOA Suite on Oracle Linux Server, it may fail in the first screen itself saying the required packages are not found on the OS.

To install the required packages execute the following commands as root user

yum install binutils-2*.x86_64 -y
yum install compat-libcap1-1* -y
yum install compat-libstdc++-33*.i686 -y
yum install compat-libstdc++-33*.x86_64 -y
yum install gcc-4*.x86_64 -y
yum install gcc-c++-4*.x86_64 -y
yum install glibc-2*.x86_64 -y
yum install glibc-2*.i686 -y
yum install glibc-devel-2*.i686 -y
yum install libaio-0.*.x86_64 -y
yum install libaio-devel-0.*.x86_64 -y
yum install libgcc-4.*.x86_64 -y
yum install libstdc++-4.*.i686 -y
yum install libstdc++-4.*.x86_64 -y
yum install libstdc++-devel-4.*.x86_64 -y
yum install libXext.i686 -y
yum install libXtst.i686 -y
yum install sysstat-9.*.x86_64 -y

Another app is currently holding the yum lock; PackageKit holding yum lock

This is an annoying message while doing yum install.

To disable this Goto the System>Preferences->StartupApplications.

On the popup window select PackageKit application and click on the remove button

Wednesday, September 9, 2015

How to run the weblogic server patch after installing the weblogic server


Down load the patch

Unzip the patch.zip to the directory $MW_HOME/utils/bsu/cache_dir

copy the jar name and replace  <jarName> in the following command with the jar name(without .jar extension)

Supply proper values for  $MW_HOME and  $WLS_HOME as per the intallation

Navigate to $MW_HOME/utils/bsu directory and run the following command.



./bsu.sh -install -patch_download_dir=$MW_HOME/utils/bsu/cache_dir -patchlist=<jarName> -prod_dir=$WLS_HOME

Start and Stop of oracle database on Linux

 connect to db using sqlplus

connect sys as sysdba

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.


SQL> startup
ORACLE instance started.

Total System Global Area 1879048192 bytes
Fixed Size            2925696 bytes
Variable Size          637537152 bytes
Database Buffers     1224736768 bytes
Redo Buffers           13848576 bytes
Database mounted.
Database opened.
SQL>

How to run the weblogic server installer on linux

Download the 
wls1036_generic.jar

open the terminal and navigate to the directory where the installer is placed

type the following command

$JAVA_HOME/bin/java -d64 -Xmx1024m -jar wls1036_generic.jar

Tuesday, September 8, 2015

Node not found Error while running the Database installer on Linux server

This error is happening if the /etc/hosts file does not contain an entry of your server.

Append your server entry in the following format

IPADDRESS<space> HOSTNAME<space>ANY_ LOGICAL_NAME_FOR_HOSTNAME

[oracle@fmw12c windowsdrive]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.2.15 yourhostname yourhostname