« November 2007 | Main | February 2008 »

January 2008 Archives

January 8, 2008

Running Autoconfig in Test mode - Useful for Making 11i Rapid Clones faster..

Preface

If you prepare a context file ahead of time and sanitize it well, you can save time during 11i clones.

Sometimes, though, editing context XML files can turn against you as well. For example, simple syntax issues (missing a > or a /) can cause a lot of grief and convert precious time into roundabout troubleshooting effort.

The wise thing to do...

The AD product has its own utility for running Autoconfig in test mode. This provides a great channel for proof-executing the autoconfig run, check elaborate value errors and saving precious time during the clone.

A sample run..

Run autoconfig on check mode on all tiers (middle tiers, admin tier, configurator tier):

sandbox:dev806> /ORACLE/apps/dev/ad/11.5.0/bin/adchkcfg.sh
Enter the full path to the Applications Context file:
/ORACLE/apps/dev/admin/dev_sandbox.xml   
Enter the APPS user password:
abcdefg
AutoConfig is running in test mode and building diffs...

AutoConfig will consider the custom templates if present.
        Using APPL_TOP location     : /ORACLE/apps/dev/
        Classpath                   : :/usr/java14/jre/lib/charsets.jar:/usr/java14/jre/lib/core.jar:/usr/java14/jre/lib/graphics.jar:
/usr/java14/jre/lib/ibmcertpathprovider.jar:
/usr/java14/jre/lib/ibmjaaslm.jar:/usr/java14/jre/lib/ibmjcefw.jar:
/usr/java14/jre/lib/ibmjgssprovider.jar:
/usr/java14/jre/lib/ibmjssefips.jar:/usr/java14/jre/lib/ibmjsseprovider.jar:
/usr/java14/jre/lib/ibmorb.jar:
/usr/java14/jre/lib/ibmorbapi.jar:/usr/java14/jre/lib/ibmpkcs.jar:
/usr/java14/jre/lib/javaplugin.jar:
/usr/java14/jre/lib/security.jar:/usr/java14/jre/lib/server.jar:
/usr/java14/jre/lib/xml.jar:
/usr/java14/lib/dt.jar:/usr/java14/lib/tools.jar:
/ORACLE/apps/dev/common/java/appsborg2.zip:
/ORACLE/apps/dev/common/java

        Using Context file          : /ORACLE/apps/dev/admin/dev_sandbox/out/01021539/dev_sandbox.xml

Context Value Management will now update the test Context file

        Updating test Context file...COMPLETED

        [ Test mode ]
        No uploading of Context File and its templates to database.
 Testing templates from all of the product tops...
        Testing AD_TOP........COMPLETED
        Testing FND_TOP.......COMPLETED
        Testing ICX_TOP.......COMPLETED
        Testing IEO_TOP.......COMPLETED
        Testing ECX_TOP.......COMPLETED
        Testing BIS_TOP.......COMPLETED
        Testing GL_TOP........COMPLETED
        Testing AMS_TOP.......COMPLETED
        Testing CCT_TOP.......COMPLETED
        Testing WSH_TOP.......COMPLETED
        Testing OKE_TOP.......COMPLETED
        Testing OKL_TOP.......COMPLETED
        Testing OKS_TOP.......COMPLETED
        Testing CSF_TOP.......COMPLETED
        Testing XNC_TOP.......COMPLETED
        Testing IGS_TOP.......COMPLETED
        Testing IBY_TOP.......COMPLETED
        Testing PA_TOP........COMPLETED
        Testing JTF_TOP.......COMPLETED
        Testing MWA_TOP.......COMPLETED
        Testing CN_TOP........COMPLETED
        Testing CSI_TOP.......COMPLETED
        Testing WIP_TOP.......COMPLETED
        Testing CSE_TOP.......COMPLETED
        Testing EAM_TOP.......COMPLETED
        Testing FTE_TOP.......COMPLETED
        Testing ONT_TOP.......COMPLETED
        Testing AR_TOP........COMPLETED
        Testing AHL_TOP.......COMPLETED
        Testing IES_TOP.......COMPLETED
        Testing CSD_TOP.......COMPLETED
        Testing IGC_TOP.......COMPLETED

Differences text report is located at: /ORACLE/apps/dev/admin/dev_sandbox/out/01021539/cfgcheck.txt


        Generating Profile Option differences report...COMPLETED

        Generating File System differences report......COMPLETED --> This is very important  --> Check the changes made by adchkcfg.sh original context.xml file against the changes made to the source file.

Differences html report is located at: /ORACLE/apps/dev/admin/dev_sandbox/out/01021539/cfgcheck.html

AutoConfig completed with errors.

The log file for this session is located at: /ORACLE/apps/dev/admin/dev_sandbox/log/01021539/adconfig.log

Conclusion

There are many useful AD utilities that we can leverage, if we are aware of them; adchkcfg.sh is one of them. It can be especially useful for pre-staging context XML files for 11i/12i RapidClones.


Reducing time on txkWfClone.sh while running Autoconfig

Preface

Running Autoconfig on multiple tiers can take a long time sometimes and many a times, the culprit is txkWfClone.sh

The real deal

During cloning, execution of txkWfClone  is required only for the first autoconfig run. For subsequent Autoconfig  runs,  it is not required.

How can you be smart?

There are two smart things you can do to help yourself and make this happen.

1). Move the phase of the script txkWfClone.sh to INSTALL_SETUP phase in $FND_TOP/admin/driver/fndtmpl.drv:

Open the file $FND_TOP/admin/driver/fndtmpl.drv and make the following changes:

Before:
fnd admin/template txkWfClone.sh    INSTE8_SETUP     
<s_com>/admin/install/<s_contextname> txkWfClone.sh 700

After:
fnd admin/template txkWfClone.sh    INSTALL_SETUP     
<s_com>/admin/install/<s_contextname> txkWfClone.sh 700


2). Replace %s_webhost% with %s_webentryhost% and %s_domainname% with %s_webentrydomain%, in the template $FND_TOP/admin/template/txkWfClone.sql

How does the savings add up..

Changing the autoconfig phase of this script from  INST8_SETUP to INSTALL_SETUP will prevent it from unwanted execution, resulting in better performance for future autoconfig runs.

The role of txkWfCLone.sh is to create workflow related references in  db tier of target system in the cloning process.

During txkWfClone.sh's execution, the comparison between source system and target system URLs is done.  Essentially, in a scenario where we are creating an additional middle tier from an existing  middle tier/(s) having one common database tier, it will result in  redundant operation of changing/creating workflow references for target  middle tier.

For comparison, txkWfClone constructs an url for target system using  the context variables as follows:

'%s_webentryurlprotocol%'||'://'||'%s_webhost%'||'.'||'%s_domainname%'||':'||'
%s_active_webport%'||'/pls/'||'%s_dbSid%'

Because the url for target system is constructed using s_webhost  context variable, the script creates distincts urls for each middle tier  which is not necessary because they use the same database instance and hence the workflow references are the same.

This results into a good amount  of time consumption for every  autoconfig run while cloning.

This can be avoided by changing the use of %s_webhost% with the use of %s_webentryhost%  in the template txkWfClone.sql.

This way the urls created for each middle  tier would be the same as it should be in the case of a system with multi apps tiers and one db instance.

Conclusion

It is good to save time during cloning and txkWfClone.sh can be easily fixed to avoid duplicate effort. Simple fixes like this should be absorbed into regular cloning practices for saving time and effort.

January 14, 2008

Quick script for comparing two init.ora files

Preface


While cloning, sometimes one may have to compare two database initialization parameter files (init.oras). The parameters may be mentioned without order and even multiple times. This can cause manual difficulty in comparing two init.ora files, which can lead to mistakes.

Scripting to the rescue...

I made this quick script (which can be refined further) to compare each init.ora parameter side by side. Feel free to extend it and add more validation checks etc.

This script can be useful when you have a requirement that the memory area sizing for two instances need to be the same, except for the instance specific changes, of course.

$ more compare_two_initoras.sh
#!/bin/ksh

file1=$1
file2=$2
for parameter in `cat $file1 | grep = | awk '{print $1}' | grep -v '#'`
do
 value1=`grep ^$parameter $file1 | awk 'BEGIN{s1=""} { for (i=3;i&lt;=NF;i++) { if ($i ~ /#/) break; else s1=sprintf(s1"%s ",$i); }
 } END{print s1;}'`
 value2=`grep ^$parameter $file2 | awk 'BEGIN{s2=""} { for (i=3;i&lt;=NF;i++) { if ($i ~ /#/) break; else s2=sprintf(s2"%s ",$i); }
 } END{print s2;}'`
 if [ "$value1" != "$value2" ];
 then
  echo $parameter"="$value1 " - " $file1
  echo $parameter"="$value2 " - " $file2
  echo ---------------------------------------------------
 fi
done

A sample run..


sandbox:qa> ./compare_two_initoras.sh initprod.ora.14thjan initqa.ora

log_archive_start=true  -  initprod.ora.14thjan
log_archive_start=  -  initqa.ora
---------------------------------------------------
nls_length_semantics=byte  -  initprod.ora.14thjan
nls_length_semantics=BYTE  -  initqa.ora
---------------------------------------------------
utl_file_dir='/ORACLE/apps/prod/temp','/var/tmp'  -  initprod.ora.14thjan
utl_file_dir='/ORACLE/apps/qa/appl/temp','/var/tmp'  -  initqa.ora
---------------------------------------------------
control_files=(/ORACLE/data/datafiles/prod/system/control1.ctl,  -  initprod.ora.14thjan
control_files=(/ORACLE/data/datafiles/qa/system/control1.ctl,  -  initqa.ora
---------------------------------------------------
db_name=prod  -  initprod.ora.14thjan
db_name=qa  -  initqa.ora
---------------------------------------------------
db_files=3000  -  initprod.ora.14thjan
db_files=3000  -  initqa.ora
---------------------------------------------------
background_dump_dest=/ORACLE/data/datafiles/prod/admin/bdump  -  initprod.ora.14thjan
background_dump_dest=/ORACLE/data/datafiles/qa/admin/bdump  -  initqa.ora
---------------------------------------------------
core_dump_dest=/ORACLE/data/datafiles/prod/admin/cdump  -  initprod.ora.14thjan
core_dump_dest=/ORACLE/data/datafiles/qa/admin/cdump  -  initqa.ora
---------------------------------------------------
log_archive_dest=/ORACLE/data/datafiles/prod/arch/arch  -  initprod.ora.14thjan
log_archive_dest=/ORACLE/data/datafiles/qa/arch  -  initqa.ora
---------------------------------------------------

Recommendation

One recommendation that I would surely mention is that it would be a good idea to run the same script with the arguments reversed i.e. if you run the script with arguments initqa.ora and initprod.ora, then you should also run it with initprod.ora and initqa.ora, in that order.



Ugly ORA-7445 or Signal 11 errors while using utl_http APIs?

Preface


Are you using UTL_HTTP and recently did a database upgrade?

This article talks about a situation which was induced due to manual error. The database was upgraded to 9208 but was erroneously started with the 9207 version binaries. Everything worked fine until some batch programs started failing with weird ORA-7445 errors.

The ugly ora-7445 error stack...


*** SESSION ID:(131.2450) 2007-10-25 12:16:34.600
*** 2007-10-25 12:16:34.600
Exception signal: 11    0x101ede9ac (pihtipg+030c) 90070000
Registers:
iar: 0000000101ede9ac, msr: a00000000000d0b2
 lr: 0000000101ede85c,  cr: 0000000024222224
r00: 0000000000000000, r01: 0fffffffffff3bf0, r02: 00000001101fa870,
r03: 00000000ffffffff, r04: 00000001109c67a0, r05: 0000000000000000,
r06: 00000000ffffffff, r07: 0000000000000000, r08: 00000001109c6800,
r09: 00000001109c6850, r10: 0000000000000001, r11: 0000000000000008,
r12: 0000000024222288, r13: 0000000110238c90, r14: 0000000000000040,
r15: 00000001109c6360, r16: 0000000000007fff, r17: 0fffffffffff3cd0,
r18: 0000000000000000, r19: 0000000102d63450, r20: 00000001109c6870,
r21: 00000001109c6820, r22: 00000001109c67d0, r23: 00000001109c6710,
r24: 0fffffffffff7550, r25: 000000011036a2f8, r26: 00000001109c66e0,
r27: 00000001109c6590, r28: 0000000000000000, r29: 00000001109c6570,
r30: 00000001109c6550, r31: 0000000000000001,
----- Call Stack Trace -----
calling              call     entry                argument values in hex     
location             type     point                (? means dubious value)    
-------------------- -------- -------------------- ----------------------------
pihtipg+0328         ?        00000000            
spefcifa+08d8        bl       _ptrgl              
spefmccallstd+0184   bl       spefcifa             FFFFFFFFFFF5850 ?
                                                   FFFFFFFFFFF5488 ?
                                                   FFFFFFFFFFF5558 ?
                                                   FFFFFFFFFFF46C8 ?
                                                   FFFFFFFFFFF46D4 ?
                                                   FFFFFFFFFFF46B0 ?
pextproc+008c        bl       spefmccallstd        FFFFFFFFFFF5850 ?
                                                   FFFFFFFFFFF5488 ?
                                                   FFFFFFFFFFF5558 ?
                                                   FFFFFFFFFFF54C8 ? 000000000 ?
peftrusted+00f0      bl       pextproc             FFFFFFFFFFF4870 ? 000000000 ?
                                                   1000E4600 ? 000001620 ?
psdexsp+003c         bl       01FD3E44            
rpiswu2+0358         bl       _ptrgl              
psdextp+01e8         bl       rpiswu2              700000047A3CD30 ?
                                                   2222242400000001 ?
                                                   10262DE38 ? 110006668 ?
                                                   110416CD0 ? 000000000 ?
                                                   000000000 ? 000000000 ?
pefccal+0220         bl       _ptrgl              
pefcal+002c          bl       pefccal              800000000 ?
pevm_FCAL+00e4       bl       pefcal               FFFFFFFFFFF5890 ?
pfrrun+9888          bl       pevm_FCAL            11036A2F8 ? 11036A360 ?
peicnt+01b8          bl       pfrrun               11036A2F8 ?
kkxuexe+02d4         bl       peicnt               FFFFFFFFFFF7550 ? 11036A2F8 ?
kkxmpexe+022c        bl       kkxuexe              FFFFFFFFFFF78B0 ?
                                                   222224241000673C ?
                                                   10009E1AC ?
kgmexwi+0460         bl       _ptrgl              
kgmexec+08ec         bl       kgmexwi              110006668 ? 11036CE50 ?
                                                   FFFFFFFFFFF80F0 ? 000000000 ?
                                                   000000000 ? 11036DEB8 ?
                                                   33000000000000 ? 000000000 ?


ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []
ORA-07445: exception encountered: core dump [] [] [] [] [] []


Debugging...

SQL> select count(1) from dba_objects where status='INVALID';

  COUNT(1)
----------
        29
 

The following test case proved that each time a UTL_HTTP API was invoked, the session was aborting with a ORA-03113.


SQL> select utl_http.request('http://www.company.com') from dual;
select utl_http.request('http://dev11.us.company.com') from dual
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel

Similar hits in Metalink..

Some things which came up on metalink were Note 399736.1 and bugs 5645944 and 5979559.

The Solution..


The solution was simply to use the correct 9208 oracle home for restarting the database and re-create the utl_http package:

SQL> @$ORACLE_HOME/rdbms/admin/utlhttp.sql

Package created.


Grant succeeded.


Synonym created.

SQL> @$ORACLE_HOME/rdbms/admin/prvthttp.plb

Library created.


Package body created.

SQL>  select utl_http.request('http://www.company..com') from dual;

UTL_HTTP.REQUEST('HTTP://WWW.COMPANY.COM')
--------------------------------------------------------------------------------
&lt;html>
&lt;head>
&lt;title>Leading manufacturer of chairs & home equipment - Company C
orporation&lt;/title>
&lt;Meta name="description" content="Leading manufacturer of chairs.Browse our home
equipment catalog.">
&lt;Meta name="keywords" content="home equipment, wheelchair, wheelchairs,
mobility aids, mobility scooters, motorized wheelchairs, oxygen concentrato
UTL_HTTP.REQUEST('HTTP://WWW.COMPANY.COM')


Conclusion

Good to keep your eyes open during/after upgrades and make sure we use the right binary version to open up the database. In this case, it was surprising that more things did not blow up by using a previous version of the Oracle binaries. Sometimes weird Signal 11 and ora-7445 errors can result due to incompatible binaries and mere recreation of the packages can resolve the errors.


January 15, 2008

What is the Java cache feature: Framework, Features, Administration and How does it tie up with Workflow Business Event System (BES)

Preface


In a fast paced world, we all want to cache things for faster access: Lets keep this here, so that I wont have to go around the world to get that. Well, this concept was just applied to the JVM components in the application server realm as well.

While we already have an excellent article by Mike Shaw on Steven Chan's million dollar blog: http://blogs.oracle.com/schan/2007/05/01/, I thought I would expound upon the java caching feature in general and talk about how it works, it is configured and administered. Also, the relationship between java caching and Workflow Business event system is not made very clear in the existing articles.

Disclaimer:

Most of the content in this article has been taken from the  Oracle Applications Java Caching Framework Developer's Guide, so I am not going to lay any great claims to its originality. At the same time, I will just say that I have tried to present the information there in a more digestible format for Application DBAs like me, who want to get upto speed with the various features being spewed out by the FND team.

Distributed Java Cache - what framework does it provide...

The Caching Framework provides following features:

  • Synchronization: Caching Framework takes care of all the synchronization issues in a multi-threaded environment.

  • Distributed Caching: Distributed caching allows one JVM to inform all the other JVMs about updates to any cached data. This ensures consistency of the cached data across all the JVMS.

  • Data Partition: This feature allows the cached data to be partitioned based on any partition key. This is useful for JVMS in hosting environments running against a Virtual Private Database (VPD). The Caching Framework ensures that the cache data is partitioned based on security group id.

  • Database Invalidation: This feature ensures that when the data in a database is updated, the corresponding cached data in the mid-tier is also updated. This is useful when the updates to the database bypass the JVMS, such as updates through forms or sqlplus.

  • Event Support: This feature allows custom event handlers to be invoked when certain events such as invalidation or updates to the cached data occur. This is useful for maintaining consistency across inter-dependent cached data.

  • Cache Administration: Caching Framework comes with administration User interface, which is available under the Functional Administrator responsibility. This interface can be used to perform administrative operations including changing the time-out values for cache components, looking at cache usage statistics, and clearing caches.

  • Cache Diagnostics: Cache diagnostics is a set of diagnostic tests that can identify some of the common problems that may occur when using the Caching Framework.

Another good representation of the communication between components is:

adv_cacheimage002.gif:

How does it work?

By default, the distributed caching works by sending the invalidation message to other JVMs. The list of machines is maintained in the database. As each JVM starts, it makes an entry into this list (if it is not already present). When the other JVMs receive this invalidation message, they mark the object invalid if it is present. When the object is requested in the other JVMs, it is loaded from the database at that time.

DB Invalidation provides a general mechanism to originate events from the database. For Caching Framework, these events are used to invalidate objects in a component cache.

Distributed caching ensures that these updates are seen in all the middle-tiers. However, in some cases, these updates can happen outside of the middle-tier such as, updates through the Forms server or concurrent programs. In such cases, the DB invalidation mechanism can be used to ensure that the cached data is invalidated when the corresponding database data changes. 

The following is a typical process flow for database invalidation:

  1. The user JVM (Apache/ Jserv) caches data such as profiles. The cached data is a representation of some profiles in the database.

  2. The user performs an action such as, updating a profile value through Jinitiator, which causes the data in the database to be updated while passing the user JVM.

  3. The cached profile value must now be marked as invalid. Subsequent access to the profile in the user JVM causes a cache miss, which in turn results in the updated value being loaded from the database.

How Oracle workflow business event system (BES) is related to this.....

The Workflow Business Event system provides necessary infrastructure support for notification of the database data change to the middle-tier. The notification is originated by raising a business event with the correct key. Caching Framework provides the support for processing the notification and invalidating the corresponding cached data in all the user JVM.

It is important to know that:
  • Every time an event is raised, it is processed in a separate thread.
  • The events are processed by the Java Deferred Agent Listener running in a standalone JVM (GSM) started by a concurrent process. This JVM must be running all the time. This JVM sends a distributed invalidation message causing the corresponding key in all of the JVMs to be marked invalid.
Lets see an example of processing a WF BES event:

adv_cacheimage004.gif:

adv_cacheimage006.gif:

Configuring DB Invalidation Feature

This feature is built using the business event support provided by Oracle Workflow, the apps caching infrastructure and the underlying distributed caching functionality provided by IAS cache.

When an update to the database data happens, a workflow event is raised. The Workflow JVM running the Java Deferred Agent Listener processes this event. This JVM then issues a distributed invalidation message to all the other JVM's running against the same database and the cached data in the JVM is invalidated. The following configuration is necessary for this feature:

  1. Caching Framework must be running in the distributed mode. This is the default configuration of Caching Framework. The -DLONG_RUNNING_JVM=true is set and it ensures that Caching Framework runs in distributed mode. For backward compatibility the same can be ensured by setting -DCACHEMODE=DISTRIBUTED.

  2. The Workflow Java Deferred Agent Listener must be running. This runs as a thread in a special workflow service container JVM and processes the business events being raised in the database. This should be running by default. To verify, make sure that Oracle Applications Manager (OAM) is running, login into SSA and perform the following steps:
    1. Select the System Administrator responsibility.
    2. Select Workflow (OAM).
    3. Select on the icon next to Agent Listeners.
    4. Query for Workflow Java Deferred Agent Listener by selecting Name from the Filter dropdown list.

      Note: If the Status column shows Running then skip the following steps.

    5. Select the Workflow Agent Listener Service link (under Container).
    6. Select Workflow Agent Listener Service and if the status is not running, select Start from the dropdown list. Then select Go.

      Note: Make sure the status changes to the green icon representing a running state.

    7. Return to the Workflow Java Deferred Agent Listener page. Select Start from the dropdown list (under Actions) and then select Go.

      The Status column should show Running.

How to check if a component is enabled for caching

Follow the steps below to check whether the distributed flag is set for a particular component cache:
  1. Login into the HTML Application Administrator Console (sysadmin/ sysadmin).
  2. Select the Performance tab and then select Components, which is located on left side navigation bar.
  3. Choose the correct application from the View dropdown list and then select the appropriate link under Component Identifier.
  4. Verify the Distributed Mode checkbox is checked. To enable distributed caching for the component cache, this box needs to be checked.
  5. If you change the setting, the Apache/ Jserv must be restarted for the setting to take effect.

Cache Administration

These java -D parameters must be added to make the java caching work. For an Apache/Jserv these are specified in the jserv.properties file as:

wrapper.bin.parameters=-D&lt;name>=&lt;value>

The list of parameters is as below:

  • -DAPPLRGF=&lt;a writeable log directory>

    The writeable log directory can be the Jserv log directory. A file with the name javacache.log is created under this directory. If it is not specified, the java current working directory is the default. If the default directory is not writeable, an error message is written to the jserv log file without any adverse effect on the functionality.

  • -DLONG_RUNNING_JVM=true

Note: The above cache deployment steps are required only if you are using either the distributed caching feature or the cache event handling feature. If your environment is auto-config enabled apply the tech stack rollup patch H 3416234.

Testing and Troubleshooting

Testing the Component Cache

To troubleshoot Caching Framework use the Diagnostic Framework. The diagnostic test for Caching Framework can be accessed from the Oracle Diagnostic UI:

http://&lt;hostname:port>/OA_HTML/jtfqalgn.htm

To log into the system use sysadmin/ sysadmin. Alternatively, the same can be accessed by logging into AppsLocalLogin as sysadmin, selecting either CRM ETF Administration or CRM HTML Administration responsibility, and then selecting the Diagnostics link under Setup.

There are two types of diagnostic tests:

  1. Basic tests to verify the basic configuration related with Caching Framework:CRM Foundation from the Application dropdown list, and then select Caching Framework on the left side. Select Run Without Prerequisite to run the test. Select the icon under the Report
    These tests do not require any user inputs and are more suitable for the system administrator to run. To access, select the Basic tab, choose column to see the results. This test prints out the basic information about Caching Framework's configuration and component caches. This test is more applicable to Apps DBAs like us.

  2. Advanced tests that can be used to troubleshoot a specific component cache:CRM Foundation from the ApplicationCache Component Diagnostic Test on the left side. You can run tests on individual component caches.
    To access, select the Advanced tab, select dropdown list, and then select

Testing Database Invalidation

This section discusses how to:

    * Perform database invalidation tests.
    * Bounce the workflow JVM.
    * Verify the workflow event is getting raised.
    * Verify workflow event processing.
    * Verify Java object cache log file location.

Performing Database Invalidation Tests

To test your implemenation, If you have implemented database invalidation:

  1. Perform an action that causes updates to the database data while bypassing the user JVM (typically Apache/ Jserv), such as updating a profile through Jinitiator.

    To test, the user must update the data in the database through a UI or directly. Also, the user must ensure that an event is raised when the update occurs.

    Note: The event can be raised using the PL/SQL API or through the Workflow Administrator Web Application UI.

  2. Access the corresponding cached object. If database invalidation works correctly, you will see the updated value.

    To test, the value of the data in the user JVM must be accessed. It should be the new updated value. Alternatively, you can examine the keys in the cache through the Advanced Diagnostics test. The key that corresponds to the data that is getting updated in step 1 above, must not be present in the cache after the update occurs.

    Note: Because the processing of events is asynchronous, you must wait at least one or two minutes after updating the data to see the effect in the middle-tier data.

For database invalidation to work correctly, all the different underlying pieces must work as expected. Some of these pieces belong to the infrastructure and some are supplied by the user. All the seed data must be in place, the background services must be running, and the runtime must behave as expected. Diagnostic tests are provided for checking the configuration. The Cache DB Invalidation test, under the Basic diagnostics tab, can be run to verify that the general infrastructure configuration is in place.

The CacheComponent DB Event Invalidation test, under the Advanced diagnostics tab, can be run for a specific component cache for which the database invalidation functionality is being tested. The poplist lists only the component caches that have corresponding workflow defined. If your component cache does not appear, check the component cache definition to make sure that the business event is defined.

If all the diagnostic tests pass but the functionality still does not work, check the runtime behavior by:

  • Bouncing the workflow JVM.
  • Verifying the workflow event is getting raised.
  • Verifying the workflow event is processed correctly.
  • Verifying the Java object cache log file location.

Bouncing the Workflow JVM

After applying the appropriate patch, the workflow JVM that is running the Java Deferred Agent Listener, needs to be bounced.

Note: This is not the Apache Jserv process.

To bounce the workflow JVM:

  1. Login to SSA and select the System Administrator responsibility.

  2. Select Workflow (under Oracle Applications Manager (OAM).

  3. Select the Agent Listeners icon and locate the row where the Name column is Workflow Java Deferred Agent Listener.

  4. Select the Workflow Agent Listener Service under the Container column.

  5. Verify that the radio button for the Workflow Agent Listener Service row under the Select column is selected.

  6. Select Restart from the second dropdown list and then select Go.

  7. Select OK. The State column changes to Restarting.

  8. After a short delay, select Reload. The State column changes to Activated.

Verifying the Workflow Event is Getting Raised

To verify that the workflow event is getting raised:

  1. Issue the following query:

    select to_char(enq_time, 'yyyy-mm-dd hh24:mi:ss') ,to_char(deq_time,'yyyy-mm-dd hh24:mi:ss') ,msg_state,user_data from applsys.aq$wf_java_deferred where enq_time > to_date ('2004-11-1 11:19:00','yyyy-mm-dd hh24:mi:ss') order by enq_time desc;

    Notes:

    • The to_date(..) value should not be more than a few seconds greater than the time 't'.

    • This query should return at least one row where the string representation of user_data value contains text of the form ('BES_EVENT_NAME', 100, 'oracle.apps.fnd.menu.entry.insert') or ('BES_EVENT_NAME', 100, 'oracle.apps.fnd.menu.entry.update').

    • For profile update it would be ('BES_EVENT_NAME', 100, 'oracle.apps.fnd.profile.value.update').

    • The third value, oracle.apps.fnd.profile.value.update, is the 'event name'. It should also have text of the form AQ$_JMS_USERPROPERTY('BES_EVENT_KEY', 100, '10001:0:0:FND_SSO_LOCAL_LOGIN_MASK',...) where the third value should correspond to the data that got updated/ created.

    • The value '10001:0:0:FND_SSO_LOCAL_LOGIN_MASK' is the 'event key'.

  2. The value of the msg_state column begins as Ready and then it changes to Processed.

    Note: Attempt to raise an event through the Workflow Administrator Web Application UI by selecting Events, searching for the desired event, and then using the icon under the Test column in the Search result.

Verifying Workflow Event Processing

Event processing can be confirmed by examining the log files. This requires changing the log level of the workflow JVM that is running the Java Deferred Agent Listener, which processes the event.

To change the log level:

  1. Login to Oracle Applications Manager Dashboard -> Site map -> workflow -> Service component.

  2. Locate the row where the Name column is Workflow Java Deferred Agent Listener.

  3. Select the checkbox under the Select column, which is located next to the row mentioned in the previous step.

  4. Select Edit.

  5. Select Next to go to a second page. Select Procedure from the Log Level dropdown list.

    Note: No changes are required if the Log Level value is Procedure or Statement.

  6. Select Finish.

  7. Restart the Workflow Agent Listener service.

To examine the runtime logs:

  1. Cause a database invalidation event by performing an action to update the data. See performing database invalidations test.

  2. Login to Oracle Applications Manager Dashboard -> Site map -> workflow -> Service component.

  3. Locate the row where the Name column is Workflow Java Deferred Agent Listener.

  4. Select View Log.

    The log file contains the following series of messages:

    • Business Event received in the cache handler:&lt;event name> with the workflow context:&lt;context value>.
    • Business Event=&lt;event name>key=&lt;event key>corresponds to the app=&lt;Application Short Name>and component key=&lt;Cache Component Key>and loader class=&lt;loader class name>.
    • Just about to call stringToKey with key=&lt;event key>.
    • Obtained the keys &lt;keys>.
    • Invoking CacheManager.invalidate for component=,Cache Component Key> app=&lt;Application Short Name> and key=&lt;list of keys>.

      Note: This message should appear at least once.

Interesting related information on the metalink

Looks like there have been more metalink notes released for diagnosing issues in the recent past: e.g. Investigating NoClassDefFoundError in eBusiness 11i when users login (Metalink Note 455366.1) and Diagnosing database invalidation issues with Java Cache for eBusiness Suite (Metalink Note 455194.1).


11i Post cloning issues: APPSLOCALLOGIN.JSP gives JAVA.LANG.NOCLASSDEFFOUNDERROR - how is it related to JTF Distributed caching..

Preface

This situation was faced after cloning: in spite of repeated apache bouncing, we could not make the self service login page to work, in a multi-tier(load balanced) application architecture for 11.5.10 instance. A generic error like java.lang.NoClassDefFoundError was coming up.

Many a times, it can be resolved by making sure that your CLASSPATH or AF_CLASSPATH has all the right .zip/.jar files/$JAVA_TOP etc in $IAS_ORACLE_HOME/Apache/Jserv/etc or adovars.env, BUT at times even those checks did not work.

Debugging and trying all sorts of things first..

Well, we did not come to the understanding of the actual problem till much later. Initially, we tried many things like recompiling JSP cache in $COMMON_TOP/_pages.

sandbox:web_dev> perl ojspCompile.pl --compile --fast
identifying apache_top.../ORACLE/dev/9iAS
identifying apache_config_top.../ORACLE/dev/9iAS
identifying java_home.../usr/java/j2sdk1.4.2_07
identifying jsp_dir.../ORACLE/apps/dev/common/html
identifying pages_dir.../ORACLE/apps/dev/common
identifying classpath...file:///ORACLE/dev/9iAS/Apache/Jserv/etc/jserv.properties
auto-logging to /ORACLE/apps/dev/common/_pages/ojsp_error.log
starting...(compiling delta)
using 8i internal ojsp ver: 1.1.3.5.2
including compatibility flag -whiteSpaceBetweenScriptlet
synchronizing dependency file:
  enumerating jsps...14016
  parsing jsp...14016
  writing deplist...14016
initializing compilation:
  eliminating children...10724 (-3292)
  searching uncompiled...10692
translating and compiling:
  searching untranslated...10692
  translating jsps...10692/10692 [failed: 204] in 3m58s             
  compiling jsps...10488/10488 [failed: 75] in 5m44s               
Finished!


Now, when we tried accessing the AppsLocalLogin.jsp page, the following contents could be seen in the _pages directory and the error was still very much present:

sandbox:web_dev> pwd
/ORACLE/apps/dev/common/_pages/_oa__html


sandbox:web_dev> ls -l *Apps*
-rw-r--r--    1 applmgr  oaa         11356 Nov 14 09:23 _AppsChangePassword.class
-rw-r--r--    1 applmgr  oaa         11494 Nov 14 09:23 _AppsChangePassword$__jsp_StaticText.class
-rw-r--r--    1 applmgr  oaa          2037 Nov 14 09:23 _AppsCustomizedSSOLogin.class
-rw-r--r--    1 applmgr  oaa           852 Nov 14 09:23 _AppsCustomizedSSOLogin$__jsp_StaticText.class
-rw-r--r--    1 applmgr  oaa          4626 Nov 14 09:23 _AppsLocalLogout.class
-rw-r--r--    1 applmgr  oaa           888 Nov 14 09:23 _AppsLocalLogout$__jsp_StaticText.class
-rw-r--r--    1 applmgr  oaa         25964 Nov 14 09:28 _qotSZzpAppsLink.class
-rw-r--r--    1 applmgr  oaa          3714 Nov 14 09:28 _qotSZzpAppsLink$__jsp_StaticText.class

Since the .class files were very much present, it meant that the .jsp files had been converted into runtime .class files.

Snippets from relevant log files

mod_jerv.log

[12/11/2007 14:33:53:558] (ERROR) ajp12: Servlet Error: OracleJSP: java.io.FileNotFoundException
[12/11/2007 14:34:57:972] (ERROR) ajp12: Servlet Error: OracleJSP: java.io.FileNotFoundException
[12/11/2007 14:39:43:301] (ERROR) ajp12: Servlet Error: OracleJSP: oracle.jsp.provider.JspCompileException: &lt;H3>Errors compiling:/ORACLE/apps/dev/common/_pages/_oa__html//_ahlBrowserTitleIncl.java&lt;/H3>&lt;TABLE BORDER=1 WIDTH=100%>&lt;TR>&lt;TH ALIGN=CENTER>Line #&lt;/TH>&lt;TH ALIGN=CENTER>Error&lt;/TH>&lt;/TR>&lt;TR>&lt;TD WIDTH=7% VALIGN=TOP>&lt;P ALIGN=CENTER>63&lt;/TD>&lt;TD>[jsp src:line #:26]&lt;br> cannot resolve symbol symbol  : class FrameworkException  location: class _oa__html._ahlBrowserTitleIncl         catch(FrameworkException fe)               &lt;/TD>&lt;/TR>&lt;TR>&lt;TD WIDTH=7% VALIGN=TOP>&lt;P ALIGN=CENTER>68&lt;/TD>&lt;TD>[jsp src:line #:31]&lt;br> cannot resolve symbol symbol  : variable csiPageContext  location: class _oa__html._ahlBrowserTitleIncl         csiPageContext.setAppId(AhlcmAppConst.APP_ID);         &lt;/TD>&lt;/TR>&lt;TR>&lt;TD WIDTH=7% VALIGN=TOP>&lt;P ALIGN=CENTER>69&lt;/TD>&lt;TD>[jsp src:line #:32]&lt;br> cannot resolve symbol symbol  : variable csiPageContext  location: class _oa__html._ahlBrowserTitleIncl         Hashtable browserTitlePrmpts = CsifutRegion.getPrompts(csiPageContext, "AHL_BROWSER_TITLES");                                                                &lt;/TD>&lt;/TR>&lt;TR>&lt;TD WIDTH=7% VALIGN=TOP>&lt;P ALIGN=CENTER>69&lt;/TD>&lt;TD>[jsp src:line #:32]&lt;br> cannot resolve symbol symbol  : variable CsifutRegion  location: class _oa__html._ahlBrowserTitleIncl         Hashtable browserTitlePrmpts = CsifutRegion.getPrompts(csiPageContext, "AHL_BROWSER_TITLES");                                        &lt;/TD>&lt;/TR>&lt;TR>&lt;TD WIDTH=7% VALIGN=TOP>&lt;P ALIGN=CENTER>73&lt;/TD>&lt;TD>[jsp src:line #:36]&lt;br> cannot resolve symbol symbol  : variable AHL_BROWSER_TITLE_PRMT  location: class _oa__html._ahlBrowserTitleIncl           browserTitle = (String)browserTitlePrmpts.get(AHL_BROWSER_TITLE_PRMT);                                                         &lt;/TD>&lt;/TR>&lt;/TABLE>
[12/11/2007 14:39:43:301] (ERROR) an error returned handling request via protocol "ajpv12"


OACoreGroup.0.stderr

Exception in static block of jtf.cache.CacheManager. Stack trace is: oracle.apps.jtf.base.resources.FrameworkException: IAS Cache initialization failed. The Distributed Caching System failed to initialize on port: 12362. The list of hosts in the distributed caching system is: sandbox1 sandbox2 . The port 12362 should be free on each host running the JVMs. The default port 12362 can be overridden using -Doracle.apps.jtf.cache.IASCacheProvidercacheProvider.port=&lt;port number>
        at oracle.apps.jtf.cache.IASCacheProvider.init(IASCacheProvider.java:220)
        at oracle.apps.jtf.cache.CacheManager.activateCache(CacheManager.java:1444)
        at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:752)
        at oracle.apps.jtf.cache.CacheManager.&lt;clinit>(CacheManager.java:378)
        at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
        at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
        at oracle.apps.fnd.cache.Cache.&lt;init>(Cache.java:89)
        at oracle.apps.fnd.cache.AppsCache.&lt;init>(AppsCache.java:86)
        at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
        at oracle.apps.fnd.profiles.Profiles.&lt;clinit>(Profiles.java:241)
        at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileStore.java:498)
        at oracle.apps.fnd.profiles.ExtendedProfileStore.&lt;init>(ExtendedProfileStore.java:119)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContext.java:4312)
        at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:1171)
        at oracle.apps.fnd.common.Context.setProfileStore(Context.java:970)
        at oracle.apps.fnd.common.Context.setProfileStore(Context.java:952)
        at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:958)
        at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:918)
        at oracle.apps.fnd.common.AppsContext.&lt;init>(AppsContext.java:752)
        at oracle.apps.mwa.container.ApplicationsObjectLibrary.AOLInit(ApplicationsObjectLibrary.java:172)
        at oracle.apps.mwa.container.ApplicationsObjectLibrary.&lt;init>(ApplicationsObjectLibrary.java:76)
        at oracle.apps.mwa.container.MWALib.setObjectLibrary(MWALib.java:333)
        at oracle.apps.mwa.wap.engine.WapServlet.init(WapServlet.java:158)
        at org.apache.jserv.JServServletManager.load_init(JServServletManager.java:755)
        at org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:659)
        at org.apache.jserv.JServServletManager.loadStartupServlets(JServServletManager.java:789)
        at org.apache.jserv.JServServletManager.init(JServServletManager.java:447)
        at org.apache.jserv.JServ.start(JServ.java:625)
        at org.apache.jserv.JServ.main(JServ.java:234)
