Listen carefully, I shall patch this iAS only once…

A customer recently had a problem with oracle forms on an application server version
(Operating System: AIX version 5.3)

Some research (done by the vendor of the forms application) turned up a bug: 4509399 (when-tree-node-activated not firing if pressing return on a selected node). Well, no problem one would think…

Installing the patch using OPatch went wrong:

Printing stderr to output (from /appl/oracle/as/101202/as/.patch_storage/4509399/make_local.stderr)
/bin/sh: /appl/oracle/as/101202/as/bin/genshlib: not found

make: The error code from the last command is 127.


Make failed. If you continue, you will have to run make manually on the local system.
Do you want to STOP?
Please respond Y|N >
Local make failed. See log file for details.

ERROR: OPatch failed as make operation did not succeed

It turns out we do not have the genshlib script! That mazed me.
But, back to metalink and see if that’s a known problem, or me having a funked up environment.

Metalink showed that it’s correct not to have genshlib installed, and has a patch available: 5488476.
I’ve installed that patch, and back to patch 4509399!

No luck this time:

Comparing "/home/oracle/patch/4509399/files/lib32/libiwfw.a/iwtreh.o" and "/appl/oracle/as/101202/as/.patch_storage/verify/lib32/libiwfw.a/iwtreh.o"

Source file name is : /home/oracle/patch/4509399/files/lib32/libiwfw.a/iwtreh.o, size is : 2820

Destination file name(from OracleHome) is : /appl/oracle/as/101202/as/.patch_storage/verify/lib32/libiwfw.a/iwtreh.o, size is : 2328

Archive failed: failed to update "/appl/oracle/as/101202/as/lib32/libiwfw.a" with updated "/home/oracle/patch/4509399/files/lib32/libiwfw.a/iwtreh.o"

There are 1 issues patching static library in Oracle Home.

FILE PROBLEM: some files are not patched.

OPATCH_JAVA_ERROR: Patch was not successfully applied.

Verification of the patch failed.

ERROR: OPatch failed as verification of the patch failed.

Warning! Any information beyond this point is unsupported and only for education purposes!!

Time to dissect this patch. What does it do?
First, look at the patch:

AS /home/oracle/patch/4509399 >find .

The “/files” section has the files which are needed for this patch, in our case one object file, iwtreh.o.
The “/etc” section has the actions which OPatch needs to do.

Now we have to find out what is being done…One step beyond!

The “/etc/config/actions” file has the actions (not surprisingly) and the variables:

There are three actions here:
-archive, with variables: name, path and object_name
-make, with variables: change_dir, make_file and make_target
-make, with variables: change_dir, make_file and make_target

But OPatch needs more information; this information is present in “/etc/xml/GenericActions.xml”





So, we have the actions and the variables (“actions”), and we have a file which describes how these actions are done (“GenericActions.xml”).

That’s enough to gain understanding on what this patch is doing:
1. An object (“iwtreh.o”) in the archive “/appl/oracle/as/101202/as/lib32/libiwfw.a” is being replaced
2. After that, the shared libraries are rebuild (this way the new object in the archive is known by the libraries who are depended on this archive), which is being done using the target “sharedlib”.
3. After that, the forms executables are relinked and installed in the bin (using the target “install”)

Well, we just can do that, can’t we?

1. replace object “iwtreh.o” in “libiwfw.a”
1.1 first make a safety-copy

$ cd /appl/oracle/as/101202/as/lib32/
$ cp libiwfw.a libiwfw.a.orig

1.2 replace the object using the ar command (the command is present in the osname=”AIX-Based Systems (64-bit) 5L” section)

$ ar -rc -X32_64 libiwfw.a /home/oracle/patch/4509399/files/lib32/libiwfw.a/iwtreh.o

At this point we replaced the object in the archive, now we have to manually rebuild the forms shared libraries, and relink the forms executables:

2. generate forms shared libraries

$ cd /appl/oracle/as/101202/as/forms/lib32
$ make -f sharedlib

3. relink and install forms executables

$ make -f install

  1. Noons said:

    Ouch! I do sympathize, been in this same situation too many times already!

    One of the many reasons I don’t like to patch Oracle systems: enough problems as is without adding to them with opatch instability…

  2. Administrator said:

    Thanks! In my opinion it’s careless that not all scripts are included in the install.

    It’s a shame the OPatch isn’t more stable, but I do understand the need for it; most database veterans (who have done patching and relinking by hand many, many times) feel to have their hand tied by using the OPatch wrapper scripts, but I do understand that less experienced administrators feel awkward by issuing make commands manually. Also there is the risk of errors of forgetting steps (like rebuilding shared libraries, but forgetting to relink)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: