Wednesday, November 30, 2011

Weblogic aceess.log into Oracle DB via SQL Loader

User access statistics help a lot to see how an application is being utilized by its user community. However querying on user statistics become lot easier if they are loaded into a relational DB such as Oracle. Below is an example of how to load access.log written at weblogic using "common" format. This is the default one. Below scripts can be easily modified for extended or combined formats as well. These can also be used to load apache access_log files:


create table weblogic_access_log (
    ip_address     char(20)     ,
    user_inf       char(20)     ,
    user_id        char(100)     ,
    req_date       char(60)     ,
    request        varchar2(4000),
    status_cd      char(10)     ,
    res_size       char(10)
  )



Install an oracle client for SQLLDR and TNS utilities on your desktop. Create a connection to your db. For example, here i created a connection called KPSOFT_DB1. Schema name is weblogic_logs.


Download weblogic access.log to a directory called weblogic_logs on your desktop. 

Below is the control file, weblogic_control_file.ctl 
save this file to the same folder where the logs are downloaded on your desktop

load data                           
infile  'access.log'
infile  'access.log00001'
infile  'access.log00002'
infile  'access.log00003'
infile  'access.log00004'
infile  'access.log00005'
infile  'access.log00006'
infile  'access.log00007'
infile  'access.log00008'
badfile 'accesslog.bad'
discardfile 'accesslog.dsc'
append                              
-- insert, APPEND,REPLACE,TRUNCATE
into table weblogic_logs.weblogic_access_log    --
(  ip_address   position(*) char terminated by whitespace                 
 , user_inf     position(*) char terminated by whitespace
 , user_id      position(*) char terminated by whitespace 
 , req_date     position(*) char enclosed by '[' and ']'        
 , request      position(*) char enclosed by '"' and '"'
 , status_cd    position(*) char terminated by whitespace
 , res_size     position(*) char terminated by whitespace
)

Open a command prompt on your desktop and cd to the folder where logs and control file are downloaded, make sure your paths are set correctly to access sqlldr utility. run the following command:


sqlldr weblogic_logs/welcome1@KPSOFT_DB1 control=weblogic_control_file.ctl errors=500


errors could be resulted in case the data int eh file exceeds the delimitation or the width specified in the table.


Files are now loaded into the table for easier querying and even joining with your identity management tables.






Wednesday, November 23, 2011

Oracle Weblogic 12c???

Oracle is unveiling its weblogic 12c release. Please register for the anouncement and details provided by the product management team here.  Optimizations during runtime of your enterprise fusion middleware applications, leveraging of JEE 6 Active GridLink for RAC, Traffic Directory and Assembly Builder appear to be the focus.

With 12c release enterprise applications appear to be more cloud deployment ready with close tie in of your on-premise deployments with oracle-exalogic-weblogic cloud runtimes. Some components that are key to the upcoming architecture are:

Oracle Traffic Director - This is a load balancer traditionally speaking similar to BIG-IP in some sense that reroutes traffic to underlying cluster and does SSL encryption in a high performing way. However Oracle is tying this technology with interfacing with Oracle VM as an appliance with 40GBps infiniband connections. Does your enterprise require this kind of power for managing your traffic. The key here is that these days traffic is not external, relatively lightweight when it comes to payload. Most internal operations are not made to run on high available clusters. However, enterprise are moving this way slowly. In all such cases you would need all the bandwidth that you could get for running internal data intensive, service intensive (SOA for example) operation.

Active GridLink - Serious enterprise application developers know how badly applications need a highly available database for a successful OLAP/OLTP operation to run that meets an SLA. Traditionally, weblogic clusters run your enterprise applications that link to Oracle DB RAC solution with multi data source with XA support for example. GridLink data source manages connection internally and guards applications from losing connections when there is a controlled shutdown of RAC instances is being performed. In such scenarios the connections are directed to the least loaded database server followed by a re-balancing of connection when the new node is added to teh cluster.


Assembly Builder - Oracle Virtual Assembly Builder is designed to help organizations quickly create and configure entire multi-tier application topologies and provision them onto virtualized resources. It enables IT organizations to take multi-tier enterprise applications—for example, a web server, application server, and database—and package them into self-contained, single-purpose virtual machines called software appliances. Going further, Oracle Virtual Assembly Builder structures the process of combining these appliances into cohesive, reusable units known as assemblies. It makes the necessary connections between these appliances and then deploys the entire assembly—which comprises the complete multi-tier application—as a single unit. When that assembly is deployed, the components are configured automatically.

Let's wait to listen to Oracle for these features, their licensing aspects and their rollout into other fusion middleware suite of applications. I will follow up with more runtime implementation details as i find time.

Tuesday, November 22, 2011

OAM 11.1.1.3 security error codes

Oracle Access Manager returns a distinct set of error codes for various types of deployment. Types include SECURE, INTERNAL, EXTERNAL and OSSO10g. Most environments use EXTERNAL mode for their deployment. The error codes and their message can retrieved via the ResourceBundle as shown below:

ResourceBundle msgBundle  = ResourceBundle.getBundle(defaultResourceBundle, myLocale);

  final String defaultErrorCode = "DEFAULT_ERR_MESSAGE";
  String simpleMessage = msgBundle.getString(defaultErrorCode);
  // if redirection due to error happened
  String errCode = request.getParameter(GenericConstants.ERROR_CODE);
  if(errCode != null) {
    try {
      simpleMessage = msgBundle.getString(errCode);
    }
    catch(Exception e) {
      //ignore. simpleMessage will be set to the default
    }
  }

Overall Error codes and their messages are described below for convenience. Detailed information can be found in Oracle® Fusion Middleware Administrator's Guide for Oracle Access Manager with Oracle Security Token Service document. These codes can be used for customizing messages instead of using the messages from resourcebundle implementation.

External Error Code Trigger Condition Recommended Display Message
OAM-1
Invalid login attempts less than the allowed count.
An incorrect Username or Password was specified
OAM-2
Invalid login attempts less than the allowed count.
An incorrect Username or Password was specified
OAM-3
Processing submitted credentials fails for some reason. For example: in WNA mode, the SPENGO token is not received.
Internal Error.
OAM-4
An authentication exception is raised for some reason.
System error. Please contact the System Administrator.
OAM-5
The user account gets locked because of certain conditions (exceeded invalid attempts, for instance).
OIM Integration. The Error page appears with contact details after the password is validated.
The user account is locked or disabled.
Please contact the System Administrator.
OAM-5
The user account gets locked because of certain conditions (exceeded invalid attempts, for instance).
OID Without OIM Integration: The Error page appears with contact details after the password is validated.
The user account is locked or disabled.
Please contact the System Administrator.
OAM-5
The user account is disabled.
The user account is locked or disabled.
Please contact the System Administrator.
OAM-6
The user has exceeded the maximum number of allowed sessions, which is a configurable attribute.
The user has already reached the maximum allowed number of sessions. Please close one of the existing sessions before trying to login again.
OAM-7
Failure could be due to multiple reasons; the exact reason is not propagated to the user level for security reasons. For instance:
  • The request ID could have been lost
  • The certificate is not retrieved correctly
The default error message is displayed when no other specific messages are propagated up.
System error. Please re-try your action. If you continue to get this error, please contact the Administr

Monday, November 14, 2011

JMX coding with weblogic

There are several ways to monitor and create alerts for weblogic based Oracle Fusion middleware infrastructure. Prime among these are: 1) Java JMX coding and custom development 2) WLDF/WLST Scripting  3) Loading open source frameworks such as Spring JMX into weblogic console and 4) FMW enterprise grid control weblogic plug-ins. In this article we discuss monitoring of weblogic using some samples. Please note that wlclient.jar, wlfullcleint.jar and wljmxclient.jar from your fusion middleware WL_HOME environment are required for this code to run. In the future i will discuss and provide some samples for options 2 and 3.

