Friday, September 23, 2011

SOA 11g Configuration Files and Log Files Location


Applies to:

Oracle SOA Platform - Version: 11.1.1.1.0 and later   [Release: 11gR1 and later ]
Information in this document applies to any platform.

Goal


The intent of this note is to list the important configuration and log files used to diagnose SOA 11g problems.

Solution

Throughout this note we will refer to the following:
$ MIDDLEWARE_HOME =
$ DOMAIN_HOME = $ MIDDLEWARE_HOME/user_projects/domains/

Here is a list of files to look for:
1.Domain configuration under $DOMAIN_HOME/config  directory
   - Config.xml
   - jdbc/-Jdbc.xml
   - jms/-Jms.xml files under

2. Adapter configuration under $MIDDLEWARE_HOME//soa/connectors/   directory. ( Oracle_SOA1 is the default name)
  - AppsAdapter.rar
  - DbAdapter.rar
  - FtpAdapter.rar
  - MQSeriesAdapter.rar
  - SocketAdapter.rar
  - AqAdapter.rar
  - FileAdapter.rar
  - JmsAdapter.rar
  - OracleBamAdapter.rar

If you are experiencing problems related to the adapter, please send us the appropriate adapter's rar file.
Also provide the Adapter's deployment plan (Plan.xml).

3. Admin Server log files under $DOMAIN_HOME/servers//logs  directory
 - Access.log
 - -Diagnostic.log
 - .log

4. SOA Server log files under $DOMAIN_HOME/servers//logs  directory
 - . log
  - -Diagnostic.log
  - .log 



Soumya...

Error is: 'weblogic.management.DeploymentExceptiE01on: [J2E49]Error while pro cessing library references

Issue Descriprion:
The ADF code when deployed on an remote ADF server fails with below exception.


Error Log:

#### <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <402a65ad9b43fa5a:69fd5e4b:12cff20c642:-8000-00000000000002f4> <1293010450094>
in the execution of deployment request with ID '1293010438085' for task '0'. Error is: 'weblogic.management.DeploymentException: [J2EE:160149]Error while pro
cessing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, Implementatio
n-Version: 11.1.1.1.0, exact-match: false], [Extension-Name: oracle.jsp.next, exact-match: false].'
weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblog
ic-application.xml: [Extension-Name: adf.oracle.domain, Implementation-Version: 11.1.1.1.0, exact-match: false], [Extension-Name: oracle.jsp.next, exact-matc
h: false].


Cause:
The remote ADF server managed server on which you are trying to deploy your ADF code doesn't have the ADF run time libraries deployed on it. Ask your server admin to deploy it.


Solution:
There are primarily two ways to deploy the ADF run time libraries on a Weblogic managed server(ADF Runtime libraties are supported/installed in the WLS domain).


Method 1: Through EM Console
Method 2: WLST scripts
Method 3: While creating a domain the ADF libraries can be deployed on the managed server.


I will be describing Method 2 here:


You use the custom WLST command applyJRF to configure the Managed Servers or cluster with JRF. To use the custom WLST commands, you must invoke the WLST script from an Oracle home in which the Oracle Fusion Middleware component has been installed



The format of the applyJRF command is:


applyJRF(target={server_name | cluster_name | *}, domainDir=domain_path,
        [shouldUpdateDomain= {true | false}])
You can use the applyJRF command online or offline:


In online mode, the JRF changes are implicitly activated if you use the shouldUpdateDomain option with the value true (which is the default.) In online mode, this option calls the online WLST save() and activate() commands.


In offline mode, you must restart the Administration Server and the Managed Servers or cluster. (In offline mode, if you specify the shouldUpdateDomain option with the value true, this option calls the WLST updateDomain() command.)


To configure a Managed Server with JRF, use the following command:


applyJRF(target='server1', domainDir='/scratch/Oracle/Middleware/user_projects/domains/domain1')
To configure all Managed servers in the domain with JRF, specify an asterisk (*) as the value of the target option.


To configure a cluster with JRF, use the following command:


cd $FMW_HOME/oracle_common/common/bin (eg /orionsap_u01/app_ADF/oracle/product/fmw/oracle_common/common/bin)


applyJRF(target='cluster', domainDir='/scratch/Oracle/Middleware/user_projects/domains/domain1')


An Example:



cd $FMW_HOME/oracle_common/common/bin


sh wlst.sh


wls:/offline/test_domain>connect('weblogic','!Welc0me!','adf1.mycompany.com:8100')
Connecting to t3://adf1.mycompany.com:8100 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'test_domain'.


Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.


wls:/mmi_domain/serverConfig> applyJRF('test_enc_ms_1','/u01/app_ADF/oracle/admin/test_domain/aserver/test_domain')
Location changed to serverRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainConfig)
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)
Location changed to edit tree. This is a writable tree with
DomainMBean as the root. To make changes you will need to start
an edit session via startEdit().


