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

How to set java home in Linux

Open terminal on Linux box

Type the following commands.
Please note change the directory names as per your machine

export JAVA_HOME=/opt/java/jdk1.7.0_79/   
export JRE_HOME= /opt/java/jdk1.7.0_79/jre    
export PATH=$PATH:/opt/java/jdk1.7.0_79/bin:/opt/java/jdk1.7.0_79/jre/bin

Alternatively goto user home directory ( /home/oracle)

Type ls -a

This will list the .bash_profile file

open the .bash_profile using  vi  .bash_profile

add the following lines to .bash_profile

export JAVA_HOME=/opt/java/jdk1.7.0_79/   
export JRE_HOME= /opt/java/jdk1.7.0_79/jre    
export PATH=$PATH:/opt/java/jdk1.7.0_79/bin:/opt/java/jdk1.7.0_79/jre/bin

save the file

Now source the ./bash_profile

source .bash_profile

sqlplus command not found and ORACLE NOT FOUND after Database installed on Linux

After installing Oracle Database on Linux  machine, if you are getting command not found error on typing sqlplus, try the following

Open terminal and set the following properties

export ORACLE_HOME=/opt/app/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=DEV
export PATH=$PATH:$ORACLE_HOME/bin

alternatively goto /home/oracle  ( user home)

on the terminal type ln -a

This will show .bash_profile

open .bash_profile using vi command

vi .bash_profile

add the following line to .bash_profile

export ORACLE_HOME=/opt/app/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=DEV
export PATH=$PATH:$ORACLE_HOME/bin

save the file and run

source .bash_profile

Goto  /opt/app/oracle/product/12.1.0/dbhome_1/bin

 type lsnrctl start to start the db services

After setting this  open terminal  type sqlplus

The command not found error will not appear now

now type start this will start the database

$sqlplus > startup

sqlplus> connect / as sysdba

enter the username/password 

Now the ORACLE NOT FOUND error will disappear

Monday, September 7, 2015

Keyboard keys are not working in Unix Box. Slash / not working



On the Unix VM goto Menu

Goto System->Preference->Keyboard

Goto Layout

Choose Keyboard model as per your laptop model and choose the layout as English


How to map a shared drive from Windows host to Unix VM

To map a Windows drive to UNIX VM perform the following steps

On Windows
------------------------
1. Create a folder in windows called VM_SHARED

2.Click on properties go to Sharing. Go to Advanced sharing and select Share this folder.

   Click OK/Apply.




On Unix VM
-------------------------

1. Go to Device Menu
2. Click on Insert Guest Additions CD Image





 3. Alternatively go to the directory of the Guest Additions CD and click on the autorun.sh


 4. Once the Guest Additions are successfully installed. Restart both Unix and Windows systems

 After restarting the host windows system and unix VM,  
 ---------------------------------------------------------------------
 1.Go to Device Menu on the Unix VM

2 .Choose the Shared Folders- > Shared Folder Setting



3. Choose the path of the windows folder created on step 1. Give a logical name to the shared folder as ‘VM-SHARED’

4. open the terminal

 Change to root user

 Create a directory called windowsdrive under home directory

Now mount this directory to the shared windows folder as given below

sudo mount -t vboxsf VM_SHARED /home/windowsdrive



Now if you place a file under the VM_SHARED directory in windows, it will be visible in the  /home/windowsdrive







Monday, July 6, 2015

ArchiveMessageUnable to deliver to following address(es): Reason: Invalid Addresses

To send email from SOA server is an easy job if we follow the steps carefully. Otherwise It can sometimes become nightmare to debug the issue. For e.g even if we configure the details on the email driver in em console still there could be an issue while trying to send email . One of the most common error is Reason: Invalid Addresses.

Obviously we will think this is due to the invalid recipient address. But this could be due to invalid configuration of the email driver.

To configure email in soa suite we need to do the following steps