.....
.....
java.lang.NoClassDefFoundError
        at org.apache.jserv.JServServletManager.load_init(JServServletManager.java:765)
        at org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java:659)
        at org.apache.jserv.JServConnection.processRequest(JServConnection.java:394)
        at org.apache.jserv.JServConnection.run(JServConnection.java:294)
        at java.lang.Thread.run(Thread.java:534)
.....
.....

java.lang.NoClassDefFoundError
        at oracle.apps.fnd.framework.webui.OAPageContextImpl.getMACValidationLevel(OAPageContextImpl.java)
        at oracle.apps.fnd.framework.webui.OAPageBean.isMacEnabled(OAPageBean.java:7254)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:667)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
        at _oa__html._OA._jspService(_OA.java:85)
        at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
        at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
        at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
        at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
        at oracle.jsp.JspServlet.service(JspServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
        at org.apache.jserv.JServConnection.run(JServConnection.java:294)
        at java.lang.Thread.run(Thread.java:534)



javacache.log

sandbox:web_dev> pwd
/ORACLE/apps/dev/common/rgf/dev_sandbox1

....
....
[2007-11-14 Wed 11:59:31.099 AM EST] -001 [Grp] Transport initialization failed.
java.lang.IllegalArgumentException: Port value out of range: 144957
        at java.net.ServerSocket.&lt;init>(ServerSocket.java:180)
        at oracle.ias.cache.group.Transport.createServerSocket(Unknown Source)
        at oracle.ias.cache.group.Transport.ssinit(Unknown Source)
        at oracle.ias.cache.group.Transport.init(Unknown Source)
        at oracle.ias.cache.group.GroupCommunication.init(Unknown Source)
        at oracle.ias.cache.Net.init(Unknown Source)
        at oracle.ias.cache.CacheInternal.init(Unknown Source)
        at oracle.ias.cache.Cache.init(Unknown Source)
        at oracle.apps.jtf.cache.IASCacheProvider.init(IASCacheProvider.java:199)
        at oracle.apps.jtf.cache.CacheManager.activateCache(CacheManager.java:1444)
        at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:752)
        at oracle.apps.jtf.cache.CacheManager.&lt;clinit>(CacheManager.java:378)
        at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
        at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
        at oracle.apps.fnd.cache.Cache.&lt;init>(Cache.java:89)
        at oracle.apps.fnd.cache.AppsCache.&lt;init>(AppsCache.java:86)
        at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
        at oracle.apps.fnd.profiles.Profiles.&lt;clinit>(Profiles.java:241)
        at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileStore.java:498)
        at oracle.apps.fnd.profiles.ExtendedProfileStore.&lt;init>(ExtendedProfileStore.java:119)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContext.java:4312)
        at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:1171)
        at oracle.apps.fnd.common.Context.setProfileStore(Context.java:970)
        at oracle.apps.fnd.common.Context.setProfileStore(Context.java:952)
        at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:958)

