Oracle Blog

March 6, 2009

Yellow Bar

Filed under: Jinitiator, Script — Vikram @ 12:08 am
Tags: ,

Here I discuss a way to automate the fix for yellow-bar resolution that I had used for one of my clients. This involves very minimal end-user intervention and introduces a windows batch script that will do the dirty work for us.

Yellow Bar‘?
When Oracle Applications is launched, Oracle expects its code to be executed in a trusted environment and so uses JInitiator to run Java applets. The features of the applet are extended in a trusted mode. Rather, the features of the applet are restricted in a non-trusted mode. The Yellow Bar at the end of the applet window is how the applet conveys you that the it is not running in the trusted mode.

symptoms?
A basic symptom which is most often reported by the end-users is their inability to copy/paste data from the forms onto their notepads/editors on Desktop client. When not in trusted mode, applet doesn’t allow the data to be accessed in that mode.

fix?
Let the applets run in the trusted mode. Yellow bar will disappear.

How to run the applets in the trusted mode?
The applets are run in trusted mode if they are digitally signed by a digital certificate.

Each JAR file is signed with a digital certificate. The certificate is usually in the location $APPL_TOP/admin/appltop.cer on the middle_tier. When an applet is downloaded for execution, Jinitiator verifies the certificate of that applet and checks for its availability in its database. If the certificate is registered with the jinitiator the applet can be trusted and so the users wont see the yellow bar.

A typical way of resolving yellow bar is to uninstall JInitiator on the local PC and launch the application, which will bring along with it the identitydb.obj file that contains the certificate. The applets already are signed with the certificates in the identitydb.obj file and so the yellow bar should disappear.

Another way of resolving yellow bar is to import the certificate of the application that is complaining Yellow Bar into the existing identitydb.obj file. This is a more convenient method but involves the end user to perform a few steps on his PC. However, with a little script one can automate this procedure and not overwhelm the end-users by making them do things beyond their scope.

In short the steps to import the digital certificate into the existing identitydb.obj file are below:
1) Copy the $APPL_TOP/admin/appltop.cer file from the Application node onto the local PC.

Copy the file into the "C:\Program Files\Oracle\<JInitiator version>/bin directory.
The <JInitiator version> in the above path should be replaced with the version of the Jinitiator the application uses in the MIDDLE_TiER.
Example path: "C:\Program Files\Oracle\JInitiator 1.1.8.16\bin"

2) Open a command prompt on the Windows Desktop client and change directory to “C:\Program Files\Oracle\JInitiator 1.1.8.16\bin”

Start --> Run --> cmd

Then type the below commands in the cmd prompt:

C:\Documents and Settings\Vikram> cd "C:\Program Files\Oracle\JInitiator 1.1.8.16\bin"
C:\Documents and Settings\Vikram> javakey c <name> true (creates a new trusted applet called <name> in identitydb.obj)
C:\Documents and Settings\Vikram> javakey ic <name> appltop.cer (signs the new <name> trusted applet with the new certificate appltop.cer)
C:\Documents and Settings\Vikram> javakey -l (displays all the trusted certificates)

3) Clear browser cache

4) Clear JCache directory contents in the “C:\Program Files\Oracle\JInitiator 1.1.8.16\JCache” directory

5) Launch the application in a fresh browser.

The above steps need to be performed on each client Desktop and if there are 500 users, then 500 users will be asked to perform these steps on their Desktop clients. It is asking too much of course. There is a simpler way to automate this procedure for all users and lets see how.

The below steps need to be performed on the MIDDLE_TIER
1) Create a new directory and copy into it the certificate that needs to be imported onto the client desktops.

$ mkdir yellow
$ cp $APPL_TOP/admin/appltop.cer yellow
$ cd yellow

2) Open the editor (vi/emacs) and paste the following code.

copy appltop.cer "C:\program files\oracle\jinitiator 1.1.8.16\bin"
cd "c:\program files\oracle\JInitiator 1.1.8.16\bin"
c:
del /Q "C:\Program Files\Oracle\JInitiator 1.1.8.16\jcache\*"
javakey c SAND true
javakey ic SAND appltop.cer
javakey l

Save the file as yellow.bat.
Note, there are two things that you need to remember while using this code:

    Change the JInitator path to suit your needs
    SAND is my DB SID. You may change it to yours.

3) Zip the current directory and place it in $OA_HTML directory
Issue the below command from the same directory where you saved the yellow.bat and appltop.cer files.

$ zip -r $OA_HTML/yellow.zip ../yellow
$ ls -ltr $OA_HTML/yellow*

This is complete. Now all remains to be done is for the users to do the below to fix the yellow-bar issue on their respective clients boxes.

The below steps are performed by individual end-users

4) Launch the URL: http://hostname.domainname:port/OA_HTML/yellow.zip
The browser prompts you to save the file. Save the file in any location of your convenience.

5) Unzip the contents and double-click on the yellow.bat file within the unzipped directory.

6) Launch the application in a fresh browser. Yellow bar should not be seen anymore, hopefully.

Thank you for reading this. You may leave a comment here if you have any doubts and I shall respond.

Blog at WordPress.com.