Please note that here t3 protocol is used. If you want to make your JMX code generic you must use RMI instead. But additional steps may be necessary for enabling this protocol on your FMW weblogic environment. Out of the box implementations of any of the above mentioned methods can only provide generic status of the services. The root cause analysis of issues that business line managers would like to be on top-of are always possible only with customization. Efforts of development depends on complexity of the modules deployed on weblogic domains, clusters, resources (JMS, JDBC etc).


1) Java JXM coding
package com.tns.ea.infra.monitor.jmx;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Hashtable;
import javax.management.MBeanServerConnection;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;

public class MonitorOimServer {

    private static MBeanServerConnection connection;
    private static JMXConnector connector;
    private static final ObjectName service;

    // Initializing the object name for DomainRuntimeServiceMBean
    // so it can be used throughout the class.
    static {
        try {
            service = new ObjectName(
                    "com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
        } catch (MalformedObjectNameException e) {
            throw new AssertionError(e.getMessage());
        }
    }
   
   
    /* * Initialize connection to the Domain Runtime MBean Server */
    public static void initConnection(String hostname, String portString,
            String username, String password) throws IOException,
            MalformedURLException {
        String protocol = "t3";
        Integer portInteger = Integer.valueOf(portString);
        int port = portInteger.intValue();
        String jndiroot = "/jndi/";
        String mserver = "weblogic.management.mbeanservers.domainruntime";
        JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,
                jndiroot + mserver);
        Hashtable h = new Hashtable();
        h.put(Context.SECURITY_PRINCIPAL, username);
        h.put(Context.SECURITY_CREDENTIALS, password);
        h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
                "weblogic.management.remote");
        connector = JMXConnectorFactory.connect(serviceURL, h);
        connection = connector.getMBeanServerConnection();
    } /*
     *  * Print an array of ServerRuntimeMBeans. * This MBean is the root of the
     * runtime MBean hierarchy, and * each server in the domain hosts its own
     * instance.
     */

    public static ObjectName[] getServerRuntimes() throws Exception {
        return (ObjectName[]) connection
                .getAttribute(service, "ServerRuntimes");
    }
  
    public static ObjectName getObjectName(ObjectName obName, String attName)
            throws AttributeNotFoundException, InstanceNotFoundException,
            MBeanException, ReflectionException, IOException {
        return (ObjectName) connection.getAttribute(obName, attName);
    }
   
    public static String getObjectNameAsString(ObjectName obName, String attName)
            throws AttributeNotFoundException, InstanceNotFoundException,
            MBeanException, ReflectionException, IOException {
        return (String) connection.getAttribute(obName, attName);
    }

    public static ObjectName[] getObjectNames(ObjectName obName, String attName)
            throws AttributeNotFoundException, InstanceNotFoundException,
            MBeanException, ReflectionException, IOException {
        return (ObjectName[]) connection.getAttribute(obName, attName);
    }

    /* * Iterate through ServerRuntimeMBeans and get the name and state */
    public void printOimServerInformation() throws Exception {
        ObjectName[] serverRT = getServerRuntimes();
        System.out.println("got server runtimes");
        int length = (int) serverRT.length;
        for (int i = 0; i < length; i++) {
            String name = (String) connection.getAttribute(serverRT[i], "Name");
            String state = (String) connection.getAttribute(serverRT[i],
                    "State");
            System.out.println("Server name: " + name + ".   Server state: "
                    + state);
        }
    }

     public void printDataSources () throws Exception {
        ObjectName[] serverRT = getServerRuntimes();
        System.out.println("got server runtimes");
        int length = (int) serverRT.length;
        for (int i = 0; i < length; i++)
 {
            String name = (String) connection.getAttribute(serverRT[i], "Name");
            ObjectName[] appRT = (ObjectName[]) connection.getAttribute(
                    new ObjectName("com.bea:Name=" + name + ",ServerRuntime="
                            + name + ",Location=" + name
                            + ",Type=JDBCServiceRuntime"),
                    "JDBCDataSourceRuntimeMBeans");
            int appLength = (int) appRT.length;
            for (int x = 0; x < appLength; x++) {
                System.out.println("\n……..           .<" + name
                        + "   : JDBCDataSourceRuntimeMBeans>"
                        + (String) connection.getAttribute(appRT[x], "Name")
                        + "……….");
                System.out.println("ActiveConnectionsCurrentCount : "
                        + connection.getAttribute(appRT[x],
                                "ActiveConnectionsCurrentCount"));
                System.out.println("ActiveConnectionsAverageCount : "
                        + connection.getAttribute(appRT[x],
                                "ActiveConnectionsAverageCount"));
                System.out.println("ActiveConnectionsAverageCount : "
                        + connection.getAttribute(appRT[x],
                                "ActiveConnectionsAverageCount"));
                System.out.println("ConnectionsTotalCount         : "
                        + connection.getAttribute(appRT[x],
                                "ConnectionsTotalCount"));
                System.out.println("CurrCapacity                    : "
                        + connection.getAttribute(appRT[x], "CurrCapacity"));
                System.out.println("CurrCapacityHighCount         : "
                        + connection.getAttribute(appRT[x],
                                "CurrCapacityHighCount"));
                System.out.println("HighestNumAvailable           : "
                        + connection.getAttribute(appRT[x],
                                "HighestNumAvailable"));
                System.out.println("HighestNumAvailable           : "
                        + connection.getAttribute(appRT[x],
                                "HighestNumAvailable"));
                System.out.println("LeakedConnectionCount         : "
                        + connection.getAttribute(appRT[x],
                                "LeakedConnectionCount"));
                System.out.println("WaitSecondsHighCount          : "
                        + connection.getAttribute(appRT[x],
                                "WaitSecondsHighCount"));
                System.out.println("WaitingForConnectionCurrentCount: "
                        + connection.getAttribute(appRT[x],
                                "WaitingForConnectionCurrentCount"));
                System.out.println("WaitingForConnectionFailureTotal: "
                        + connection.getAttribute(appRT[x],
                                "WaitingForConnectionFailureTotal"));
                System.out.println("WaitingForConnectionTotal     : "
                        + connection.getAttribute(appRT[x],
                                "WaitingForConnectionTotal"));
                System.out.println("WaitingForConnectionHighCount : "
                        + connection.getAttribute(appRT[x],
                                "WaitingForConnectionHighCount"));
                System.out.println("…………………………………………………………………..\n");
                String poolName = (String) connection.getAttribute(appRT[x],
                        "Name");
                ObjectName jdbcSystemResource = new ObjectName("com.bea:Name="
                        + poolName + ",Type=JDBCSystemResource");
                ObjectName jdbcDataSourceBean =  getObjectName(
                        jdbcSystemResource, "JDBCResource");
                ObjectName jdbcDriverParams =  getObjectName(
                        jdbcDataSourceBean, "JDBCDriverParams");
                ObjectName jdbcProperties =  getObjectName(
                        jdbcDriverParams, "Properties");
                ObjectName[] jdbcPropertyBeans = getObjectNames(
                        jdbcProperties, "Properties");
                for (int j = 0; j < jdbcPropertyBeans.length; j++) {
                    ObjectName jdbcPropertyBean = null;
                    jdbcPropertyBean = jdbcPropertyBeans[j];
                    String jdbcPropertyName = getObjectNameAsString(
                            jdbcPropertyBean, "Name");
                    String jdbcPropertyValue = getObjectNameAsString(
                            jdbcPropertyBean, "Value");
                    System.out.println("\n\t===== j " + j + "\t"
                            + jdbcPropertyName + "\t" + jdbcPropertyValue);
                }
            }
        }
      
    }

     public void printApplicationStatus() throws Exception {
        ObjectName[] serverRT = getServerRuntimes();
        Hashtable server_states = new Hashtable();
        for (ObjectName ser : serverRT) {
            String serverName = (String) connection.getAttribute(ser, "Name");
            System.out.print("\tSERVER NAME: " + serverName);
            System.out.println("\t SERVER STATE: "
                    + (String) connection.getAttribute(ser, "State"));
            ObjectName[] appRT = (ObjectName[]) connection.getAttribute(ser,
                    "ApplicationRuntimes");
            // ApplicationRuntimeMBean appRun=(ApplicationRuntimeMBean)
            // connection.getAttribute(ser,"ApplicationRuntimes");
            System.out.println("\n\tTotal Applications Targeted On # "
                    + serverName + " # : " + appRT.length);
            for (ObjectName app : appRT) {
                String appName = (String) connection.getAttribute(app, "Name");
                // weblogic.health.HealthState healthState =
                // (weblogic.health.HealthState)
                // connection.getAttribute(app,"HealthState");
                // System.out.println("\t Health ="+healthState.getState());
                ObjectName[] componentRT = (ObjectName[]) connection
                        .getAttribute(app, "ComponentRuntimes");
                for (ObjectName compRT : componentRT) {
                    Integer stateInt = (Integer) connection.getAttribute(
                            compRT, "DeploymentState");
                    String name = (String) connection.getAttribute(compRT,
                            "Name");
                    String stateString = "" + stateInt;
                    if (stateInt == ComponentRuntimeMBean.ACTIVATED)
                        stateString = "ACTIVATED ";
                    if (stateInt == ComponentRuntimeMBean.NEW)
                        stateString = "NEW";
                    if (stateInt == ComponentRuntimeMBean.PREPARED)
                        stateString = "PREPARED ";
                    if (stateInt == ComponentRuntimeMBean.UNPREPARED)
                        stateString = "UNPREPARED ";
                    System.out.println("\n\tSTATE: " + stateString
                            + "      AppName: " + name);
                }
            }
        }

    }
  
    public static void main(String[] args) throws Exception {
        String hostname = "prasad.thekpsoft.com";
        String portString = "7001";
        String username = "weblogic";
        String password = "xxxx";
        MonitorOimServer s = new MonitorOimServer();
        initConnection(hostname, portString, username, password);
        s.printOimServerInformation();
        connector.close();
    }
}

x------------------------------------------------------x

2) WLDF Accessor for accessing WLDF harvester logs, same can be achieved by WLST Scripting as well.

package com.tns.ea.infra.monitor.jmx;

import java.util.Hashtable;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;

public class OimJmxAccessor {

    private static final String JNDI = "/jndi/";

    public static void main(String[] args) {

        String logicalName = "ServerLog";
        String query = "";

        try {
            MBeanServerConnection mbeanServerConnection = lookupMBeanServerConnection();
            ObjectName service = new ObjectName(
                    weblogic.management.mbeanservers.runtime.RuntimeServiceMBean.OBJECT_NAME);
            ObjectName serverRuntime = (ObjectName) mbeanServerConnection
                    .getAttribute(service, "ServerRuntime");
            ObjectName wldfRuntime = (ObjectName) mbeanServerConnection
                    .getAttribute(serverRuntime, "WLDFRuntime");
            ObjectName wldfAccessRuntime = (ObjectName) mbeanServerConnection
                    .getAttribute(wldfRuntime, "WLDFAccessRuntime");
            ObjectName wldfDataAccessRuntime = (ObjectName) mbeanServerConnection
                    .invoke(wldfAccessRuntime, "lookupWLDFDataAccessRuntime",
                            new Object[] { logicalName },
                            new String[] { "java.lang.String" });

            String cursor = (String) mbeanServerConnection
                    .invoke(wldfDataAccessRuntime, "openCursor",
                            new Object[] { query },
                            new String[] { "java.lang.String" });

            int fetchedCount = 0;
            do {
                Object[] rows = (Object[]) mbeanServerConnection.invoke(
                        wldfDataAccessRuntime, "fetch",
                        new Object[] { cursor },
                        new String[] { "java.lang.String" });

                fetchedCount = rows.length;

                for (int i = 0; i < rows.length; i++) {
                    StringBuffer sb = new StringBuffer();
                    Object[] cols = (Object[]) rows[i];
                    for (int j = 0; j < cols.length; j++) {
                        sb.append("Index " + j + "=" + cols[j].toString() + " ");
                    }
                    System.out.println("Found row = " + sb.toString());
                }
            } while (fetchedCount > 0);

            mbeanServerConnection.invoke(wldfDataAccessRuntime, "closeCursor",
                    new Object[] { cursor },
                    new String[] { "java.lang.String" });
        } catch (Throwable th) {
            th.printStackTrace();
            System.exit(1);
        }

    }