....
....

So what is Distributed JTF cache?

Thats when distributed JTF cache feature comes in, which seems to be enabled by default in 11.5.10 (not sure as of which ATG patchset though). Please my previous article What is the Java cache feature: Framework, Features, Administration and How does it tie up with Workflow Business Event System (BES)

Essentially, it is just one kind of Java cache component for the JTF product and has a direct bearing on the compilation of the AppsLocalLogin.jsp page. If some FND profile options were changed from a non-java interface like Forms or sqlplus, AND the Workflow Java Deferred Agent Listener GSM component is NOT running, then there is a high possibility that the JTF cache has been invalidated.

Working around it...

Thankfully, this is when we came across other bugs that talked about disabling the distributed JTF java cache by modifying the following parameters in the $IAS_ORACLE_HOME/Apache/Jserv/etc/jserv.properties and bouncing Apache:

###############################################
# By default the value of DLONG_RUNNING_JVM is true
###############################################
wrapper.bin.parameters=-DLONG_RUNNING_JVM=false

###############################################
# You may have to add this parameter
###############################################
wrapper.bin.parameters=-DCACHEMODE=LOCAL


And this is when it all the features of Java caching started to make sense. Again, for more information and background, I would highly advise you to read the following two articles:

What is the Java cache feature: Framework, Features, Administration and How does it tie up with Workflow Business Event System (BES)