For more help, use help(edit)


Starting an edit session ...
Started edit session, please be sure to save and activate your
changes once you are done.
Saving all your changes ...
Saved all your changes successfully.
Activating all your changes, this may take a while ...
The edit lock associated with this edit session is released
once the activation is completed.
Activation completed
Already in Edit Tree


After this is done,restart the managed server and redeploy your code.

Soumya....
   

ORA-01031: insufficient privileges JBO-28006: Could not create persistence table PS_TXN_seq


Applies to:

Oracle JDeveloper/ ADF server - Version: 11.1.1.0.0 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms

You developed an ADF BC ("ADF Business Components") application.
It was tested and was working correctly when run from JDeveloper, in the Integrated WebLogic Server.
However, in your Production environment, some users report intermittent errors like:
JBO-28006: Could not create persistence table PS_TXN_seq

When forcing passivation to occur with the parameter jbo.ampool.doampooling=false,
as explained in Note:417546.1 - How To Reproduce Problems Related to AM Passivation / Activation
you get the following errors occurring during the passivation:
(with the Java Options
"-Djbo.ampool.doampooling=false -Djbo.debugoutput=console -Djbo.logging.show.function=true"
set in the Project Properties)
[439] **createTable** created sequence error, sqlStmt=create sequence PS_TXN_seq increment by 50
[440] java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1223)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1775)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1744)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299)
at oracle.jbo.pcoll.OraclePersistManager.createTable(OraclePersistManager.java:832)
at oracle.jbo.pcoll.OraclePersistManager.queryNextCollectionId(OraclePersistManager.java:1444)
at oracle.jbo.pcoll.PCollManager.register(PCollManager.java:562)
at oracle.jbo.pcoll.PCollection.(PCollection.java:99)
at oracle.jbo.pcoll.PCollManager.createCollection(PCollManager.java:461)
at oracle.jbo.server.DBSerializer.setup(DBSerializer.java:150)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:283)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:264)
at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5645)
at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5516)
...
[441] JBO-28006: Could not create persistence table PS_TXN_seq
[442] *** Stack trace for detail exception ***
[443] java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:942)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1223)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1775)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1744)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:299)
at oracle.jbo.pcoll.OraclePersistManager.createTable(OraclePersistManager.java:832)
at oracle.jbo.pcoll.OraclePersistManager.queryNextCollectionId(OraclePersistManager.java:1444)
at oracle.jbo.pcoll.PCollManager.register(PCollManager.java:562)
at oracle.jbo.pcoll.PCollection.(PCollection.java:99)
at oracle.jbo.pcoll.PCollManager.createCollection(PCollManager.java:461)
at oracle.jbo.server.DBSerializer.setup(DBSerializer.java:150)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:283)
at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:264)
at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5645)
at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5516)
...

Cause

Your DB schema hasn't got sufficient privileges to create the passivation table, sequence and/or
index in the database.

The passivation will store information in a table called PS_TXN and will use a DB sequence
PS_TXN_SEQ


These DB objects will be created
  • in the same DB schema as specified in the Application Module Configuration
    (JDBC connection),
  • or in the schema specified in the parameter jbo.server.internal_connection (recommended).
In order to create these, the DB schema needs to be granted DB privileges that are:
  • CREATE TABLE
  • CREATE INDEX
  • CREATE SEQUENCE
For more information, see "Overview of Temporary Tables Created By BC4J"
and the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework,
Chapter "39 Application State Management"
topic "39.5 What Model State Is Saved and When It Is Cleaned Up"

Solution

We recommend that you create a DB schema specific for the creation of these table.
Ask you DBA to create this schema and grant him the following privileges:
  • CREATE TABLE
  • CREATE INDEX
  • CREATE SEQUENCE
When done, edit your Application Module Configuration, in the "Properties" tab and search for the
property called "jbo.server.internal_connection".
Specify there the value of your JDBC connection to connect to the schema you created.

A fully-qualified JDBC connection URL like:
jdbc:oracle:thin:/@:: 
or a JDBC datasource name like:
java:/comp/env/jdbc/YourJ2EEDataSourceName

Tuesday, August 2, 2011

The default CharSet ISO-8859-1 is not a unicode character set warning while starting SOA Managed server

ISSUE:

You get the following warning message while trying to start Admin/managed server for SOA Suite 11g.The message can be seen on the .out file:

Solution (Enabling Unicode Support)
Your operating system configuration can influence the behavior of characters supported by Oracle SOA Suite.On a UNIX operating system, Oracle highly recommends that you enable Unicode support by setting the LANG and LC_ALL environment variables to a locale with the UTF-8 character set. This enables the operating system to process any character in Unicode. SOA technologies are based on Unicode.If the operating system is configured to use a non-UTF-8 encoding, SOA components may function in an unexpected way. For example, a non-ASCII file name can make the file inaccessible and cause an error. Oracle does not support problems caused by operating system constraints.

