Monday May 14, 2012

Finding the Right Patchset

I'm always surprised at how hard it is to find the right patchsets when looking to do an upgrade.

So I thought I would make a blog entry that makes it easy to find the right patches starting from 11.1.1.4. The following list are documents that provide the required patches for the associated upgrades:

11.1.1.4
11.1.1.5
11.1.1.6
11.1.1.7

I will update as more patchsets become available.

If you are looking for patch install instructions please refer to the following blog entry:

Upgrading Fusion Middleware

Happy upgrades


Wednesday Feb 23, 2011

Upgrading Fusion Middleware 11.1.1.x to 11.1.1.4

This is a follow on from my previous post where we upgraded 11.1.1.2 to 11.1.1.3. The instructions I provide here will work for Fusion Middleware 11.1.1.2 and 11.1.1.3 wanting to upgrade to 11.1.1.4.

In this example I’m just upgrading SOA Suite on OEL 64bit but the steps will be the same, some of the downloads may be different based on your environment.

To upgrade to 11.1.1.4 you need to have access to http://support.oracle.com as this is where the downloads reside. Oracle provides 11.1.1.4 as a standalone download so you can do a fresh install if required using OTN downloads (http://www.oracle.com/technetwork/indexes/downloads/index.html).

The high level steps to upgrade are as follows:

  • Download software
  • Shutdown your SOA Environment
  • Upgrade WLS to 11.1.1.4
  • Upgrade SOA Suite to 11.1.1.4
  • Upgrade OSB to 11.1.1.4
  • Upgrade MSD Schemas
  1. Identify the downloads you require for your install. You will need the WebLogic Server Upgrade and the additional product downloads. If you are using 64bit then use the generic version. The downloads are found from the following location - http://download.oracle.com/docs/html/E18749_01/download_readme.htm#BABDDIIC

    For the purpose of this post I downloaded the following patches
    11060985 – WLS Server Generic
    11060960 – SOA Suite
    11061005 – OSB Suite 
  2. Make sure you have set the Java executable in your PATH e.g.

    export PATH=$JAVA_HOME/bin:$PATH
  3. Make sure all your WebLogic environment has been shut down before performing the upgrade.
  4. Extract the WLS patch 11060985 to a temporary directory and start the installer

    java –jar wls1034_upgrade_generic.jar

    Please note if you are not running 64BIT then the upgrade executable will be just a bin file which you can execute directly.

    image
  5. Chose the right Oracle home for your WebLogic Server install.

    image
  6. In the Register for Security Updates you can enter your details or just click Next. If you do not enter details confirm that you don’t want to receive these updates

    image

    image
  7. Select the products you want to upgrade and select next. It is recommended that you accept the defaults.

    image
  8. Confirm the directories that will be upgraded

    image
  9. Upgrade of WLS ahs been completed

    image
  10. Extract your both SOA downloads to a temporary directory and run the installer found in Disk1

    ./runInstaller -jreLoc /java/jdk1.6.0_20/jre

    Please note that the java location and version may be different for your environment

    image
  11. Skip the Software Updates

    image
  12. Ensure your system meets the prerequisites

    image
  13. Set the Oracle home for your SOA install.

    image

    You will be asked to confirm that you want to upgrade, click Yes

    image
  14. Choose your application server. Since you are upgrading from 11.1.1.x you will be on WebLogic

    image
  15. Start the Install

    image
  16. Installation Upgrade of SOA Suite completed accept the default to finish.

    image


    image
  17. In my environment I have OSB installed so I need to upgrade this next. If you don’t have SOA Suite you can go straight to completing the DB Schema updates at Step 24. 
  18. Extract the OSB upgrade files to a temporary directory and execute the installer found in the Disk1 folder.
    ./runInstaller -jreLoc /java/jdk1.6.0_20/jre

    image

  19. Skip the software updates

    image
  20. Select the Oracle home for your environment

    image

    Accept the warning to continue the upgrade

    image
  21. Point to the location of your WebLogic Server installation

    image
  22. Install the OSB upgrade

    image
  23. Upgrade has been completed accept the defaults

    image

    image
  24. Change directory to $MW_HOME/oracle_common/bin where the Patch Set Assistant is installed
  25. Execute the following command to update the MDS schema. Please not for my examples I have the context set to DEV. your may be different. This means that all my schemas are prefixed by DEV.

    ./psa -dbType Oracle -dbConnectString 'localhost:1521:xe' -dbaUserName sys -schemaUserName DEV_MDS

    You will be asked you passwords for sys and the schema

    Enter the database administrator password for "sys":
    Enter the schema password for schema user "DEV_MDS":

  26. Change directory to $MW_HOME/Oracle_SOA1/bin to where the Patch Set Assistant is installed for SOA Suite.
    Execute the following command to update the SOA and BAM schemas

    ./psa -dbType Oracle -dbConnectString 'localhost:1521:xe' -dbaUserName sys -schemaUserName DEV_SOAINFRA
  27. To check that you have the installed correctly run the following SQL as sysdba.

    SELECT owner, version, status FROM schema_version_registry;

    OWNER                          VERSION                        STATUS
    ------------------------------ ------------------------------ -----------
    DEV_MDS                        11.1.1.4.0                     VALID
    DEV_SOAINFRA                   11.1.1.4.0                     VALID

    Don’t stress if the versions are not all sitting at version 11.1.1.4 as not all schemas need to be updated. The key ones are MDS and SOAINFRA