Java Caching for Oracle Applications 11i: Part 1

Conclusion

Java caching can be a pain in the neck, if we do not understand how it works. This can really cause grief in post cloning situations, since FND profile options have to changed to suit to the new environement. In the above case, the issue could also have been resolved by making sure the pending events of Workflow Java Deferred Agent Listener GSM component were processed.

The catch was to understand the Java caching framework and how it was connected with the Workflow Business Event System (BES) events.




January 17, 2008

Java memory leak in XML Parser 2.0.2.9 leads to thousands of workflow notification emails with ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException

Introduction

In a particular customer's production instance (11.5.9, post ATG RUP 5), the WF administrator email was being bombarded with thousands of emails like these:

==================================================
An Error occurred in the following Workflow.

Item Type = XITEMIFS
Item Key = 982893-5825-38602875
User Key =

Error Name = ECX_PROGRAM_EXIT_EMBD
Error Message = 6012: XML Gateway process aborted : 'ORA-29532: Java
call terminated by uncaught Java exception: java.lang.OutOfMemoryError -
ecx_utils.INITIALIZE: '. For further details, see the log corresponding to
FND-Logging AFLOG MODULE Name: ''.
Error Stack =
Wf_Engine.GetItemAttrEvent(XITEMIFS, 982893-5825-38602875,
ECX_EVENT_MESSAGE)
ECX_STANDARD.sendDirectCover(XXINV, SYNC_ITEM)
ECX_STANDARD.Send(XITEMIFS, 982893-5825-38602875, 113178, RUN)
Wf_Engine_Util.Function_Call(ECX_STANDARD.SEND, XITEMIFS,
982893-5825-38602875, 113178, RUN)