In a design-time environment, if you are using Oracle JDeveloper, select Tools -> Preferences -> Environment -> Encoding -> UTF-8 to enable Unicode support.

Set locale to UTF-8
Login to the UNIX Box and type below commands
export LANG=”en_US.UTF-8”
export LC_ALL=”en_US.UTF-8”

Check the locale settings now by typing locale command>

bash-3.00$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Now restart the Admin/managed server.

Soumya....

Tuesday, July 19, 2011

UserWarning: MDS-91002: MDS Application runtime MBean for "soa-infra" is not available. "deleteMetadata" operation failure

You are trying to clean up the MDS using below steps:

  1. Execute SOA_HOME/common/bin/wlst.sh
  2. Connect to admin server by running connect()
  3. Enter the domain config by running domainConfig()
  4. Delete Metadata by running deleteMetadata('soa-infra', 'soa_server1','/apps/AIAMetaData/**')


    You encounter below error:


    UserWarning: MDS-91002: MDS Application runtime MBean for "soa-infra" is not available. "deleteMetadata" operation failure


    The SOA Managed Server is up and so s the SOAINFRA. What could be the possible reason?


    The reason for the above error is the name of the managed server used. In case your admin renamed the default managed server on which SOA is deployed (the default name is soa_server1) you would get the above stated error.


    So in case you get the above error, check with your admin the name of the SOA managed server. So in case your SOA managed server name is SOA_MS_1, the MDS purge command would be as follows:


    deleteMetadata('soa-infra', 'soa_ms_1','/apps/AIAMetaData/**')


    Hope this helps...

    Now you can folow us on facebook and post your comments/views and questions for expert advise. Check this out facebook


    Find us on facebook here

Thursday, July 14, 2011

How to Check Fusion Middleware and WebLogic Component Versions

Applies to:
Oracle Fusion Middleware - Version: 11.1.1.1.0 to 11.1.1.5.0 - Release: to Oracle11g
Information in this document applies to any platform.

Goal
This document describes how to determine the versions of installed Fusion Middleware Components and Weblogic Server.

Note:
Fusion Middleware components including WebLogic Server, RCU, and components such as SOA, Identity Management, Portal-Forms-Reports-Discover, and JDeveloper must have concordant versions. This affects configuration, but not installation, and can cause a variety of failures, including ClassDefNotFound exceptions when trying to configure a new domain or managed server.


1. To determine the WebLogic Server version. There are several ways to confirm the version:
  •  Enter this command with the weblogic environment enabled:
$ java weblogic.version

  • Look in the file Middleware Home/registry.xml, and note the component tag
  • The exact WLS version can be checked using the following commands:

    On Unix:
cat $MW_HOME/wlserver_10.3/.product.properties | grep WLS_PRODUCT_VERSION

On Windows:
type %MW_HOME%\wlserver_10.3\.product.properties | findstr WLS_PRODUCT_VERSION
  • Use SmartUpdate to check the Product Version:

    On Unix:
$MW_HOME/utils/bsu/bsu.sh -view -status=applied -prod_dir=$MW_HOME/wlserver_10.3 | grep ProductVersion

On Windows:
%MW_HOME%\utils\bsu\bsu.sh -view -status=applied -prod_dir=$MW_HOME\wlserver_10.3 | findstr ProductVersion

You should see a result such as this:
ProductVersion: 10.3 MP5


2. For JDeveloper, look in the Middleware Home/registry.xml file for the following:


3. For Fusion Middleware products, use the command Oracle Home/Opatch/opatch lsinventory and note the output:
Installed Top-level Products (2):

Application Server 11g SOA Patchset 11.1.1.3.0
Oracle SOA Suite 11g 11.1.1.2.0
There are 2 products installed in this Oracle Home.


4. For the MDS version, look in the file RCU Home/rcu/log/logdir./mds.log:
REPOS_VERSION CONSTANT VARCHAR2(32) := '11.1.1.56.27' (this is for 11.1.1.3)

To get the schema version from the database, login to the database as sysdba and enter the command as shown (example here for 11.1.1.3):
SQL> select comp_id, comp_name, version from schema_version_registry;

COMP_ID
------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
------------------------------
IAU
Audit Service
11.1.1.3.0

MDS
Metadata Services
11.1.1.2.0

OID
Oracle Internet Directory
11.1.1.3.0

OIF
Oracle Identity Federation Database Schema
11.1.1.2.0

ORAESS
Enterprise Scheduler Service
11.1.1.2.0

ORASDPLS
SIP Infrastructure Location Service
11.1.1.2.0

ORASDPSDS
SIP Infrastructure Subscriber Data Service
11.1.1.2.0

ORASDPXDMS
Presence
11.1.1.2.0

8 rows selected.

You can also get the schema prefix from the database using the following command:
SQL> select username, created from dba_users order by 2;

USERNAME CREATED
------------------------------ ---------
OE 12-MAY-10
SH 12-MAY-10
BI 12-MAY-10
PM 12-MAY-10
TEST01_MDS 21-JAN-11
TEST01_IAU 21-JAN-11
TEST01_IAU_APPEND 21-JAN-11
TEST01_IAU_VIEWER 21-JAN-11
TEST01_ORAESS 21-JAN-11
ODS 21-JAN-11
ODSSM 21-JAN-11

USERNAME CREATED
------------------------------ ---------
TEST01_OIF 21-JAN-11
TEST01_ORASDPXDMS 21-JAN-11
TEST01_ORASDPLS 21-JAN-11
TEST01_ORASDPSDS 21-JAN-11

The prefix given in the Repository Creation Utility (RCU) dialog is TEST01.

Large number of instances in the SOA 11g dehydration store causes EM console performance issues


Applies To:

SOA Suite 11g R1(11.1.1.3,11.1.1.4,11.1.1.5)

Scenario and Symptoms:

The BPEL Engine Audit level is set to Development.

The BPEL engine is load tested with some huge number of transactions causing to generate large number of instances in the dehydration store(SOAINFRA Schema)

The number of instances is say 10-50 Lacs.The developers complain about EM Console being very slow. Drilling into composites and instances take minutes.Below activities in EM console take time:

1.       EM Login Page Load time
2.       Time taken for logging in to the EM
3.       Time taken to render homepage for SOAINFRA
4.       Expanding the SOAINFRA and each partition within
5.       Time taken to render home page for each  deployed composite
6.       Time taken to render details for each instance of any deployed composite

Cause:

Large number of instances in the dehydration store with audit level set to Development. When you login to EM console it tries to load the large amounts of instance and fault data from database leading to slowing up the EM console response time.


Solution:

Improving the Loading of Pages in Oracle Enterprise Manager Fusion Middleware Control Console

You can improve the loading of pages that display large amounts of instance and fault data in Oracle Enterprise Manager Fusion Middleware Control Console by setting two properties in the Display Data Counts section of the SOA Infrastructure Common Properties page.

These two properties enable you to perform the following:
  • Disable the fetching of instance and fault count data to improve loading times for the following pages:
    • Dashboard pages of the SOA Infrastructure, SOA composite applications, service engines, and service components
    • Delete with Options: Instances dialog

    These settings disable the loading of all metrics information upon page load. For example, on the Dashboard page for the SOA Infrastructure, the values that typically appear in the Running and Total fields in the Recent Composite Instances section and the Instances column of the Deployed Composites section are replaced with links. When these values are large, it can take time to load this page and other pages with similar information.

  • Specify a default time period that is used as part of the search criteria for retrieving recent instances and faults for display on the following pages:

    • Dashboard pages and Instances pages of the SOA Infrastructure, SOA composite applications, service engines, and service components
    • Dashboard pages of services and references
    • Faults and Rejected Messages pages of the SOA Infrastructure, SOA composite applications, services, and references
    • Faults pages of service engines and service components

Other Suggestions/Best Practices:

1. Purge the instance-The moment we purge the instances, we see good performance.The flipside is you cannot be purging data regularly in production (to meet SLAs). My take is if you are in development server you can afford frequent purging of the instances. In Stage/Prod the Audit level would be set to production,hence performance issues due to large number of instances would not be seen. After you purge the dehydration store make sure you shrink the SOAINFRA tables along with indexes (or rebuild indexes)

2. Set Audit Level to Production/Off-The flip side is developers won't be able to troubleshoot issues with their composites. Go ahead with these settings in Production.

3. Another strategy is Switching the audit configuration to 'Deferred' which allows the auditing operations to be performed in an ansynchronous manner resulting in performance comparable to setting the audit level to disabled.Please refer Tuning BPEL audit performance [ID 1328382.1].This is recommended in production.Also can be applied to Dev/Stage environments.

4. As the number of record grows in the dehydration the EM console takes longer time to return information about instances. I believe this is a result of bad performing querries and full table scans. Generate an AWR report and see if you can tune some querries and build some indexes on tables. Get this gone by the DBAs.

5. Using a fast single threaded server(eg M5000/9000) for database instead of using slow CMT servers like the Sun T5140/5240. Please refer Migration from fast single threaded CPU machine to CMT UltraSPARC T1 and T2 results in increased CPU reporting and diminished performance [ID 781763.1]

6. Try using M series boxes for the application tier as well. But if you have to use CMT servers like T5240 make sure you follow note 860459.1 and apply the steps in the solution part to adapt all the components with CMT machine.

Let me know if the above article helps.

Soumya...