Weblogic Scripting Tool (WLST) Fundamentals

  • WLS command-line tools are useful :

- For automating common administrative activities
- As an alternative to the Administration Console
- When Graphical tools are not supported


  • WLST provides a command-line interface for :

- Creating new weblogic Domains
- Retrieving and updating Weblogic Domain Configurations
- Deploying Applications
- Obtaining run-time server statistics


  • WLST is implemented using Jython which in turn is a Java implementation of the Python scripting Languages:

-simple and clear syntax
-indentation to structure code
-interactive command mode
-custom commands
-integration with any Java libraries


Which Weblogic Version Should be Used With Oracle Rapid Planning ?

When installing Weblogic Server (WLS) in order to deploy Oracle Rapid Planning, which version of Weblogic should be used along with Application Developer Framework (ADF)?


Solution

The table below indicates which weblogic version and ADF runtime is required for each VCP patch level.
 
Rapid Planning VersionWeblogic VersionADF Runtime patchset
12.1.3.3 and below10.3.2PS1 (11.1.1.2)
12.1.3.4 until 12.1.3.810.3.4PS3 (11.1.1.4)
12.1.3.910.3.6PS5 (11.1.1.6)
12.1.3.9.110.3.6PS5 (11.1.1.6)
12.210.3.4PS3 (11.1.1.4)
12.2.110.3.4PS3 (11.1.1.4)
12.2.210.3.6PS5 (11.1.1.6)
12.2.310.3.6PS5 (11.1.1.6)













 

Admin Server Fails To Start weblogic.security /w SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception Caused By: java.lang.NoSuchMethodError: javax/xml/transform/TransformerFactory.newInstance

The AdminServer.log shows:
#### <> <> <> weblogic.security.SecurityInitializationException: The loading of OPSS java security policy provider failed due to exception, see the exception stack trace or the server log file for root cause. If still see no obvious cause, enable the debug flag -Djava.security.debug=jpspolicy to get more information. Error message: javax/xml/transform/TransformerFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/transform/TransformerFactory;
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1402)
at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1022)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873)
at weblogic.security.SecurityService.start(SecurityService.java:141)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: java.lang.NoSuchMethodError: javax/xml/transform/TransformerFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/transform/TransformerFactory;
at oracle.security.jps.service.policystore.info.RuleExpressionEntry.(RuleExpressionEntry.java:1708)
at oracle.security.jps.internal.policystore.entitymanager.impl.PolicyRuleManagerImpl.(PolicyRuleManagerImpl.java:212)
at oracle.security.jps.internal.policystore.info.PolicyDomainEntryImpl.(PolicyDomainEntryImpl.java:111)
at oracle.security.jps.internal.policystore.JpsAppPolicy.(JpsAppPolicy.java:474)
at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.init(XmlPolicyStore.java:355)
at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.initDataStoreEntry(XmlPolicyStore.java:484)
at oracle.security.jps.internal.policystore.xml.XmlPolicyStore.buildFromFile(XmlPolicyStore.java:525)

Error While Upgrading Weblogic Domain Version 12.1.1 To 12.1.2 with error UPGWLS-03503

The reconfigure script to upgrade a WebLogic Server domain from version 12.1.1 to version 12.1.2 exits with an error. The issue seems to be with a custom Identity Asserter, in this case "Oracle Access Manager Identity Asserter." The error message is:
2014-02-11 09:12:44,752 INFO [AWT-EventQueue-0] com.oracle.cie.wizard.help.DefaultHelpProvider - Initializing help implementation....
2014-02-11 09:12:45,605 INFO [AWT-EventQueue-0] com.oracle.cie.domain.DomainRegistryWrapper - need to initialize domainRegistrydocument object
2014-02-11 09:13:35,547 WARNING [44] weblogic.upgrade.Upgrade - /web/oracle/Middleware/oracle_common/common/lib/:10:7: error: failed to load java type corresponding to t=oam-identity-asserterType@http://www.bea.com/ns/weblogic/90/security/extension
2014-02-11 09:13:35,550 SEVERE [Thread-4] com.oracle.cie.domain.WLSCoreReconfigurator - Reconfiguration failed
java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:601)
  at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:48)
  at com.oracle.cie.domain.WLSCoreReconfigurator.run(WLSCoreReconfigurator.java:150)
  at java.lang.Thread.run(Thread.java:722)
Caused by: weblogic.upgrade.UpgradeException: UPGWLS-03503: The domain configuration file {0} is not valid.
  at weblogic.upgrade.Upgrade.parseConfig(Upgrade.java:172)
  at weblogic.upgrade.Upgrade.upgradeDomain(Upgrade.java:118)
  ... 7 more
2014-02-11 09:13:35,551 SEVERE [Thread-4] com.oracle.cie.domain.WLSCoreReconfigurator - Reconfiguration Failed!

 

Problem Installing Oracle Commerce 11.1 On Weblogic 12.1.3

Problem Installing Oracle Commerce 11.1 On Weblogic 12.1.3

Commerce 11.1 was not installing via CIM with Weblogic 12.1.3 even though it is supported.

Cause

CIM fails as it is expecting Weblogic 12.1.2 as the OOTB Weblogic Application Server version.

Solution

You need to make a change as detailed below to the following file to allow CIM to progress with installation and configuration:
/atg/cim/productconfig/appserver/SupportedApplicationServer.properties

for example:

WEBLOGIC_SUPPORTED=12.1.2
WEBSPHERE_SUPPORTED=8.5.5.1
TOMCAT_SUPPORTED=6.0
JBOSS_SUPPORTED=6.1.0

WEBLOGIC_ALLOWED=12.1.2,12.1.3
WEBSPHERE_ALLOWED=8.5.5.1
TOMCAT_ALLOWED=6.1
JBOSS_ALLOWED=6.1.0

The properties file can be found  in:
CIM\lib\classes.jar\atg\cim\productconfig\appserver
Take a look at the Commerce Installation anc Configuration Guide and specifically the section on Application Server Configuration.

How to Migrate a WebLogic Domain from a 32 to a 64 bit JVM/Architecture?

Currently on 32 bit OS which presents a physical constraint when trying to allocate memory.

By limit, a 32 bit OS, will not be able to allocate more than 3 GB on a Linux environment, or 2 GB for Windows environment (not considering Physical Address Extension (PAE) implementation, which can increase the maximum allocatable memory).

When this limit is reached, a migration to a 64 bit architecture is recommended.

Below are the steps on how to install a 64 WebLogic Server version, along with a 64 Bit JVM and then how to migrate the domain to this new environment.

Solution

The versions that were used on this test case are the following:

Weblogic Server Version: WebLogic Server Version: 10.3.4.0
OS: Linux dalquint-cl.cl.oracle.com 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
JVM:java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Oracle JRockit(R) (build R28.1.1-13-139783-1.6.0_22-20101206-0136-linux-x86_64, compiled mode)


Setting Up, Using and troubleshooting a Weblogic 12c Cluster


In this post reader can easily understand the weblogic clustering concept. Topics Covered in this post are :

  1. What is a WebLogic Cluster?
  2. Set up & configuration
  3. Best practices
  4. Troubleshooting
  5. Dynamic Clustering (WLS 12.1.2 and up)
  6. Cluster Targeted JMS Servers (WLS 12.1.2 and up)

1. What is a WebLogic Cluster?

Multiple server instances running simultaneously and working together to transparently provide clients with increased scalability and reliability for servers, WebApp, WS, EJB apps, JDBC resources, JMS and more A cluster appears to clients to be a single server instance All clustered servers must run the same WLS version and belong to the same domain

Benefits of clustering

Failover : Objects copied to a secondary server that will finish the task in case the primary server is unavailable for any reason
Migration:  Relocation of a full server in the event of a failure
Load balancing :  Uninterrupted availability and even distribution of tasks  among instances

Load Balancing for HTTP clusters

Proxy Servers can be used to provide load balancing (round-robin by default) and failover for a cluster . Example: OHS, IIS, iPlanet

External Hardware LB .  Example: F5 Networks Big-IP

Basic Cluster Proxy Architecture

Basic Cluster Proxy Architecture

2. Setup and Configuration

Domain Configuration wizard

$WL_HOME/common/bin/config
Domain Configuration wizard

assign server to cluster

WebLogic Administration Console

WebLogic Administration Console

WebLogic Administration Console

Weblogic Scripting Tool (WLST)

connect('weblogic','weblogic', 't3://localhost:7001')
cd('/')
cmo.createCluster('MyCluster')
cd('/Clusters/MyCluster')
cmo.setClusterMessagingMode('unicast')
cmo.setClusterBroadcastChannel('')
cd('/')
cd('/Servers/MS1')
cmo.setCluster(getMBean('/Clusters/MyCluster'))
activate()
disconnect()
exit()

Configuration

  • Architecture
        Basic or multi-tier architecture :  The recommended multi-tier architecture uses one cluster to serve static HTTP content and clustered servlets, and one cluster to serve clustered EJBs

  • Proxy Plug-Ins or physical LB  
           – HttpClusterServlet, iPlanet, OHS or IIS

  • Messaging Mode
             Multicast or Unicast, to broadcast availability of services and heartbeats  IP sockets for peer-to-peer communications between instances
  • Replication Groups
             Preferred list of clustered instances to be used for storing session state  replicas
  • HTTP Sessions replication
              In-memory, file-based, JDBC-based persistence, Coherence*Web

3. Clustering Best Practices

             http://docs.oracle.com/cd/E24329_01/web.1211/e24425/best.htm

Recommendations

  • Admin server should not be part of a cluster  
            -->  Main purpose of this server is to perform the bulk of the processing for the domain
            -->  Administrative objects are not clusterable
  •  Http Session States need to persist in memory to enable automatic failover of servlets and JSPs
  • Deploy clusterable objects to the cluster, rather than to individual Managed Servers in the cluster

HTTP State Management Best Practices

  •  Create WLS machines if you are replicating the state across servers on different physical machines
  • Use replication groups to define the failover strategy
  • Choose the most appropriate replication strategy depending on the application needs and architecture
  • Use the ServerDebugConfig MBean to track session replication problems
  • Ensure that objects placed in replicated sessions are serializable

Managing HTTP Sessions in a Cluster

http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/12-ManageSessions--
4478/session.htm#sf4448924

Multicast vs Unicast

  • Unicast is better suited for small clusters (less than 20 instances)
  • With over 50 members, ensure that the network allows multicast
  • With 100 members, try to break up the domain into multiple separate domains and individual clusters for better administration and management even though Multicast option can handle such large domains

WebLogic Server Cluster Messaging Protocols

http://www.ateam-oracle.com/weblogic-server-cluster-messaging-protocols/

DataSource on Clusters

  • Targeting a data source to a cluster will not enable failover of connections - it will ease the process of reconnecting when a connection fails
  • Multi Data Source to guaranty data source failover  
  • JDBC is a highly stateful client-DBMS protocol, in which the DBMS connection and transactional state are tied directly to the socket between the DBMS process and the client (driver). For this reason, failover of a connection while it is in use is not supported
https://blogs.oracle.com/imc/entry/weblogic_datasource_on_clusters?sf4399938=1

4. TROUBLESHOOTING

Troubleshooting Replication Issues

  • Enabling Replication Debugs to Track Session Replication Failures, often overwhelming and filing up logs rapidly with complex data
  • Set the flags from the command line during server startup by adding the following options:
-Dweblogic.debug.<DebugName>=true in addition to
-Dweblogic.StdoutDebugEnabled=true


– DebugClusterAnnouncements
  • Debug each Announcement, StateDump, and Attributes msg sent or received by multicast
– DebugFailOver
  • Debug stub -level fail-over processing
– DebugReplication
  • Debug high-level cluster replication information
– DebugReplicationDetails
  • Debug low-level cluster replication information
– DebugCluster


Troubleshooting Multicast Issues

  • utils.MulticastTest
  • Set these flags from the command line during server startup by adding the following options:
-Dweblogic.debug.DebugCluster=true
-Dweblogic.debug.DebugClusterHeartBeats=true
-Dweblogic.debug.DebugClusterFragments=true

HTTP Load Balancing Problems in Cluster Using Proxy Plug-in

  • Configure the proxy plug-in to produce additional diagnostic data
– Enable proxy debug by setting Debug="ALL" in the proxy configuration file
– Enable proxy bridge by setting DebugConfigInfo="ON" in the proxy configuration file
  • Analyze the Proxy Log File and the Proxy Bridge Page
– http://webserver_host:port/path/xyz.jsp?__WebLogicBridgeConfig

  • Search for X-WebLogic-Cluster-List in proxy log to find when a truncated list has been returned from backend cluster node. Determine which backend cluster node has returned the truncated X-WebLogic-Cluster-List by following the preceding log entries for the same request
  • Look for "Exception objects created" under "Runtime statistics" on the proxy bridge page. If the count is greater than 0, then exceptions have occurred (logged in the proxy log)

    5. Dynamic Clustering (WLS 12.1.2 and up)

    • Introduced feature in WebLogic Server 12.1.2
    • Scale up dynamically the number of server instances in your domain
    • A dynamic cluster is any cluster that contains one or more dynamic servers

    Server template

    • Dynamic clusters are based on a single shared server template used to specify the configuration of dynamic servers
    • A dynamic cluster can be created via WLST 

    Creating Dynamic Clusters

    • Specify how many servers are needed at peak load and define a template to use as the base configuration those servers 
    • When additional server capacity is needed, you can then start a server instance without having to first manually configure it and add it to the cluster

    Limitations

    • Individual targeting is not supported
    • Server-specific configuration attributes (e.g. replication groups, user preferred server, hosting server etc)

    6. Cluster Targeted JMS Servers (WLS 12.1.2 and up)

    JMS Server and Cluster before 12.1.2

    • To leverage clustering capabilities of Weblogic JMS such as load balancing and high availability, you need to configure Distributed Destinations
    • Connection factories (resources that enable JMS clients to create JMS connections) can be deployed on multiple WebLogic Server instances
    • Connection factories are bound to the JNDI tree for multiple server instances

    Cluster Targeted JMS Servers

    • Targeting JMS Servers and optionally persistent stores directly to a cluster
    • Enable dynamic scaling of JMS resources in a dynamic cluster or the dynamic members of a mixed cluster (individually configured servers along with dynamic servers)

    Limitations

    • Consider known limitations before developing  applications using dynamic clusters and cluster targeted JMS Servers, example:
                   --No support for Automatic Server Migration (ASM)
                   --Store-and-Forward agents cannot be targeted to a dynamic or mixed server
                   --No support for Replicated distributed topics (RDTs) when any member destination is                           hosted on a cluster targeted JMS server

    Upgrading WebLogic 10.3.x (for PeopleTools 8.51-8.53) to a Newer Maintenance Pack (MP), Patch Level, and/or a Newer Java/JRockit Patch Level

    This document answers frequently asked questions regarding:
      1) Steps to Upgrading WebLogic to a newer maintenance pack and patch level
      2) Questions about Upgrading Java patch level for your WebLogic Install.
      3) Details on how to locate/download/install newer WebLogic Maintenance Packs, Patches and Java Patches

    This document is specifically for PeopleTools 8.51, 8.52 and 8.53 environments which are using WebLogic 10.3.x.

    Give me an overview of the steps to get updated to the latest WebLogic version and patch level. And explain the difference between Maintenance Packs and Patches
    If you are planning on upgrading WebLogic in your PeopleSoft environment, you need to keep in mind that there are actually three separate parts to the upgrade:
        Part #1: Upgrade the WebLogic Maintenance Pack (aka MP).
        Part #2: Upgrade the WebLogic Patch Level
        Part #3: Upgrade the Java (or JRockit) Patch Level

    Note that you do not have to complete each of the above parts. However, we do recommend that you complete each part, as this will get you fully up-to-date on all bug fixes and patches for security vulnerabilities.

    Below are additional details regarding WebLogic Maintenance Packs, WebLogic Patches and Java Patches, that are referenced in Part#1, 2 and 3 above.

    How to Find out if the Proxy Plugin is Outdated for WebLogic



    Often times, customers using a proxy server in front of WebLogic experience performance issues that turn out to be fixed by replacing the older plugin with the most current one provided by Oracle Middleware (Oracle WebLogic Server).

    To find out if your plugin is old, the best way to check the build date is by accessing the WebLogic Bridge page as follows:

    Set DebugConfigInfo="ON" in the proxy configuration file.
    - The proxy bridge page can be viewed with an URL like, http://webserver_host:port/path/xyz.jsp?__WebLogicBridgeConfig
    where path should be something that invokes the plug-in.
    For example,
    http://myhost:8080/<PIA_SITE>/session.jsp?__WebLogicBridgeConfig

    You will be able to see the build date and the change number at the end of this proxy bridge page.

    If you are experiencing performance issues via the proxy server and find out that the plugin is old, contact Oracle Customer Support to request a newer one.

    How to extract the root CA from a server certificate?


    Your vendor should send you the root CA along with the public key, or have their root CA's posted on their websites. In any case, it's very simple to extract it from the public key. Just follow these steps.

    1. Rename the public key file from .pem to .cer
    2. On Windows, double click on the file with .cer extension. If your OS is Unix, you will have to transfer the file to a Windows workstation in ASCII mode.
    3. You will see 3 tabs: General, Details and Certification Path. Go to Certification Path.
    4. In this tab, you will see a list in the form of a tree. The first file in the tree is the root CA, the last one is the server certificate or public key. Click on the root CA (first one). Then click on the "View Certificate" button.
    5. The root CA will open up on a separate Window. Go to the "Details" tab.
    6. Click on "Copy to File" button.
    7. Click on "Next", then select "Base 64" from the list of format options and click "Next" again.
    8. Enter a name for your root CA file, anything meaningful to you, like i.e.: VerisignRootCA. The file will be saved with .cer extension.
    9. Now you can import this file into your keystore. Cer format works as well as .pem.

    Setting Up Apache as a Reverse Proxy Server (RPS) on WebLogic 10.3.x

    This postprovides information for installing, configuring, testing and troubleshooting when using Apache Reverse Proxy Server with WebLogic 10.3.x
    The instructions also include steps for  installing and configuring the 'Apache HTTP Server Plug-In'. Note that we recommend you use the Apache HTTP Server Plug-In as it enhances an Apache installation by enabling WebLogic server to handle load balancing or requests that require the dynamic functionality of the WebLogic server.

    OVERVIEW of Apache and Examples of how Apache can be Configured in a PeopleSoft Environment.

    Apache can be used as a Reverse Proxy Server (RPS) to one or more WebLogic PIA's.   When using Apache, the end user enters a browser URL containing a host name/port# that points to the RPS, not the WebLogic server.  Below is the sequence of events that occur in a PeopleSoft environment using an Apache RPS:
      1.  User accesses the PeopleSoft application, from browser, by using a URL containing the hostname and port# of the RPS. 
           Example:  http://ApacheHost:8080/ps/signon.html
      2. The user request is routed through the Apache RPS and then forwarded to the WebLogic plug-in.
          The plug-in then evaluates the request and forwards it to the WebLogic PIA.
      3. The WebLogic PIA then processes the request and returns a response via the plug-in to the Apache RPS.