Activity Id = 113178
Activity Label = XXINV_RECEIVE_SYNC_EVENT:DOCUMENT_SEND_XMLGATEWAY
Result Code = #EXCEPTION
Notification Id =
Assigned User =

Workflow monitor

Action History

=========================

An Error occurred in the following Workflow.

Item Type = XITEMIFS
Item Key = 986029-5704-38881957
User Key =

Error Name = ECX_PROGRAM_EXIT_EMBD
Error Message = 6012: XML Gateway process aborted : 'ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException - ecx_utils.INITIALIZE: '. For further details, see the log corresponding to FND-Logging AFLOG MODULE Name: ''.
Error Stack =
Wf_Engine.GetItemAttrEvent(XITEMIFS, 986029-5704-38881957, ECX_EVENT_MESSAGE)
ECX_STANDARD.sendDirectCover(XXINV, SYNC_ITEM)
ECX_STANDARD.Send(XITEMIFS, 986029-5704-38881957, 113178, RUN)
Wf_Engine_Util.Function_Call(ECX_STANDARD.SEND, XITEMIFS, 986029-5704-38881957, 113178, RUN)

Activity Id = 113178
Activity Label = XXINV_RECEIVE_SYNC_EVENT:DOCUMENT_SEND_XMLGATEWAY
Result Code = #EXCEPTION
Notification Id =
Assigned User =