1. configure email driver properties

  •    Open em console
  •    Goto UserMessagingService
  •    Click on UserMessageingDriver(SOA)
  •    Edit Email Driver Configuration


   Give the following properties in the email driver configuration screen

  •   Sender Address ( format EMAIL:<the sender's email address> (This step is mandatory to send the email successfully)
  •   Outgoing SMTP Server
  •   Outgoing SMTP Port
  •   The user account(email) to authenticate the smtp server
  •   The password for the above email address


Apply Changes

2.Open Em Console

    Right click on SOA Infra
    Choose SOA Administration->WorkFlow Properties


  •    1.Set the NotificationMode as EMail
  •    2. Set the sender  email address, reply to email address, alternate email address
  •     Note( Ensure the sender address in the email driver and the one in WorkFlow properties exactly match)


Apply changes

3. Restart the managed server ( very important step)

4. How To Test Email Notification ( after server restart)

  • 1. Goto em console
  • 2. Right click on soa-infra and select ServiceEngine->humanworkflow
  • 3. Goto Notification Management Tab
  • 4. Click on Test Notification
  • 5. Give the recipient email address, subject, message body etc.. choose the notification type as EMail
  • 6. Click on Sent Button. 
  • 7.The status should show as SENT
  • 8.Check your inbox whether you got the email  


Tuesday, April 14, 2015

Index or paramter passed to XSL not working while using as xpath predicate

Some time we want to pass the index of a node as a parameter to XSL. Inside the xsl we want to use that particular index to get the right node from a complex xml document.

There are many blogs already explaining how we can achieve this.

But there is a small catch in that approach. Here I am trying to explain how we can over come that issue.

As described in other blogs, the steps to pass parameters are as shown below.

1) Defining a parameter.xsd.

Parameter.xsd
----------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://schemas.oracle.com/parameters"
            targetNamespace="http://schemas.oracle.com/parameters"
            elementFormDefault="qualified">
 <xsd:element name="parameters">
    <xsd:complexType>
      <xsd:sequence>    
              <xsd:element name="startIndex" type="xsd:string"/>
              <xsd:element name="endIndex" type="xsd:string"/>
            </xsd:sequence>  
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

2) Define a bpel variable of type parameter

 <variable name="parameters" element="ns3:parameters"/>

Note: Ensure you import the target names space in our BPEL file
 xmlns:ns3="http://schemas.oracle.com/parameters"

3) Initialize the values in the above variable
<assign name="Init">
        <copy>
                <from expression="number(3)"/>
                <to variable="parameters"
                    query="/ns3:parameters/ns3:startIndex"/>
            </copy>
 </assign>

4) Pass the  variable to xsl transform function.

 <from expression="ora:doXSLTransformForDoc('xsl/xForm_CustomerOrder_To_FulfillmentOrder.xsl', $inputVariable.payload, 'parameters', $parameters)"/>

5) Inside the xsl file extract the parameters and use it in the xpath expression to pick the right node.

 <xsl:variable name="startIndex" select="$parameters/ns1:parameters/ns1:startIndex"/>
 <xsl:variable name="endIndex" select="$parameters/ns1:parameters/ns1:endIndex"/>

 Inside the xsl file  if you are using this parameter value as positional search. e.g  CustomerOrder/OrderLine[$startindex]  it will not work


To make it working we need to type cast the above  values to number while assigning to the xsl variable

 <xsl:variable name="startIndex" select="number($parameters/ns1:parameters/ns1:startIndex)"/>
 <xsl:variable name="endIndex" select="number($parameters/ns1:parameters/ns1:endIndex)"/>

Then it will work for positional search. If it is a text based search then this type casting is not required.

How to prevent auto compilation in JDev 12c. How to stop Live Issues Tab popping up

It is very noisy that the auto compilation prevents us modifying the code as the window of Live Issues tab keeps on coming up.

I read in few blogs that this issue can be resolved by setting the SaveAction properties to null in the Jdev->Tools->Preferences



But even after setting this in my JDev the code was getting auto compiled and the Live Issues tab was keeps on coming.

So the simplest way to solve this is to divide your screen. Just drag the Live Issues tab down to your Process tab. In such a way that the Live issues will be shown at the bottom of the page. This will help you to work on the code and watch the issues simultaneously



Tuesday, January 13, 2015

HTTP Request error during 'Submitting Data Send HTTP request': 'Status code - 500'

If you encounter an HTTP 500 error while invoking an OSB service from Siebel, check the Response Flow or Error Flow in the pipeline . See whether you are using a Reply with failure. If so change it to Reply with success