    private static MBeanServerConnection lookupMBeanServerConnection()
            throws Exception {

        // construct JMX service URL
        JMXServiceURL serviceURL;
        serviceURL = new JMXServiceURL("iiop", "prasad.thekpsoft.com", 7001,
                JNDI + "weblogic.management.mbeanservers.runtime");

        // Specify the user, password, and WebLogic provider package
        Hashtable h = new Hashtable();
        h.put(Context.SECURITY_PRINCIPAL, "weblogic");
        h.put(Context.SECURITY_CREDENTIALS, "xxxxxx");
        h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
                "weblogic.management.remote");
        // Get jmx connector
        JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h);

        // return MBean server connection class
        return connector.getMBeanServerConnection();

    } // End - lookupMBeanServerConnection
}


Wednesday, November 9, 2011

oracle opmnctl - can not resolve fmwtesting.thekpsoft.com for interface any

Most of the times either on a VM or on linux O/S on a desktop or laptop static IP is not provisioned. Rest of the Oracle Fusion Middleware software and the DB is okay with this from installation, configuration and runtime standpoint.  However, legacy AS Instance and associated opmnctl has significant issues either during installation or the runtime.

"AS instance" installation fails saying the ORACLE_INSTANCE is not empty or does not start with error like "can not resolve fmwtesting.thekpsoft.com for interface any" on DHCP machines. In these cases the workaround that i use is to update /etc/hosts file everytime i hook it up to the network. For example:

192.168.1.10 fmwtesting.thekpsoft.com
::1 fmwtesting.thekpsoft.com

Hope oracle provides a workaround for this at some point or let go of opmnctl :) finally.

Friday, November 4, 2011

OHS Infront of OAM/OIM 11.1.1.3

the steps below are tested with OHS 11.1.1.3 on a OAM/OIM 11.1.1.3 environment. Please verify with oracle for certification and associated install guide for different versions. Oracle software was installed on linux 64-bit server with a static IP. for dynamic IPs make sure your /etc/hosts is configured correctly. Otherwise asinstance (OHS, WebCache, OPMN) will fail with errors later..

1. create oraweb user and add user to oinstall group or oraweb group
2. download and unzip ofm_webtier_linux_11.1.1.2.0_64_disk1_1of1.zip
3. Run /home/oraweb/software/webtier/webtier11112/Disk1/runInstaller
4. select "Install Software - Do not configure" option,
5. click next for pre-requisite checks, address and click next if issues are found
6.  select oracle middleware home - /home/oraweb/oracle/middleware
and Oracle Home Directory - Oracle_WT1 for example
7. select approriate option to receive oracle update, i unchecked option to receive updates via oracle support
8. monitor installation progress and verify installation summary
9. Run /home/oraweb/software/webtier/webtier11113/Disk1/runInstaller
10. Select the same Oracle Middleware Home and Oracle Home Directory as documented above.
11. continue with the install  
12. run /home/oraweb/oracle/middleware/Oracle_WT1/bin/config.sh
13. I selected oracle http server (you can select webcache and weblogic components if you want to)
14. give the instance home location, instance name and ohs component name
15. select autoport configuration and monitor installation progress
16. click finish to finalize the installation
17. login or su as root and change listen port to 80 in httpd.conf
18. run the following commands from oracle/middleware/Oracle_WT1/ohs/bin
     chown root .apachectl
     chmod 6750 .apachectl