==================================================

Another variation...

An Error occurred in the following Workflow.

Item Type = XITEMIFS
Item Key = 982893-5825-38602875
User Key =

Error Name = ECX_PROGRAM_EXIT_EMBD
Error Message = 6012: XML Gateway process aborted : 'ORA-29532: Java call
terminated by uncaught Java exception: java.lang.OutOfMemoryError -
ecx_utils.INITIALIZE: '. For further details, see the log corresponding to
FND-Logging AFLOG MODULE Name: ''.
Error Stack =
Wf_Engine.GetItemAttrEvent(XITEMIFS, 982893-5825-38602875,
ECX_EVENT_MESSAGE)
ECX_STANDARD.sendDirectCover(XXINV, SYNC_ITEM)
ECX_STANDARD.Send(XITEMIFS, 982893-5825-38602875, 113178, RUN)
Wf_Engine_Util.Function_Call(ECX_STANDARD.SEND, XITEMIFS,
982893-5825-38602875, 113178, RUN)

Activity Id = 113178
Activity Label = XXINV_RECEIVE_SYNC_EVENT:DOCUMENT_SEND_XMLGATEWAY
Result Code = #EXCEPTION
Notification Id =
Assigned User =

Workflow monitor

Action History
==================================================

Initial investigation...

Initial investigation revealed that maybe it was beneficial to apply patch 5194357 - REHOST XML PARSER FOR PL/SQL v1.0.2+ for Oracle EBS 11i  (as per Metalink note 356141.1). Patch 5356822 (PATCH FOR XMLGATEWAY MEMORY ISSUES) was also mentioned, but it was not clear if it would solve the problem.

After studying bugs, another patch come up: 5209280 (APPST: ORA-29532: JAVA CALL TERMINATED BY JAVA EXCEPTION:JAVA.LANG.OUTOFMEMORYER). The product mentioned in the patch information is CORE, which can easily be confused with CORE RDBMS product e.g. 9i, 8i etc. The CORE was actually referring to the CORE component of XDK xmlparser product. Apparently, the XDK XML parser was broken in version 2.0.2.9 and fixed in 8.1.7.2.99.

Later on, we came to understand that patch 5194357 was a APPS rehosting of core patch 5209280.

rehosting ?

"rehosting" is an interesting patch terminology. Essentially, it means that a patch for a core XML sub-component was re-certified to be applied in an Oracle Applications 11i environment.

For example, While running patch.sh supplied in patch 5209280, it failed to copy files to $ORACLE_HOME/xdk/plsql/parser/bin . Also since load.sql which was not present in $ORACLE_HOME/xdk/plsql/parser/bin, as mentioned in the README, it could not be executed. It was clear that patch 5209280 made a lot of assumptions about the environment where it was to be executed.

Thats where patch 5194357 (REHOST XML PARSER FOR PL/SQL v1.0.2+ for Oracle EBS 11i) was useful; it was fully compliant to be run with adpatch utility. It was the same fix, but delivered to be applied in an 11i environment.

Workaround

The workaround was to bounce the Workflow Agent Listener Service GSM container from Oracle Applications Manager GUI.

Solution

After applying patch 5194357 (REHOST XML PARSER FOR PL/SQL v1.0.2+ for Oracle EBS 11i) and doing heavy regression testing (marking status of SENT or ERRORed notifications in WF_NOTIFICATIONS as MAIL), the memory stamina of the Workflow Agent Listener Service GSM container increased considerably.

Essentially, there was a memory leak introduced in the previous XML parser used by the pl/sql sessions of Workflow Agent Listener Service.


About January 2008

This page contains all entries posted to Experiments from the Field..Based on True Stories in January 2008. They are listed from oldest to newest.

November 2007 is the previous archive.

February 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type and Oracle