Monday Sep 13, 2010

Startup Scripts for WebLogic and SOA Suite

Yes I know there are many blogs and sites out there that have startup scripts for WebLogic. I have noticed that some are very detailed and maybe a bit complex for a newbe. Therefore goal of this post is to provide new administrators a basic startup script for WebLogic with an emphasis on SOA Suite. You should be able to use these scripts as a base to start building more complex scripts that accept parameters, or start clusters, etc.


  1. If you want Node Manager to restart a failed Managed server you must ensure that either the nodemanager.properties file or the startup.properties has the parameters AutoRestart=true and StartScriptEnabled=true. I believe this is set to true in the startup.properties by default. The nodemanager.properties file can be found in  $MW_HOME/wlserver_10.3/common/nodemanager
  2. I use 2 scripts to start WebLogic, a control shell script, which then calls a WLST script. For the purpose of this blog I have placed the scripts in the following directory.

    /home/oracle/scripts/weblogic/startup

  3. Create a scripts called startNM.sh in the directory your choice, e.g. /home/oracle/scripts/weblogic/startup
    here is a sample, adjust for your environment:

    MW_HOME=/u01/oracle/product/middleware

    $MW_HOME/oracle_common/common/bin/setNMProps.sh

    nohup $MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh > $MW_HOME/wlserver_10.3/common/nodemanager/nodemanager.out &

    nohup $MW_HOME/user_projects/domains/soa_domain/bin/startWebLogic.sh > $MW_HOME/user_projects/domains/soa_domain/servers/AdminServer/logs/AdminServer.out &

    . $MW_HOME/user_projects/domains/soa_domain/bin/setDomainEnv.sh

    java weblogic.WLST /home/oracle/scripts/weblogic/startup/startMS.py

    Please note that each command is separated by a empty line, therefore the nohup commands are one command until the &

  4. Now create the WLST script as called by the startNM.sh script above. Call it startMS.py:

    import time
    sleep=time.sleep
    print "#####################################"
    print "# Waiting for Admin Server to Start #"
    print "#####################################"
    while True:
    try:
    connect(adminServerName="AdminServer")
    break

    except:

    sleep(60)

    print "##############################"
    print "# Admin Server has come up #"
    print "##############################"

    print "##########################"
    print "# Starting SOA Server 1 #"
    print "##########################"

    start(name="soa_server1", block="true")

    print "##########################"
    print "# Starting OSB Server #"
    print "##########################"

    start(name="osb_server1", block="true")

    print "##########################"
    print "# Starting BAM Server #"
    print "##########################"

    start(name="bam_server1", block="true")

    exit()

When you use these scripts you will get errors in the WLST script while it waits for the AdminServer to come up this is to be expected so just ignore. I have set the retry for 60 seconds so it shouldn’t try too many times.

Also you may get an error like 'ERROR: transport error 202: bind failed: Address already in use'. This is caused because 2 managed servers are using the same debugging port. If this is the case then you can edit the setDomainEnv.sh file and turn debugging off. Do this by searching for debugFlag="true" and set it to false, e.g. debugFlag="false".

If you want a shutdown script, it is much the same but in reverse.


  1. Create a script called stopMN.sh in directory of your choice, e.g. /home/oracle/scripts/weblogic/shutdown:

    MW_HOME=/u01/oracle/product/middleware

    . $MW_HOME/user_projects/domains/soa_domain/bin/setDomainEnv.sh

    $MW_HOME/oracle_common/common/bin/setNMProps.sh

    java weblogic.WLST /home/oracle/scripts/weblogic/shutdown/stopMS.py

    nohup $MW_HOME/user_projects/domains/soa_domain/bin/stopWebLogic.sh > $MW_HOME/user_projects/domains/soa_domain/servers/AdminServer/logs/AdminServerShutdown.out &

  2. Create a WLST script in the same directory called stopMS.py:

    connect(adminServerName="AdminServer")

    exitonerror=false
    # Stop all managed Servers
    shutdown('soa_server1','Server', force="true")
    shutdown('osb_server1','Server', force="true")
    shutdown('bam_server1','Server', force="true")

    exit()

Happy scripting.

Tuesday Jun 08, 2010

Publish Static Content to WebLogic

This post has been updated to provide a more flexible approach to deploying static content 16.07.2012.

Most people know WebLogic has a built in web server. Typically this is not an issue as you deploy java applications and WebLogic publishes to the web. But what if you just want to display a simple static HTML page. In WebLogic you can develop a simple web application to display static HTML content.

In this example I used WLS 10.3.3. I want to display 2 files, an HTML file, and an xsd for reference.

  1. Create a directory of your choice, this is what I will call the document root.

    mkdir /home/oracle/html
  2. Download the war file here. This file creates a simple web app to expose the files.
  3. In the war file you will see a directory WEB-INF, inside there you will see 2 files, web.xml, and weblogic.xml. There is no need to edit these files but if you want to change the context or the directory edit the weblogic.xml file to match your environment.

    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-web-jar.dtd">

    <weblogic-web-app>

      <container-descriptor>
        <index-directory-enabled>true</index-directory-enabled>
      </container-descriptor>

      <virtual-directory-mapping>
        <local-path>/home/oracle/html</local-path>
        <url-pattern>*</url-pattern>
      </virtual-directory-mapping>

      <context-root>/html</context-root>

    </weblogic-web-app>

  4. Login to the WebLogic console to deploy application
  5. Click on Deployments
  6. Click on Lock & Edit
  7. Click Install and upload the war file downloaded in step 2

    image
  8. Leave default "Install this deployment as an application" and click Next

    image
  9. Select a Managed Server to deploy to and click Next

    image
  10. Accept the defaults and click Finish
  11. Deployment completes successfully, now click the Activate Changes

    image
  12. You should now see the application started in the deployments

    image
  13. You can now access your static content via the following URL

    http://localhost:7001/html/helloworld.html

    image
About

Discussions and Examples using Oracle Fusion Middleware. Some image links are broken when using Firefox, Safari, and Chrome. If you want to see the full image please use IE.

Twitter:@james8001

tumblr hit counter vistors, thanks for your support

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today