19. If you want to integrate OHS with OAM 11.1.1.3 run the steps below:
20.     Login to oamconsole and create a 10g webgate
21.  enter logout url contents
22. update IDMDomain as preferred host if both IAM and OAM are installed on the same machine
23. Install webgate on the OHS just created, i used ofm_oam_webgates_linux_10.1.4.3.0_64_disk1.zip for this posting
24. review the pre-requisites for 10g webgate installation in oracle oam administrator's guide and make sure  OAM10_1_4_3_0_linux64_GCC_libstdc++.so.5 gcc libraries are installed in /usr/lib64 or /usr/lib
25.running webgate
26. provide username - oraweb
27. provide a webgate directory name - /home/oraweb/oracle/middleware/oam/webgate
28. create softlinks in /usr/lib64 if gcc files are not there
29. provide location of gcc runtime libraries - /usr/lib64
30. select open mode for webgate http transport mode (based on how you configured 10g webgate on the oam server console.
31. provide webgate id - OHSWebgate
32. provide access server id - wls_oam1
33. access server host - fmwtesting.thekpsoft.com
34. port number where access server is running - 5575
35. directory of the httpd.conf - /home/oraweb/oracle/middleware/Oracle_WT1/isntances/isntance1/config/OHS/FMWTestingOIMohs1/httpd.conf
36. accept defaults for everything else.
37. wait for the webgate install to complete.
38. update mod_wl_ohs.conf
<IfModule weblogic_module>
#      WebLogicHost <WEBLOGIC_HOST>
#      WebLogicPort <WEBLOGIC_PORT>
#      Debug ON
#      WLLogFile /tmp/weblogic.log
#      MatchExpression *.jsp
   RewriteEngine On
   RewriteOptions inherit
   RewriteRule ^/console/jsp/common/logout.jsp /oamsso/logout.html [PT]
   RewriteRule ^/em/targetauth/emaslogout.jsp /oamsso/logout.html [PT]

       WebLogicHost  fmwtesting.thekpsoft.com
       Debug ON

   <Location /console>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7001
   </Location>

  <Location /consolehelp>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7001
   </Location>

   <Location /em>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7001
   </Location>

   <Location /oamconsole>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7001
   </Location>
   <Location /apm>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7001
   </Location>

   <Location /oinav>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7001
   </Location>

   <Location /odsm>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 7005
   </Location>

   <Location /oam>
      SetHandler weblogic-handler
      WebLogicHost fmwtesting.thekpsoft.com
      WeblogicPort 14100
   </Location>

# oim admin console(idmshell based)
   <Location /admin>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
   </Location>

# oim self and advanced admin webapp consoles(canonic webapp)

  <Location /oim>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
   </Location>
# SOA Callback webservice for SOD - Provide the SOA Managed Server Ports
  <Location /sodcheck>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
   </Location>

# Callback webservice for SOA. SOA calls this when a request is approved/rejected
# Provide the SOA Managed Server Port
  <Location /workflowservice>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
  </Location>

# xlWebApp - Legacy 9.x webapp (struts based)
   <Location /xlWebApp>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
  </Location>
# Nexaweb WebApp - used for workflow designer and DM
  <Location /Nexaweb>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
  </Location>

# used for FA Callback service.
  <Location /callbackResponseService>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
  </Location>
# spml xsd profile
  <Location /spml-xsd>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
  </Location>

  <Location /HTTPClnt>
    SetHandler weblogic-handler
    WLCookieName    oimjsessionid
    WebLogicHost fmwtesting.thekpsoft.com
    WeblogicPort 14000
    WLLogFile "${ORACLE_INSTANCE}/diagnostics/logs/mod_wl/oim_component.log"
  </Location>




</IfModule>

# <Location /weblogic>
#      SetHandler weblogic-handler
#      PathTrim /weblogic
#      ErrorPage  http:/WEBLOGIC_HOME:WEBLOGIC_PORT/
#  </Location>