You are on page 1of 65

Oracle9 lorms Diagnostic

1echniques

.v Oracte 1ecbvicat !bite Paer
]avvar, 2001
Oracle 9 Forms Diagnostic Techniques.................................Page 2

Oracle 9i lorms Diagnostic 1echniques
Introduction ....................................................................................................... 4
Purpose........................................................................................................... 4
Audience......................................................................................................... 4
A Diagnostic Approach to Problem Resolution...................................... 4
Veriying the installation. ................................................................................. 5
Using \eb lorm 1ester .............................................................................. 6
Using the Appletiewer................................................................................ 8
Coniguring and Deploying lorms............................................................... 10
lormsweb.cg.............................................................................................. 10
Deault.en................................................................................................... 11
Registry.dat................................................................................................... 12
Oracle Jinitiator ........................................................................................... 14
linding the Ports ........................................................................................ 1
Block Schematic o a lorms session. ........................................................... 19
lorms Serlet and lorms Listener Serlet.............................................. 21
Diagnostic 1ools ............................................................................................. 22
\hat does the Applet show .................................................................... 22
\hat does the Jinitiator`s Jaa console show ....................................... 23
Using lorms 1race ..................................................................................... 25
Using Serlet logs........................................................................................ 2
lRM-92XXX Lrrors....................................................................................... 28
lRM-92010.................................................................................................. 31
lRM-92050.................................................................................................. 31
lRM-92100.................................................................................................. 36
lRM-92101.................................................................................................. 3
lRM-92102.................................................................................................. 38
lRM-92120.................................................................................................. 39
lRM-92150,lRM-92160 .......................................................................... 41
Other Problems ............................................................................................... 41
Serer Crash................................................................................................. 41
An example o a dump ile on Solaris. ................................................ 41
An example o a dump ile on \indows. ........................................... 43
Veriying the enironment. ................................................................... 44
Use o dump ile. .................................................................................... 44
Client Crash ................................................................................................. 45
An example o a dump ile.................................................................... 45
Use o dump ile. .................................................................................... 50
Oracle 9 Forms Diagnostic Techniques.................................Page 3

Application langing .................................................................................. 50
Jaa 1hread Dump................................................................................. 50
Use o Dumps......................................................................................... 55
Causes o Application hanging............................................................. 55
Memory Problems ...................................................................................... 56
Setting JVM Runtime options .............................................................. 56
\hat is Memory leak............................................................................ 5
Memory leaks in Jaa ........................................................................... 58
low to identiy memory leak ............................................................. 58
Perormance Problems .............................................................................. 59
\hat is caching ..................................................................................... 59
\hy is it important............................................................................... 59
low to check i caching is enabled ................................................... 60
Perormance improements in OJDK .............................................. 60
1erminology..................................................................................................... 63
\hat is Oracle home ................................................................................ 63
\hat is a Serlet ........................................................................................ 63
\hat is JInitiator ....................................................................................... 63
More 1erms ................................................................................................. 64





Oracle 9 Forms Diagnostic Techniques.................................Page 4

Oracle9 lorms Diagnostic 1echniques
INTRODUCTION
Purpose
1his document proides inormation that will help you resole problems that occur
when you run an application oer the \eb using Oracle9i lorms. It contains an
outline o: the common causes or errors, the method you can use to eriy your
installation, and the tools and techniques proided to diagnose the problem.
Audience
1his document is intended or anyone inoled in diagnosing and resoling
problems with Oracle9i lorms particularly Oracle9iAS lorms Serices, a
component o Oracle9i Application Serer. Ater reading this paper you will hae a
good understanding o the diagnostic process, and will know the aailable
techniques and tools to aid inormation gathering and ultimately problem
resolution.
Note: \ou, as the system administrator o Oracle Applications, must be aware that
some sections o this document do not apply to Oracle Applications. Oracle
Applications has a tightly controlled enironment. 1hereore, beore proceeding,
ensure that you check with Oracle Support Serices whether the steps you intend
to take or the task are supported or use with Oracle Applications. ,this can go as a
side bar in the new document template,
A Diagnostic Approach to ProbIem ResoIution
Lerybody approaches a problem dierently. By accessing the troubleshooting list
below, you do not hae a deinitie guide to problem soling or hae a guaranteed
resolution, howeer, the list may help you deal with a complex problem.
A list o troubleshooting hints ollows:
Be methodical.
Don`t leap to the area you beliee to be the cause based on a hunch, or
a guess - make sure you eliminate the other possibilities irst. An easy
trap to all into is that o spending long periods o time trying to ind
eidence to support your theory, rather than concentrating on what the
eidence shows.
Don`t oerlook the triial or the obious.

Oracle 9 Forms Diagnostic Techniques.................................Page 5

Divide the problem into sections.
Chop the problem into manageable sections - this helps eliminate
whole areas rom inestigation. As you inestigate an area and satisy
yoursel that the problem does not lie there, you can proceed to the
next section. An approach to diagnosing a problem that is oten
successul is to reduce it to its essential parts. 1his will be important i
you need to discuss the problem with Oracle Support Serices to obtain
a solution.
Deine what happens, when it happens, how oten it happens. O
equal importance is, understanding what does not happen, when it does
not happen etc. lor example, i a group o users in the same building all
get the problem, and it always happens between 9 and 10am, it is just as
important to know that it neer reproduces in another building, or ater
10pm. Perhaps the users only use a particular lorm between 9 and 10,
or the load on the system is highest between 9 and 10am.
Read the error messages.
It sounds obious, but sometimes the inormation is right there in the
error text.
1his document will help you understand the error messages, and help
identiy what action to take.
Make sure you can reproduce the problem, if possible.
I you can reproduce the problem yoursel, you may notice some
behaiour that the end user neer spotted - perhaps it had always
happened, so they simply assumed it was meant to happen. I you can
reproduce the problem then you hae already started the irst step to
resole it.
Make sure you understand the tools you are trying to use.
I you decide to use a diagnostic tool, make sure you know how to use
it, and how to interpret the data it produces. 1ime spent in inestigating
the usage o a tool beore the problem happens is time well inested.
lae time to learn the tool as well.

VERIFYING THE INSTALLATION.

I the installation goes wrong, then it will result in aulty coniguration and lorms
will not run correctly. lortunately, ater the Oracle Uniersal Installer says that
Oracle 9iAS,9iDS was successully installed, it can be eriied whether lorms
serices is correctly conigured or not. \ou may do this as ollows.
Oracle 9 Forms Diagnostic Techniques.................................Page 6

Using Web Form Tester
1his comes with your Oracle 9iAS,9iDS installation. 1o eriy whether the Oracle
9iAS,9iDS installation and coniguration o lorms Serices is correct, run the \eb
lorm 1ester on the middle tier. 1he ollowing is an example o how this can be
done on a \indows machine.
Start the l11P Serer by selecting Start Program Iiles
Oracle Application Server-IAS Home Oracle H11P Server
Start H11P Server, i it is not already started. lor Oracle 9iDS, start
the OC4J instance ,i not already started, by selecting Start
Program Iiles Oracle9i Developer SuiteHome for IDS
Iorms Developer Start OC4J Instance`.
Open an instance o the browser.
1ype <OracleHome>\tools\web90\html\runform.htm or URL
and hit the LN1LR key. Replace <OracleHome> with your actual
Oracle home or Oracle 9iAS,9iDS.
OR \ou may also run the \eb lorm 1ester by selecting
`Start Program Iiles Oracle9iASHome for IAS Iorms
Developer Oracle9iAS Iorms Services Run a form on the
web` rom the Start-up menu or Oracle 9iAS. In case o Oracle 9iDS,
select Start Program Iiles Oracle9i Developer SuiteHome
for IDS Iorms Developer Oracle9iAS Iorms Services Run
a form on the web` rom the Start-up menu.
Oracle 9 Forms Diagnostic Techniques.................................Page 7


Lnter the \eb port and click on the Run form button. Reer the
section ivaivg tbe Port. o this document to know how to ind out the
\eb port.
Oracle 9 Forms Diagnostic Techniques.................................Page 8


I the orm comes up as aboe, then the installation o Oracle 9iAS,9iDS and its
coniguration is correct.
Also, it can be tested rom a client machine whether the basic orms setup in
Oracle 9iAS,9iDS on the middle tier is done correctly by the installer or not. \ou
can run the test orm rom any client machine by running it rom the browser with
the URL http:,,myserer.com: NNNN,orms90,90serletorm~test.mx`.

Using the AppIetviewer

\hile using the \eb lorm 1ester to eriy the installation, the lorm that came up
was test.mx present in Oraclelome,orms90. 1he same orm can be used
,\ou can as well use any other orm, to eriy the healthiness o lorms Runtime
,iweb90.exe on windows and 90webm on solaris,. 1o do this, create an html ile
,say, test.html, in the directory Oraclelome,orms90,jaa. 1he contents o
test.html will be as ollows.

<HTML>
<APPLET CODEBASE="."
CODE="oracle.forms.engine.Main"
WIDTH="500"
HEIGHT="400">
<PARAM NAME="SERVERHOST" VALUE="incq139b.idc.oracle.com">
<PARAM NAME="ARCHIVE" VALUE="f90all.jar">
PIease note that in the exampIe shown,
E:\Ora9iAS is the OracIe Home for OracIe 9iAS.
RepIace it with your OracIe home.
Oracle 9 Forms Diagnostic Techniques.................................Page 9

<PARAM NAME="SERVERPORT" VALUE="9000">
<PARAM NAME="SERVERARGS" VALUE="module=E:\Ora9iAS\forms90\test.fmx">
</APPLET>
<HTML>

1he ollowing is a brie explanation or the highlighted tags in the aboe html ile.
CODL:
1his points to the initial Jaa class to start running the applet.
CODLBASL:
1his is the location o the initial class ,speciied in CODL, to start
running when starting the applet.
ARCHIVL:
1his reers to the location o the Jar iles. In our case it is the location
o the Jar ile that contains the orms Jaa classes.
SLRVLRHOS1:
1his is the name o the host machine on which the lorms web runtime
,iweb90.exe or \indows or 90webm or solaris, runs.
SLRVLRPOR1:
1his is the port number used by the applet to communicate with the
lorms web runtime.
SLRVLRARGS:
1his is the command line passed to the orms web runtime. I you
speciy the module here, it reers to the orm ,.mx ile, on the machine
on which the orms web runtime runs.

laing created the test.html ile, open a command prompt window and execute the
ollowing commands ,gien in bold ont,.

Microsoft(R) Windows NT(TM)
(C) Copyright 1985-1996 Microsoft Corp.
C:\>e:
E:\>cd E:\ORA9iAS\forms90\java
E:\ORA9iAS\forms90\java>ifweb90 webfile=-9000
E:\ORA9iAS\forms90\java>E:\ORA9iAS\jdk\bin\appletviewer.exe test.html

1his will launch the orm test.mx in an applet iewer as ollows. I the orm comes
up in the applet iewer, lorms runtime is working ine. 1hus, using the applet
iewer you can eriy the working o lorms.
PIease note that in the exampIe shown,
E:\Ora9iAS is the OracIe Home for OracIe 9iAS.
RepIace it with your OracIe home.
Oracle 9 Forms Diagnostic Techniques.................................Page 10




CONFIGURING AND DEPLOYING FORMS.

Oracle 9iAS,9iDS is automatically conigured to use lorms Serices out-o-the-
box, ater installation. 1he only coniguration you need to worry about is your
application coniguration.
1here are three iles to conigure lorms Serices or runtime deployment. 1hey
reside centrally on the serer, so only need to be conigured in one place.
Oraclelome,orms90,serer,ormsweb.cg
Oraclelome,orms90,serer,deault.en
Oraclelome,orms90,jaa,oracle,orms,registry,Registry.dat
1he names o these iles are conigurable, but these are the deault. 1he
combination o these three iles allows you to hae many dierent runtime
enironments rom a single installation.
Formsweb.cfg
\ith Oracle lorms on the web, you speciy runtime parameters in the
ormsweb.cg ile. 1his ile controls the settings or each lorms application. It has
a deault section, plus optional sections or each application, to oerride the deault
settings. 1he ollowing is a snippet o some o the entries in the ormsweb.cg ile:

Oracle 9 Forms Diagnostic Techniques.................................Page 11

userid =
form=test.fmx
background=
width= 640
height=480

[summit]
userid=summit/summit@forms1-pc
form=customers
background=summit.jpg
width=994
height=582

1he irst settings are the deault settings. All lorms applications will use them,
unless speciically oerridden. 1he |summit| represent application-speciic settings,
and oerrides the deaults, in this case or the Summit application. lor instance, by
deault, a orm will hae no background. \hen the Summit application is run, the
background will be the image summit.jpg.

,Note that background here reers to the background in the lorms Client Jaa
Applet, not the background canas within the lorm itsel. Similarly, the width and
height parameters reer to the width and height o the Jaa Applet, not the width
and height o the lorms windows., \hen you run a lorms application, you can
speciy the section to use rom this ile with the conig parameter. lor example:

http:,,myserer.com:NNNN,orms90,90serletconig~summit

where, NNNN is the port number on which lorms Serices is running. \hile it is
conenient to name the application section ,|summit|, in ormsweb.cg the same as
the application itsel ,Summit,, it is not necessary. Seeral dierent applications
may use the same application section, or example.

DefauIt.env
1his is where enironment ariables are speciied. Some ariables that you might
typically want to set are:
ORACLL_lOML
lORMS90_PA1l
CLASSPA1l
Oracle 9 Forms Diagnostic Techniques.................................Page 12

By deault, the deault.en ile gets sourced each time a user starts a lorms
application. loweer, each application can choose to use its own LNV ile with the
enlile setting ,in lormsweb.cg ile, as ollows:

userid =
form=test.fmx
background=
width= 640
height=480
envFile=default.env


[summit]
userid=summit/summit@forms1-pc
form=customers
background=summit.jpg
width=994
height=582
envFile=summit.env

Registry.dat
1his ile lets you speciy settings or controlling icons and onts within lorms at
runtime. lere you speciy where lorms can ind icons with the
deault.icons.iconpath setting:

deault.icons.iconpath~C:`MyApp`icons,C:`MyOtherApp`icons
Lach application can choose to use its own registry ile by speciying the sererApp
setting in the ormsweb.cg ile, as ollows.


userid =
form=test.fmx
background=
width= 640
height=480
envFile=default.env

[summit]
userid=summit/summit@forms1-pc
Oracle 9 Forms Diagnostic Techniques.................................Page 13

form=customers
background=summit.jpg
width=994
height=582
envFile=summit.env
serverApp=/summitapp/summit_registry

sererApp speciies the registry ile, without extension, using a URL. In this
example, it is a relatie URL, where ,summitapp, is deined as a irtual directory in
the web serer coniguration iles.

Once you hae conigured lorms Serices, you can run your applications. 1o do
so, you enter the URL or your application in a browser. 1he URL will look
something like the ollowing:

http:,,myserer.com:NNNN,orms90,90serletconig~summit

where, NNNN is the port number o lorms Serices. 1he Oracle9i Application
Serer is conigured to route these requests to the lorms Serlet. 1he
"conig~summit" is a parameter to the lorms Serlet to tell it to look up the
|summit| section in ormsweb.cg, and use those settings. 1hat is how lorms
Serices knows which orm to run, which userid to use, etc.

1he conig parameter is optional. I omitted, lorms Serices will use the
parameters rom the deault setting o the ormsweb.cg ile. lrom the example in
section orv.reb.cfg, or instance, i the conig parameter were not present, the
orm test.mx would be run. \ou may also oerride many o the settings rom
ormsweb.cg, on the URL. lor example, the ollowing URLs are all alid:


http://myserver.com:NNNN/forms90/f90servlet?form=myform.fmx

Uses the default settings, but runs the module myform.fmx
instead.

http://myserver.com:NNNN/forms90/f90servlet?config=summit&form=
summitTest.fmx

Uses the settings specified in the [summit] section, but uses a
different form: summitTest.fmx.

http://myserver.com:NNNN/forms90/f90servlet?config=summit&form=
summitTest.fmx&usreid=scott/tiger@test

In OracIe Forms 10g there is the
abiIity to restrict which parameters
can be overwritten. For more detaiIs
see the OracIe Forms 10g New
Features paper on OTN.

Oracle 9 Forms Diagnostic Techniques.................................Page 14

Same as the previous example, except that it connects to a
different database.


1he ormsweb.cg ile contains comments about the parameters that the user on
the URL may oerride. 1he others may only be set by the administrator, and
cannot be oerridden on the URL. I no userid is speciied, either in the
ormsweb.cg ile, or on the URL, then the user will be prompted to enter a
username and password.


OracIe Jinitiator
Oracle JInitiator is installed and conigured by the Oracle Uniersal Installer when
you install Oracle 9iAS,9iDS. 1his section will be useul in case you wanted to use
a newer ersion o JInitiator, which can be downloaded rom Oracle`s Metalink
\eb site ,http:,,metalink.oracle.com,.

Ater installing the Oracle JInitiator ,newer ersion,, the readme.htm and the
jinit_tags.htm iles proide useul inormation. 1he readme.htm contains details o
ersion compatibility o Oracle JInitiator and browsers, and also the MIML types
and classid supported. 1he jinit_tags.htm ile explains the use o l1ML tags to use
Oracle JInitiator with both Netscape and Internet Lxplorer.

\hen Oracle JInitiator is installed, it registers its classid so that Internet Lxplorer
knows to use it.

In order or your browser to recognize that you wish to use Oracle JInitiator to run
the lorms applet, it looks or a ile called basejini.htm. 1his l1ML ile, present in
Oraclelome,orms90,serer directory, contains the inormation required to
use Oracle JInitiator with both Netscape and Internet Lxplorer. As both these
browsers use dierent syntax to load plug-ins such as JInitiator, some o the
inormation in the l1ML ile will be duplicated. 1he inormation contained within
the LMBLD tag is recognized by Netscape, and the OBJLC1 tag is
recognized by the Internet Lxplorer. 1his ile contains ariables enclosed in percent
characters ,,. 1he alues or these ariables are deined in the serlet
coniguration ile ,ormsweb.cg,.


A sample html ile or use with Internet explorer is as ollows.


When SSO is enabIed, the Database credentiaI is
extracted from OID.
Oracle 9 Forms Diagnostic Techniques.................................Page 15

<HTML>
<HEAD>
<TITLE>Oracle9iAS Forms Services</TITLE>
</HEAD>
<BODY >
<OBJECT classid="clsid:CAFECAFE-0013-0001-0013-ABCDEFABCDEF"
codebase="/forms90/jinitiator/jinit.exe#Version=1,3,1,13"
WIDTH="750"
HEIGHT="600"
<PARAM NAME="TYPE" VALUE="application/x-jinit-
applet;version=1.3.1.13">
<PARAM NAME="CODEBASE" VALUE="/forms90/java">
<PARAM NAME="CODE" VALUE="oracle.forms.engine.Main" >
<PARAM NAME="ARCHIVE" VALUE="f90all_jinit.jar" >
<PARAM NAME="serverURL"
VALUE="/forms90/l90servlet?ifcfs=/forms90/f90servlet?acceptLanguage=en
-us">
<PARAM NAME="serverArgs" VALUE="module=test.fmx">
</OBJECT>
</BODY>
</HTML>

1he highlighted sections are the only things, which need to be changed in
ormsweb.cg or a basic setup. A brie description ollows.

classid:
1his is the classid o the application which is being loaded. Lxplorer
will use this id to determine which plug-in is needed to support this
application, and will then attempt to load it. 1he alue will depend on
the ersion o JInitiator installed. See the Oracle JInitiator readme.htm
ile or the correct alue or the release o JInitiator you are using.

codebase:
I Lxplorer cannot ind a plug-in which can handle this type o
application, the user will be able to download a copy o the plug-in
,Oracle JInitiator, rom this URL. I you hae installed Oracle
JInitiator manually, this entry may be ignored or now. Do not conuse
this with the entry PARAM NAML~`CODLBASL`.

PARAM NAML=CODLBASL:
1his entry points to the root directory o the Jaa class iles on the
serer.

Oracle 9 Forms Diagnostic Techniques.................................Page 16

PARAM NAML=ARCHIVL:
1his tells the JVM where to ind JAR iles. 1his is also a irtual
directory deined by the l11P Serer.

PARAM NAML=1YPL:
1his is the MIML type o the application, which is being loaded.

PARAM NAML=serverArgs:
1his is the command line passed to the lorms web runtime.

A sample html ile or use with Netscape is as ollows.

<HTML>
<HEAD><TITLE>Oracle9iAS Forms Services</TITLE></HEAD>
<BODY >
<EMBED SRC="" PLUGINSPAGE="/forms90/jinitiator/us/jinit_download.htm"
TYPE="application/x-jinit-applet;version=1.3.1.13"
java_codebase="/forms90/java"
java_code="oracle.forms.engine.Main"
java_archive="f90all_jinit.jar"
WIDTH="750" HEIGHT="600"
serverURL="/forms90/l90servlet?ifcfs=/forms90/f90servlet?acceptLanguag
e=en-us"
serverArgs module=test.fmx >
<NOEMBED> </NOEMBED></EMBED>
</BODY>
</HTML>

1he highlighted items ,tags, are the only things, which need to be changed in
ormsweb.cg or a basic setup. A brie description ollows.
1YPL:
1his is the MIML type o the application, which is being loaded.
Netscape will attempt to load a plug-in, which can support this MIML
type. 1he alue will depend on the ersion o JInitiator installed. See
readme.htm in the `doc directory or the correct alue. 1his MIML
type will work with any ersion o Oracle JInitiator. loweer, it will
not always choose the latest ersion i you hae multiple ersions o
JInitiator installed. lor that reason, it is strongly recommended that you
speciy the required ersion o JInitiator.

Oracle 9 Forms Diagnostic Techniques.................................Page 17

java_codebase:
1his entry points to the root directory o the Jaa class iles on the
serer. 1his is a irtual directory.

java_archive:
1ells the JVM where to ind JAR iles. 1his is also a irtual directory.

PLUGINSPAGL:
I Netscape cannot ind a plug-in, which can handle this MIML type,
the user will be able to download a copy o the plug-in ,Oracle
JInitiator, rom this URL. I you hae installed Oracle JInitiator
manually, this entry may be ignored or now.

Finding the Ports
\hen in doubt or you want to know what port numbers to use to run lorms ater
installation, you may take a look at it in the ile Oraclelome`install`portlist.ini.
Use the appropriate port numbers or your installation.

1his is how the portlist.ini or Oracle9iDS looks like ater installation.

Oracle9iDS HTTP port = 8889 Use this port to run Forms in IDS.
Oracle9iDS JMS port = 9240
Oracle9iDS RMI port = 23910
Oracle HTTP Server Diagnostic port = 7201
.


In Oracle9iAS, ater the installation the portlist.ini looks as ollows.
Oracle HTTP Server Jserv port = 8007
;OracleAS Components reserve the following ports at install time.
;As a post-installation step, you can reconfigure a component to use a
different port.
;Those changes will not be visible in this file.

[System]
Host Name = incq139b

[Ports]
Oracle HTTP Server port = 7777 Use this port to run Forms in IAS.
Oracle HTTP Server Listen port = 7778
Oracle 9 Forms Diagnostic Techniques.................................Page 18

Oracle HTTP Server SSL port = 4443
Oracle HTTP Server Listen (SSL) port = 4444
Oracle HTTP Server Diagnostic port = 7200
Log Loader port = 44000
Java Object Cache port = 7000
Enterprise Manager Agent Port = 1830
Enterprise Manager Oracle9iAS Console RMI port = 1850
Oracle HTTP Server Listen port = 7778
Oracle HTTP Server Listen (SSL) port = 4444
Oracle Notification Server Request port = 6003
Oracle Notification Server Local port = 6100
Oracle Notification Server Remote port = 6200
DCM Java Object Cache port = 7100
Enterprise Manager Oracle9iAS Console port = 1812
Web Cache HTTP Listen port = 7777
Web Cache HTTP Listen (SSL) port = 4443
Web Cache Administration port = 4000
Web Cache Invalidation port = 4001
Web Cache Statistics port = 4002
Oracle9iAS Discoverer port = 7777
Osagent Port = 16002
Reports Services SQL*Net port = 1950
Reports Services Visigenics CORBA port = 14000


Oracle 9 Forms Diagnostic Techniques.................................Page 19


BLOCK SCHEMATIC OF A FORMS SESSION.

An understanding o what happens during a lorms session is important to
eectiely trouble-shoot web orms issues. 1his section gies a brie anatomy o a
orms session.






1he block schematic o Oracle 9i lorms session shows the architecture o
deploying a lorms application. 1his is a three-tier architecture, with a client tier, a
database tier, and the application tier being composed o the \eb Serer and
lorms serices on two separate machines. ,1he middle tier does not necessarily
mean a single machine.,

1he block schematic shows only one possibility. Other combinations include
haing lorms Serices on the same machine as the \eb Serer, or haing multiple
machines with lorms Serices, and load balancing oer them. In all cases, the
components are the same, and must exist ,l11P Serer, Serlet Lngine, lorms
Serlet, lorms Listener Serlet, and lorms Runtime Processes,. 1he only
dierence is how many there are, and on which machines they run.

Oracle 9 Forms Diagnostic Techniques.................................Page 20

Also note rom the block schematic that the user may be on the same intranet
network as the middle tier, or they may be accessing lorms oer the internet,
through irewalls and proxies. It is irreleant to lorms how the client accesses the
middle tier.

lere is what happens at a high-leel, when you run a orm on the web ,reer to the
block schematic o Oracle 9i lorms Architecture you read these steps,:

1. 1he user starts up a browser and naigates to the adertised URL or the
lorms Application, just like they would or any other URL: by clicking a link,
choosing it rom a aorites list, typing it manually, etc.

2. 1he application serer ,the middle tier, responds with an l1ML page that
contains a Jaa Applet. 1his is the lorms Client. 1here is only one Applet,
which runs all lorms, no matter how small or large. In addition, the Applet is
cached on the client and needs to be downloaded only once.

3. 1he lorms Client starts and connects to the serer, ia the application serer.
All lorms communication goes through the application serer, just like any
other web application would, which means lorms will work through proxies
and irewalls, oer the Internet.

4. 1he serer sees that the user is starting the application, and does two things:
creates a serlet session`, and starts a lorms Runtime Process.

5. 1he lorms Runtime Process is the engine that actually runs the application.
Lach user has his,her own lorms Runtime Process, which is terminated when
the session ends.

1he lorms Listener Serlet is responsible or making sure that each request
rom the client gets routed to the correct Runtime Process, and that the
responses rom the Runtime Process gets sent to the correct client.

6. 1he lorms Runtime Process on the serer executes all o the lorms logic. So
the lorms Runtime Process opens the appropriate lMX ile, connects to the
database, and does eerything needed to start the orm. It puts the cursor in
the irst ield and notiies the client. 1he inormation sent to the client is the
Oracle 9 Forms Diagnostic Techniques.................................Page 21

layout o the screen and the cursor position.

. Only the UI inormation is sent to the client. 1his is the biggest key to
understanding how lorms on the web works: ^o togic eecvte. ov tbe ctievt.
1he client displays the screen, with the cursor in the irst ield, and the user
can begin to interact with the orm.

8. Suppose the user types in a alue and naigates to the next ield. 1he client
sends a message to the serer with the alue and what the user did. 1he serer
processes this and sends a response to the client as to what it should display
now.

lor example, there might be a \lLN-VALIDA1L-I1LM trigger on the irst
ield, which ailed, and re-directs the cursor back to it. 1he lorms Runtime
Process sends a message relaying this inormation to the client. Remember,
the client doesn`t execute any lorms logic. It simply updates the releant area
on the screen and inorms the lorms runtime when a user action has taken
place ,like clicking in a ield,. Now the user can continue.

Lach major action on the client, such as naigating between ields, choosing an
item rom a list, etc, results in a roundtrip to the serer to be processed by the
lorms Runtime Process.

Forms ServIet and Forms Listener ServIet
Because o the similarity o their names, it is easy to get conused by the two
serlets proided by lorms.

1he lorms Serlet is used only or the initial connection when a user starts a
lorms application. It returns the l1ML ile to the client, which contains the applet
that is the lorms Client.

Once the Jaa Applet has started and a session is created, all o the communication
goes through the lorms Listener Serlet.

\e now know how to eriy the installation, conigure and deploy lorms, as well
as the anatomy o a lorms session. \e will take a look at some o the errors one
might come across in the section RM2``` rror..
Oracle 9 Forms Diagnostic Techniques.................................Page 22




DIAGNOSTIC TOOLS

Simple diagnostic tools like the Applet itsel and the JInitiator`s Jaa Console are
ery useul in obtaining inormation that is o immense help in resoling the
problem.
What does the AppIet show?
1he brie message about the lRM error should help in identiying the basic cause
o the problem. Oten, eerything required to identiy the cause an lRM error is
contained in the error reported by the lorms applet. \hen a lRM error is raised,
the error dialog will hae a Details` button.









Pressing the Details` button will show the current Jaa stack. 1he exact stack is
dictated by the root cause and the release o lorms. 1his is due to the diering
package structure used or the applet class iles in the dierent releases.

lollowing is a typical example o the jaa error stack, you might get on pressing the
Details` button.
Pressing this
button will
show the Java
Oracle 9 Forms Diagnostic Techniques.................................Page 23


What does the Jinitiator's Java consoIe show?
I you are using JInitiator and a Jaa error is encountered then the error will be
written to the browser status line. loweer, this does not show the ull Jaa error
stack. \ou need to look or it in the JInitiator`s Jaa console.

Oracle 9 Forms Diagnostic Techniques.................................Page 24





I you hae turned the Jaa Console on, by checking its option in JInitiator Control
Panel Applet on a \indows machine, the JInitiator Console window will pop up
when your lorm runs in a browser. 1he JInitiator Control Panel Applet can be
ound on the Start Settings Control Panel` option on a \indows machine.


Oracle 9 Forms Diagnostic Techniques.................................Page 25



I the JInitiator`s Jaa console does not appear, you can always inoke it manually
rom the taskbar tray icon by double clicking.



Using Forms Trace
lorms 1race replaces the unctionality that was proided with lorms Runtime
Diagnostics ,lRD, and Perormance Lent Collection Serices ,PLCS,, which
were aailable in earlier releases o lorms. lorms 1race allows you to trace the
execution path through a orm, or example, the steps the user took while using the
orm.

lorms 1race allows you to record inormation about a precisely deined part o
orms unctionality or a class o user actions. 1his is accomplished by deining
Check
this
option
Double
Click here
to invoke
Jinitiator's
Java
console.
You may need to re-start your browser for this to
take effect.

Oracle 9 Forms Diagnostic Techniques.................................Page 26

eents or which you want to collect trace inormation. An eent is something that
happens inside Oracle9i lorms as a direct or indirect result o a user action. lor
example, you can record inormation about trigger execution, mouse-clicks, or
both.

\ou deine the eents that you want to trace in the trace.cg ile or in the URL
when you start the trace. 1he trace.cg ile is installed in the
Oraclelome,orms90,serer directory by deault. 1he enironment ariable
lORMS90_1RACL_PA1l speciies the location o the trace.cg ile and the
location o trace output iles. 1he lORMS90_1RACL_PA1l enironment
ariable is set in the deault.en ile.

1he ollowing command line parameters ,which are set in ormsweb.cg, are used
to conigure lorms 1race:
Record ~ orms
1his will enable lorms trace
1racegroup ~keyword
where keyword is speciied or the eents in trace.cg. 1racegroup
indicates which eents should be recorded and logged.
I 1racegroup is not speciied, only error messages are collected.
1racegroup is ignored i lorms 1race is not switched on at the
command line.

1he trace output is stored in a log ile, which is saed in the directory speciied by
the lORMS90_1RACL_PA1l enironment ariable. ,I this ariable is not set,
the output is written to the current working directory., 1he ile will be named
orms_pid.trc where pid is the process ID on the serer.

\ou start a trace by speciying trace entries in the URL or in the lorms
coniguration ile - ormsweb.cg ile.

1race data is stored in a binary ile with a .trc extension. 1o iew trace data, you
must either:
Use the Upload,1ranslate utility to conert the data in the .trc ile to
XML ormat, and then iew the data using an XML iewer.
Use the Upload,1ranslate utility to upload the data in the .trc ile to
database tables.

Oracle 9 Forms Diagnostic Techniques.................................Page 27

lor a list o eents that can be deined or tracing and other details on tracing reer
to the document -- Oracle 9iAS lorms Serices - 1race and Diagnostics, on O1N.
Using ServIet Iogs.
Serlet Logging tools enable site administrators to keep a record o all Oracle9i
lorms sessions, monitor Oracle9i lorms-related network traic, and debug site
coniguration problems.

1he serlet logging can be done on both the lorms Serlet and on the lorms
Listener Serlet. I used with the lorms Serlet, the serlet logging eature will
collect inormation while connecting to the runtime session. Using the serlet
logging with the lorms Listener Serlet will gie you inormation while the session
is running.
1o speciy logging or lorms Listener serlet, one o the ollowing strings is
appended to sererURL parameter in the URL that starts the orm or by appending
it to the sererURL client parameter in the ormsweb.cg ile. 1o speciy logging
or lorms serlet one o the string is appended to the URL that starts the orm.

(none):
No log messages are produced. loweer, during lorms Serlet
initialization, a message is written to the log ile stating the name and
path o the coniguration ile being used.

/session:
Log messages are written wheneer a lorms session starts or ends.
1hese gie the host name and IP address o the client ,the machine on
which the user's web browser is running,, the runtime process id, and a
unique internal session id number.

/sessionperf:
Perormance summary statistics are included with the session end
message.

/perf:
A perormance message is written or eery request rom the client.

/debug:
lull debug messages. Other debug messages are written in addition to
the messages mentioned aboe. 1his logging leel is ery erbose and is
intended mainly or debugging and support purposes.

To know the difference between Forms
ServIet and Forms Listener ServIet, refer
to the section 'Forms ServIet and Forms
Listener ServIet', above.

Oracle 9 Forms Diagnostic Techniques.................................Page 28

1he serlet log is in the ile namely application.log. It is located at application-
deployments,orms90app directory o the OC4J instance on which lorms is
deployed.

In Oracle9iAS, the ull path is:
ORACLL_lOML,j2ee,ProductGroup2,applicationdeployments,orms90app
,1_deault_island,application.log

In Oracle9iDS, it is:
ORACLL_lOML,j2ee,iDS,applicationdeployments,orms90app,application
.log

lor more details on Serlet Logging reer to the document -- Oracle 9iAS lorms
Serices - 1race and Diagnostics, on O1N.

FRM-92XXX ERRORS

\hile running your lorms application, you may encounter arious lRM errors.
1hese errors can be raised by seeral dierent conditions. \hen you receie these
errors, you will need to obtain more inormation to resole it. In this section we
will see some o the common errors that one may encounter and how to resole
them.

Broadly speaking, the lRM errors occur due to the ollowing.
Configuration Problems:
Some lRM errors are raised by coniguration problems. lor example,
the lorms Serice is not started, or is listening on a dierent port to
that speciied in the l1ML ile. 1ypically these errors will reproduce
consistently.

Iorms server process has crashed:
1he majority o lRM errors that occur ater a successul connection
has been established and the orm started, are due to the serer
crashing. Once the serer process has died, then the client can no
longer continue - the applet has no lie o its own, and it cannot
continue to run without being able to communicate with the serer
process.
1hese errors are oten diicult to diagnose: the problem may not
Oracle 9 Forms Diagnostic Techniques.................................Page 29

reproduce consistently, or the user may be unaware o the sequence o
eents that led to the crash.

Network Problems:
1he communication between the applet and the lorms Serer process
has experienced network problems, and the communication has been
broken.


1he ollowing table lists the lRM-92xxx errors caused by the aboe-mentioned
reasons. It also briely explains what they mean.

lRM-92000 1his is an internal error that occurs when the Jaa language throws
an IllegalAccessLxception whilst we are trying to load some class
iles. It usually indicates that the system is misconigured in some
way. 1he detail message oten helps to work out why it occurred.
lRM-92010 1his is a Client mis-coniguration error that occurs when the
Applet parameter "sererArgs" is either not present or has a null
alue.
lRM-92020 Indicates that either the URL, or the Browser 1arget, requested
was rejected in some way by the browser.
lRM-92030 A Client mis-coniguration error, due to a missing Jaa class ile
and,or registry mis-coniguration. 1his error occurs when the
Serer requests a Jaa class, by numeric "handlerClassId" that the
Client can't handle since it's not in the registry.
lRM-92040 A Serer mis-coniguration error, due to a missing Jaa class ile.
1his error occurs when the Client requests a Jaa class that
couldn't be located on the Serer.
lRM-92050 1he Client was unable to establish a connection to the Serer
machine ,host, on the designated socket ,port,.
lRM-92060 1he Client was unable to establish a connection to the Serer
because the ormat o the host,port combination was inalid.
lRM-9200 1he Client was unable to create a new Object or some reason.
1he lull details may gie some indication as to why the error
Oracle 9 Forms Diagnostic Techniques.................................Page 30

occurred. ,1his will not stop the working o the orm, it is logged
only in the log ile,
lRM-92080 Lxecuting an Operating System command, in an attempt to start
an external Browser module, caused some problem.
lRM-92090 An Unexpected error occurred.
lRM-93000 Generic internal Lxception message. Used when some unexpected
code error occurs.
lRM-92095 1he ersion o JInitiator being used is too low to support the
requested unctionality ,e.g. to run against the Listener Serlet,.
User should install the speciied ersion ,or greater,.
lRM-92100 An Unexpected Network error or Serer ailure occurred.
lRM-92101 An Unexpected Serer ailure occurred due to some wrong
coniguration on serer side.
lRM-92102 An Unexpected Network error occurred, ater trying to reconnect
or a speciic number o times by lorms.
lRM-92120 A Serer coniguration error that indicates that an important ile
,the Registry, could not be located by the Client.
lRM-92150

1he ersion o the Client is newer than the ersion o the Serer.
lRM-92160 1he ersion o the Client is older than the ersion o the Serer.
lRM-92145 1he text used to describe SSO Authentication ailed.


Most o the aboe lRM errors are sel-explanatory, with the brie message they are
thrown with. But there are a ew, which are caused because o dierent reasons and
are diicult to diagnose. 1he ollowing topic explains such lRM errors, the
possible causes o it, and the solutions.



Oracle 9 Forms Diagnostic Techniques.................................Page 31

FRM-92010
Cause:
1his error can occur when the Jinitiator uses the browser's proxy setting.
Solution:
Goto Control Panel - JInitiator 1.3.x.x - Proxies -
Uncheck the use browser setting and enter the details or the proxy settings.

FRM-92050

Heavy load on the server.

Cause:
I there are many simultaneous requests that the serer cannot handle. 1his mainly
depends on the serer machine perormance and coniguration.

Solution:
1he lorms Runtime Prestart eature o lorms 10g comes handy in this
situation. 1his eature pre-spawns a conigurable number o runtime
engines to be catered to the incoming client requests, aoiding the hang
because o a rush.
Upgrade the hardware o the serer machine to handle the high number
o simultaneous requests








Oracle 9 Forms Diagnostic Techniques.................................Page 32


Missing serverURL parameter




Cause:
1he sererURL parameter is either missing or improper, in the coniguration ile
,ormsweb.cg,
Solution:
Ldit the orms coniguration ile to enter a alid sererURL parameter alue.











Oracle 9 Forms Diagnostic Techniques.................................Page 33

Wrong IORMS90_1IMLOU1

Cause:
1he alue o lORMS90_1IMLOU1 parameter is entered wrongly.

Solution:
Veriy the enile ,deault.en, and the registry or the lORMS90_1IMLOU1
parameter alue. 1he alue should be a proper integer. 1he alue should not be in
quotes.

Lg.
lORMS90_1IMLOU1~`10` 1his is a wrong entry.
lORMS90_1IMLOU1~10 1his is the correct entry.


Incorrect Use of RUN_PRODUC1.

Cause:
"RUN_PRODUC1 should only be used, in Oracle 9i lorms, or integration with
Oracle Graphics 6i.

Solution:
RUN_PRODUC1 built-in calls being used to integrate lorms with Oracle 9i
Reports should be replaced using the newer RUN_RLPOR1_OBJLC1 built-in.















Oracle 9 Forms Diagnostic Techniques.................................Page 34

Missing ServerArgs parameter

Cause:
1he sererArgs parameter is missing rom the l1ML, which loads the applet.

Solution:
Make sure that the html ile, used to load the orms applet, has sererArgs
parameter in it.

Make sure that the alue o the sererArgs is not null. Remember, orm name is
required in sererArgs. 1hese parameters can be deined in the orms
coniguration ile ,ormsweb.cg, or can be directly passed in the URL, used to run
the orm.






Oracle 9 Forms Diagnostic Techniques.................................Page 35

Missing jvm.dll




Cause:
1he orms web executable iweb90.exe is not able to ind the jm.dll

Solution:
Lnsure that jm.dll is located in a directory speciied in the PA1l enironment
ariable. Set the PA1l enironment ariable in the ormsweb.cg`s enlile
,typically ORACLL_lOML,orms90,serer,deault.en, to point to the location
o the jm.dll.

Oracle 9 Forms Diagnostic Techniques.................................Page 36


FRM-92100





Cause:
1his error occurs i the web serer is shutdown when the user is accessing the
application

Solution:
Check i the web serer is up and running. 1ry the url http:,,serer-
machine:portno.
I the oc4j home page does not come up, then it indicates that the web serer is
down.
Contact your application administrator to get the web serer up.

Oracle 9 Forms Diagnostic Techniques.................................Page 37

FRM-92101





Wrong working directory
Cause:
1his error can occur i the working directory speciied does not exist.

Solution:
1his can be conirmed by looking or a log message like
Unable to switch to \orking Directory:workingDirectory` in the
application.log ile.

,1he application.log ile can be ound at:
application-deployments,orms90app directory o the OC4J instance on which
lorms is deployed,

Ldit the orms coniguration ile to correct o the working directory.


Oracle 9 Forms Diagnostic Techniques.................................Page 38

IORMS90_1IMLOU1 and heartbeat

Cause:
1his error can occur i the orms applet parameter heartbeat` is set to a alue more
than lORMS90_1IMOU1.

Solution:
Generally, heartbeat is set to a alue higher than that o lORMS90_1IMLOU1,
only when the application is desired to timeout ater a certain time o inactiity. It is
then, you would get a lRM-92120.
I that is not desired or a particular application, then, make sure that the alue o
heartbeat is lesser than that o lORMS90_1IMLOU1.


FRM-92102






Cause:
1his error can occur because o the network problems between the web serer and
the client. 1he client is not able to communicate with the serer on the speciied
port.




Solution:
Oracle 9 Forms Diagnostic Techniques.................................Page 39

Add the parameter networkRetries` to the orms coniguration ile. Set the alue to
a suitable number according to the network characteristics and needs.

Lg: networkRetries~30

1his parameter speciies the number o times the lorms client should try
reconnecting to the middle tier beore inally timing out.

Ports Blocked

Cause:
I the error occurs een ater setting up an appropriate alue or networkRetries, it
could be due to the ports on the web serer restricted at 1CP,IP leel.

Solution:
A socket connection requires a port at each end. I the port is closed it causes the
communication stoppage. lirewall and proxies are used to protect the ports.
Remoing the blocking o ports on web serer soles the error.



FRM-92120




Oracle 9 Forms Diagnostic Techniques.................................Page 40

Cause:
1his is a serer coniguration error, which occurs when the client is unable to ind
the ile Registry.dat on the middle tier.

Solution:
\hen this error occurs, check i the ile Registry.dat is present on the middle tier in
the directory Oraclelome,orms90,jaa,oracle,orms,registry. I it is not
present, then it needs to be placed.

In a running lorms application, i you suddenly come across this error, there is a
possibility that the l11P serer has gone down. \ou may eriy this by typing the
URL http:,,myserer.com:NNNN` in your browser. lere you need to replace
myserer.com with your host name and NNNN with your l11P serer`s port
number. I your browser says that it could not connect to the serer, then your
l11P serer is down and you need to contact your system administrator to bring it
up.

\hen the l11P serer is up and running, on giing the URL
http:,,myserer.com:NNNN` your browser will show the Oracle9iAS
welcome` page as ollows.



Oracle 9 Forms Diagnostic Techniques.................................Page 41


FRM-92150/FRM-92160

Cause:
\rong path and,or codebase setting.

Solution:
Set the proper ORACLL_lOML,bin in the beginning o the system path.

1he CODLBASL entry in your l1ML ile or orms coniguration ile may point
to older ersions o the JAR ile. Lither modiy the codebase entry in your
coniguration ile or replace the jar ile in the codebase path with the appropriate jar
ile.

OTHER PROBLEMS

SERVER CRASH
I the lorms web runtime terminates unexpectedly, then it writes a stack trace to
the directory Oraclelome`orms90`trace. 1he ilename will hae the ormat
orms_runtime_process_dump_process id.
1he dump ile contains a stack trace o the running process, and shows the last
successul operation perormed by lorms.

An exampIe of a dump fiIe on SoIaris.

lere`s an example o a dump ile on solaris.

[Sat Sep 20 15:13:11 2003 PDT]::Client Status [ConnId=0, PID=2220]
>> ERROR: Abnormal termination of connection, Error Code: 11

FORM/BLOCK/FIELD: X:BLOCK3.STATUS
Last Trigger: WHEN-BUTTON-PRESSED - (In Progress)
Msg: <NULL>
Last Builtin: REPORT_OBJECT_STATUS - (In Progress)
------------- Call Stack Trace [ConnId = 0, ProcId = 2220] -------------

calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
siehjmpterm()+412 CALL siehdst()+0 BA1958 ? A8CDB8 ? A8CC4C ?
CIearing the OracIe jar cache, in the user profiIe
directory of the cIient machine makes sure that
the Forms jar fiIes are downIoaded freshIy.

Oracle 9 Forms Diagnostic Techniques.................................Page 42

A8CDA4 ? A8CD88 ? EFFF3BA4 ?
sigacthandler()+40 PTR_CALL B ? B6A95C ? B6AB44 ?
AE7DEC ? 0 ? E ?
zrcctcx_CheckAuthRe CALL zrcctcc_ClientCommo B ? 0 ? EFFF4758 ? 0 ? 50 ?
DB2112 ?
zrcctco_Connect CALL zrcctcx_CheckAuthRe DAE5B8 ? 0 ? 0 ? 0 ?
FFFFFFC0 ? FFFFFFF0 ?
ibfnjurJobUpdate CALL zrcctco_Connect()+0 DAE5B8 ? EFFF4B40 ?
EFFF4B38 ? 0 ? 76 ?
EFFF4B40 ?
ibfrun()+5940 CALL ibfnjurJobUpdate BE8198 ? BE7BB0 ? BDF328 ?
EFFF56A4 ? AE7DEC ?
EFFF4B40 ?
pfrrun()+23596 PTR_CALL CC4E40 ? AE7DEC ? 0 ? 0 ?
BE8198 ? CBC6A8 ?
peicnt()+248 CALL pfrrun()+0 CC5720 ? CC4E40 ? 0 ? 1 ?
25 ? BF1858 ?
CALL BF1858 ? CC4E40 ? CC4E40 ?
BF1858 ? EFFF7B64 ? CBD0C0 ?
ipkxcr()+32 CALL 191F7000 ? D396F8 ? 0 ? 0 ?
0 ? FFBF ?
ipfrun()+916 CALL ipkxcr()+0 BE8198 ? CBC6A8 ? BE8198 ?
0 ? 0 ? BEEE20 ?
ifzmgt()+3260 CALL ipfrun()+0 BE8198 ? 0 ? D396F8 ?
D291C8 ? EE7427EC ? 0 ?
ifzmky()+64 CALL ifzmgt()+0 BE7BB0 ? EE7432A0 ? AE7DEC ?
BED6D8 ? EE7427EC ? 2000000 ?
ifzevl()+80 CALL ifzmky()+0 BE7BB0 ? BE7BB0 ? A8395C ?
AE7DEC ? 7FFFFFFF ?
EE7427EC ?
ifzefi()+176 CALL ifzevl()+0 BE7BB0 ? BE7BB0 ? AE7DEC ?
80000000 ? B3B460 ? BDC8C8 ?
ifzevf()+900 CALL ifzefi()+0 BE7BB0 ? BE7BB0 ? AE7DEC ?
1 ? D29250 ? EE743184 ?
ifzerc()+2244 CALL ifzevf()+0 4000 ? FFFFBFFF ? BE7BB0 ?
4000 ? EE743184 ? EE742B28 ?
ifzebk()+1976 CALL ifzerc()+0 0 ? AE7DEC ? BE7BB0 ?
BDC8C8 ? BED6D8 ? EE7427EC ?
ifzefm()+316 CALL ifzebk()+0 0 ? AE7DEC ? BE7BB0 ? 4000 ?
FFFEFFFF ? 10000 ?
Ifzeif()+844 CALL ifzefm()+0 BE7BB0 ? BE9F08 ? BE7BB0 ?
AE7DEC ? 0 ? BDC8C8 ?
Ifzexf()+1188 CALL ifzeif()+0 BE7BB0 ? 0 ? 0 ? 1 ? BED6D8 ?
2000000 ?
Ifzexe()+164 CALL ifzexf()+0 BE7BB0 ? 1 ? 0 ? BE8198 ?
BDC8C8 ? 0 ?
Ifzman()+5276 CALL ifzexe()+0 0 ? BEAD68 ? 2 ? BEAB48 ?
BE7BB0 ? AE7DEC ?
if4mmo()+40 CALL ifzman()+0 10000000 ? 0 ? 1 ? 0 ?
BB2C30 ? 0 ?
PTR_CALL 0 ? 0 ? 0 ? 3 ? BB2250 ?
CC57C ?
Oracle 9 Forms Diagnostic Techniques.................................Page 43

PTR_CALL BB12CC ? EFFFA42C ? 0 ? 2 ?
EFFF99D0 ? 0 ?
main()+168 CALL 0 ? EFFF9918 ? 3 ? EFFF99CC ?
EFFF986C ? EFFF992C ?
_start()+220 CALL main()+0 3 ? EFFF99CC ? EFFF99CC ?
B12400 ? 0 ? 0 ?

------------- End of Call Stack Trace -------------

In this stack trace, the top two unctions siehjmpterm,, and sigacthandler,, are the
signal handling code - these unctions will oten be present in the stack trace. 1o
see the unction the program was in when the error occurred you need to read
urther down the stack.

An exampIe of a dump fiIe on Windows.

Stack tracing works dierently on Unix and on \indows N1. 1he symbol
inormation is contained inside the executable iles and shared libraries on Unix.
On \indows this inormation is stripped out at link time and is in the orm o
binary .sym iles. 1here should be one .sym ile or eery lorms executable or
DLL. 1he mechanism on \indows platorms is such that in the eent o a crash
the lorms runtime process reads all the .sym iles that correspond to the orms
executable iles loaded into memory. It then uses the inormation in the .sym iles
to lookup the symbol name. 1he stack trace on \indows now looks like.




[09/21/03 12:11:16 India Standard Time]::Client Status [ConnId=0,
PID=289]
>> ERROR: Abnormal termination, Error Code: C0000005
ACCESS_VIOLATION

======================= STACK DUMP =======================

Fault address: 65CE63BE 01:000553BE
Module: E:\ORA9iAS_904\bin\ifwcm90.dll

System Information:
Operating System: Windows NT Version 4.0 Build 1381 Service Pack 6
Command line: ifweb90 server webfile=HTTP-0,0,0,default

Crash caused because FORMS90_DELIBERATECRASH was set to 2

FORM/BLOCK/FIELD: TEST:TEST.OK
Last Trigger: WHEN-NEW-FORM-INSTANCE - (Successfully Completed)
Msg: <NULL>
Last Builtin: GET_APPLICATION_PROPERTY - (Successfully Completed)

Registers:
EAX:00000002
EBX:032BF3FC
ECX:00000005
EDX:034820FC
Oracle 9 Forms Diagnostic Techniques.................................Page 44

ESI:65D3E840
EDI:00000000
CS:EIP:001B:65CE63BE
SS:ESP:0023:0012E6E4 EBP:03262070
DS:0023 ES:0023 FS:0038 GS:0000
Flags:00010246
------------------- Call Stack Trace ---------------------

Frameptr RetAddr Param#1 Param#2 Param#3 Param#4 Function Name

0x03262070 01df1fc8 00000000 03262964 03262664 004141e0 0x65ce63be

------------------- End of Stack Trace -------------------



Verifying the environment.

In order to test stack tracing on \indows ,or UNIX, you can set the enironment
ariable lORMS90_DLLIBLRA1LCRASl. As the name suggests, setting this
will cause the orms runtime process to crash. Oracle lorms currently recognizes
two settings: 1 and 2. I lORMS90_DLLIBLRA1LCRASl is set to 1 then orms
will crash at runtime wheneer the BLLL built-in is executed. I it is set to 2 then
orms will crash at runtime wheneer a when-button-pressed trigger is ired. 1he
stack aboe was generated with lORMS90_DLLIBLRA1LCRASl set to 2. 1his
enironment ariable can be set in the enile ,or example, deault.en, ile.

By setting the enironment ariable lORMS90_DLLIBLRA1LCRASl to 2, and
checking the stack trace produced against the one in this document you can
determine whether the symbol iles are correctly installed. Once you hae
conirmed that eerything is working as expected, i you subsequently encounter a
problem where the serer has crashed, you can be sure that the stack trace will be
useul in resoling the problem.


Use of dump fiIe.

1he stack trace is useul on two dierent leels
1he inormation in the stack can be used to identiy a known issue. It
is not 100 reliable, but an identical stack trace is a good indicator o a
matching problem. Len i it is not the same, there may be a
workaround or patch or an existing bug that can be tested.
I the problem is not a known bug, then the stack may proide aluable
inormation to assist deelopment eorts to pinpoint the cause.
Oracle 9 Forms Diagnostic Techniques.................................Page 45

CLIENT CRASH

I the lorms applet disappears unexpectedly, accompanied by a dialog indicating a
atal error, then the lorms applet has crashed. On \indows, a crash will result in
the operating system raising an illegal operation` dialog, or may cause Dr. \atson
to report the error.
1o eriy the crash, check or a stack trace ile on the client. I the client has
crashed then a ile with the .rpt extension will be created in the same directory as
the executable. 1he root o the ilename will be the name o the executable.
L.g.
Using Appletiewer, started rom the directory c:`jdk`1_3_1`bin, the client stack
trace ile will be c:`jdk`1_3_1`bin`appletiewer.rpt.
Using JInitiator, then the executable is considered to be the browser.
I the browser is Netscape, the client stack trace ile will be netscape.rpt, whereas
or Internet Lxplorer it will be iexplore.rpt.

Sometimes the applet may appear to hae crashed, but no corresponding .rpt ile
can be ound. In this case it is likely that the lorms Serer process has
unexpectedly disconnected rom the client. 1he applet will still be running, but it
has shutdown all the lorms windows, giing the appearance o a client crash.

An exampIe of a dump fiIe
lere`s an example o a client stack trace ile ,iexplore.rpt,.

======================================================================
=========
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 0F521F00 01:00000F00
Module: D:\Oracle\JInitiator 1.3.1.8\bin\jpishare.dll

System Information:
Operating System: Windows NT Version 4.0 Build 1381 Service Pack 6
Date and Time: 1/7/2003, 18:44
Command line: "C:\PROGRA~1\INTERN~1\iexplore.exe"

Registers:
Oracle 9 Forms Diagnostic Techniques.................................Page 46

EAX:00000008
EBX:0F520000
ECX:007C81F0
EDX:0EFB1D7C
ESI:00000000
EDI:0EFB1D7C
CS:EIP:001B:0F521F00
SS:ESP:0023:0006ED50 EBP:0006ED8C
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010202


Call stack:
Address Frame
0F521F00 0006ED8C 0001:00000F00 D:\Oracle\JInitiator
1.3.1.8\bin\jpishare.dll
77F69E0A 0006EDD8 LdrShutdownProcess
77F19FDB 0006EE98 ExitProcess
715160A3 0006FF00 Ordinal101
0040168A 0006FF60 0001:0000068A C:\PROGRA~1\INTERN~1\iexplore.exe
00401726 0006FFC0 0001:00000726 C:\PROGRA~1\INTERN~1\iexplore.exe
77F1B9EA 0006FFF0 GetProcessPriorityBoost

======================================================================
=========
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 0F951F00 01:00000F00
Module: D:\Oracle\JInitiator 1.3.1.9\bin\jpishare.dll

System Information:
Operating System: Windows NT Version 4.0 Build 1381 Service Pack 6
Date and Time: 1/7/2003, 18:50
Command line: "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Oracle 9 Forms Diagnostic Techniques.................................Page 47


Registers:
EAX:00000002
EBX:0F950000
ECX:007C6910
EDX:027CBD7C
ESI:00000000
EDI:027CBD7C
CS:EIP:001B:0F951F00
SS:ESP:0023:0006ED50 EBP:0006ED8C
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010202


Call stack:
Address Frame
0F951F00 0006ED8C 0001:00000F00 D:\Oracle\JInitiator
1.3.1.9\bin\jpishare.dll
77F69E0A 0006EDD8 LdrShutdownProcess
77F19FDB 0006EE98 ExitProcess
715160A3 0006FF00 Ordinal101
0040168A 0006FF60 0001:0000068A C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
00401726 0006FFC0 0001:00000726 C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
77F1B9EA 0006FFF0 GetProcessPriorityBoost

======================================================================
=========
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 1A4142DE 01:000132DE
Module: C:\WINNT\System32\URLMON.DLL

System Information:
Operating System: Windows NT Version 4.0 Build 1381 Service Pack 6
Oracle 9 Forms Diagnostic Techniques.................................Page 48

Date and Time: 1/7/2003, 19:03
Command line: "C:\PROGRA~1\INTERN~1\iexplore.exe"

Registers:
EAX:0000000C
EBX:00069144
ECX:0006806C
EDX:1A4555D8
ESI:00134320
EDI:00067DC8
CS:EIP:001B:1A4142DE
SS:ESP:0023:00067DD0 EBP:0006808C
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010246


Call stack:
Address Frame
1A4142DE 0006808C CoGetClassObjectFromURL
1A413F34 000680C0 CoGetClassObjectFromURL
1A413C43 00069178 CoGetClassObjectFromURL
700994C8 000691A8 DllCanUnloadNow
700993D4 00069428 DllCanUnloadNow
700992CD 00069448 DllCanUnloadNow
700990D2 00069894 DllCanUnloadNow
70099C82 0006DA20 DllCanUnloadNow

======================================================================
=========
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 0F991F00 01:00000F00
Module: D:\Oracle\JInitiator 1.3.1.8\bin\jpishare.dll
Oracle 9 Forms Diagnostic Techniques.................................Page 49


System Information:
Operating System: Windows NT Version 4.0 Build 1381 Service Pack 6
Date and Time: 1/7/2003, 19:03
Command line: "C:\PROGRA~1\INTERN~1\iexplore.exe"

Registers:
EAX:00000002
EBX:0F990000
ECX:007BE6C0
EDX:027E1D7C
ESI:00000000
EDI:027E1D7C
CS:EIP:001B:0F991F00
SS:ESP:0023:0006ED50 EBP:0006ED8C
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010202

SymInitialize failed, error code -1073741819

Call stack:
Address Frame Logical addr Module
0F991F00 0006ED8C 0001:00000F00 D:\Oracle\JInitiator
1.3.1.8\bin\jpishare.dll
77F69E0A 0006EDD8 0001:00008E0A C:\WINNT\System32\ntdll.dll
77F19FDB 0006EE98 0001:00018FDB C:\WINNT\system32\KERNEL32.dll
715160A3 0006FF00 0001:000150A3 C:\WINNT\System32\shdocvw.dll
0040168A 0006FF60 0001:0000068A C:\PROGRA~1\INTERN~1\iexplore.exe
00401726 0006FFC0 0001:00000726 C:\PROGRA~1\INTERN~1\iexplore.exe
77F1B9EA 0006FFF0 0001:0001A9EA C:\WINNT\system32\KERNEL32.dll

Oracle 9 Forms Diagnostic Techniques.................................Page 50

Use of dump fiIe.
1he inormation contained in the dump ile is extremely useul to Oracle
deelopment, and should be included in any bug iled to report the problem.

APPLICATION HANGING
I the client appears to hang then it is important to eriy that the serer process is
still alie.
I the serer process has not crashed, but the client no longer appears to respond to
user interaction then the application is said to be hanging.
In such cases a thread dump can point to the deadlock.

Java Thread Dump

A stack dump can be obtained rom an Applet-iewer by pressing C1RL-BRLAK
in the command prompt ,or DOS session, that you started the Applet-iewer rom.


E:\ORA9iDS_904\forms90\java>appletviewer dve.html
connectMode=Socket
serverHost=incq139b.idc.oracle.com
serverPort=9001
Forms Applet version is : 9.0.4.0
Full thread dump:

"Flush Queue" prio=4 tid=0x7de0f0 nid=0x180 waiting on monitor
[0x966f000..0x966fdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at oracle.forms.engine.FlushQueue.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)

"HeartBeat" prio=4 tid=0x7be0a0 nid=0x227 waiting on monitor
[0x91df000..0x91dfdc0]
at java.lang.Object.wait(Native Method)
at oracle.forms.engine.Heartbeat.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Oracle 9 Forms Diagnostic Techniques.................................Page 51


"Forms-StreamMessageWriter" prio=4 tid=0x7bda10 nid=0x106 waiting on monitor
[0x919f000..0x919fdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at oracle.forms.net.SingleAccessorQueue.get(Unknown Source)
at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
"Forms-StreamMessageReader" prio=4 tid=0x7bb280 nid=0x1ca runnable
[0x915f000..0x915fdc0]
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at oracle.forms.net.EncryptedInputStream.fill(Unknown Source)
at oracle.forms.net.EncryptedInputStream.read(Unknown Source)
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:243)
at oracle.forms.engine.Message.readDetails(Unknown Source)
at oracle.forms.engine.Message.readDetails(Unknown Source)
at oracle.forms.net.StreamMessageReader.run(Unknown Source)

"Screen Updater" prio=5 tid=0x7ad9e0 nid=0x4e waiting on monitor
[0x90cf000..0x90cfdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:76)
at sun.awt.ScreenUpdater.run(ScreenUpdater.java:95)

"Thread-1" prio=5 tid=0x7879f0 nid=0x201 waiting on monitor [0..0x6fb30]

"thread applet-oracle.forms.engine.Main" prio=4 tid=0x77d0a0 nid=0x1c7 waiting on
monitor [0x908f000
..0x908fdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at sun.applet.AppletPanel.getNextEvent(AppletPanel.java:269)
at sun.applet.AppletPanel.run(AppletPanel.java:301)
at java.lang.Thread.run(Thread.java:484)

Oracle 9 Forms Diagnostic Techniques.................................Page 52

"SunToolkit.PostEventQueue-1" prio=4 tid=0x77c080 nid=0x31 waiting on monitor
[0x904f000..0x904fdc0]

at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at sun.awt.PostEventQueue.run(SunToolkit.java:491)

"AWT-EventQueue-1" prio=4 tid=0x77c300 nid=0x20c waiting on monitor
[0x900f000..0x900fdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at java.awt.EventQueue.getNextEvent(EventQueue.java:260)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:10
6)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

"AWT-Windows" prio=7 tid=0x779ad0 nid=0x1ef runnable [0x8f8f000..0x8f8fdc0]
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:188)
at java.lang.Thread.run(Thread.java:484)

"SunToolkit.PostEventQueue-0" prio=7 tid=0x7786f0 nid=0x1cd waiting on monitor
[0x8f4f000..0x8f4fdc0
]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at sun.awt.PostEventQueue.run(SunToolkit.java:491)

"AWT-EventQueue-0" prio=7 tid=0x778db0 nid=0x48 waiting on monitor
[0x8f0f000..0x8f0fdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at java.awt.EventQueue.getNextEvent(EventQueue.java:260)
Oracle 9 Forms Diagnostic Techniques.................................Page 53

at oracle.forms.engine.Main.dispatchEvents(Unknown Source)
at oracle.forms.engine.Main.tryDispatching(Unknown Source)
at oracle.forms.engine.Main.componentResized(Unknown Source)
at java.awt.Component.processComponentEvent(Component.java:3598)
at java.awt.Component.processEvent(Component.java:3556)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Window.processEvent(Window.java:779)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:13
1)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

"Signal Dispatcher" daemon prio=10 tid=0x769240 nid=0x1b7 waiting on monitor
[0..0]

"Finalizer" daemon prio=9 tid=0x767ed0 nid=0x1a1 waiting on monitor
[0x8dbf000..0x8dbfdc0]
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)

"Reference Handler" daemon prio=10 tid=0x766c20 nid=0x214 waiting on monitor
[0x8d7f000..0x8d7fdc0]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)

"VM Thread" prio=5 tid=0x765e70 nid=0x1a9 runnable
Oracle 9 Forms Diagnostic Techniques.................................Page 54


"VM Periodic Task Thread" prio=10 tid=0x7682a0 nid=0x17f waiting on monitor
"Suspend Checker Thread" prio=10 tid=0x768100 nid=0x1ba runnable
E:\ORA9iDS_904\forms90\java>

In case o JInitiator, the Jaa console shows how to output dump inormation.


On pressing t, the thread list dump is obtained as ollows.

How to
output Java
dump
information.
Oracle 9 Forms Diagnostic Techniques.................................Page 55




Use of Dumps

1he inormation contained in the thread dump can help Oracle deelopment
identiy the problem in the code. 1he thread dump should be included in any bug
iled to report the problem.
Causes of AppIication hanging

1here could be a mismatch between the Jaa class iles and the orms
serer ersion. Communication between the applet and the orms
serer process is based on message id. I these message id's are out o
step, then the applet may not understand an instruction rom the
serer, and ice ersa. I you are using jar iles, then try with the
ARClIVL tag remoed. I the problem persists then pull the correct
class iles o the installation,patch CD by hand.
Oracle 9 Forms Diagnostic Techniques.................................Page 56

1he lorms Runtime may hae died. Check i the lorms Runtime
process on the serer is still alie. \ou should check that the
lORMS90_1IMLOU1 parameter is set. 1he timeout acility acts like
a heartbeat and expects the orms client to ping` the serer on a regular
basis, only cleaning up the orms serer process when there has been
no actiity rom the orms client or the speciied time. Although this is
primarily intended to preent orphaned serer processes, it can also
preent the unwanted premature cleanup o serer processes.

MEMORY PROBLEMS
Like all sotware programs, a Jaa applet uses memory. lor Jaa, the language
speciication requires a garbage collector`, which is in an internal memory manager
or the Jaa Virtual Machine ,JVM,. \hen a Jaa program needs memory, it
requests this memory rom the JVM. I there is no memory let, then the JVM will
attempt to ree some memory by using the garbage collector. 1he garbage collector
will try to release memory that is no longer required to run the program back to the
JVM. I there is still insuicient memory to perorm the required task then the
JVM will attempt to get more memory rom the operating system. I that memory
allocation ails, then the Jaa program will be unable to continue.

lor example, the ollowing output shows a typical Out o memory` error.


E:\ORA9iDS_904\forms90\java>appletviewer -J-mx4M dve.html
java.lang.OutOfMemoryError
<<no stack trace available>>



Setting JVM Runtime options

lor example, the ollowing command will set the initial Jaa leap` ,the memory
used by the JVM, to 20MB, and the maximum memory to be used by the JVM to
32MB.

appletviewer -J-ms20m -J-mx32Mb dve.html


Oracle 9 Forms Diagnostic Techniques.................................Page 57

1he deault initial and maximum sizes or Appletiewer are 16MB and 20MB
respectiely.

Using JInitiator, you will need to set the runtime options in the JInitiator control
panel.


Note: the JVM will only use the memory it is told it is allowed to use. Len i you
hae memory aailable with the Operating System, the JVM will not use it.

What is Memory Ieak?

A memory leak is an error in a program's dynamic-store allocation logic that causes
it to ail to reclaim discarded memory, leading to eentual collapse due to memory
exhaustion.
\hat does this mean \ell, when a program runs it may need to allocate some
memory to perorm a particular task. I the program has inished with that
memory and no longer has any use or it, but ails to make that memory aailable to
other programs running on the machine, then it is said to hae leaked the memory.
A typical method used to spot memory leaks is to repeat a series o steps, and
obsere the memory in use by the application - i the memory usage continues to
Oracle 9 Forms Diagnostic Techniques.................................Page 58

rise with each iteration, then the assumption is oten that the program has a
memory leak.
loweer, it is not quite as simple as that: some complex sotware may choose to
retain control o memory it has preiously allocated so that it can reuse it at a later
point - memory allocation can be an expensie operation, and i the program
expects that it will need more memory later it may be more eicient to keep the
unused memory aailable or reuse.

Memory Ieaks in Java?
1he Jaa language speciication demands that the JVM has a Garbage Collector
,GC,. In Jaa, the programmer allocates memory by creating a new object. 1here
is no way to de-allocate that memory. Periodically the Garbage Collector sweeps
through the memory allocated to the program, and determines which objects it can
saely destroy, thereore releasing the memory.
1o determine which objects it can saely destroy, the garbage collector uses a mark
and sweep` algorithm. 1he garbage collector scans the dynamically allocated
memory or objects, marking those, which still hae actie reerences to them.
Ater all possible paths to objects hae been inestigated, unmarked objects that are
known to be no longer needed and can be garbage collected.
A common myth with Jaa programming is that the presence o a garbage collector
means that there can be no memory leaks. 1his is not true. 1he garbage collector
simply marks those objects, which hae actie reerences, and destroys those that
do not. It is possible to hae an actie reerence to an object that is no longer
needed. 1his is a memory leak in Jaa. 1he solution to the leak is to destroy the
reerences to the object once it is no longer needed so that the garbage collector
can identiy it as sae to destroy. I a memory leak exists in a Jaa program, then
calling the garbage collector more requently will not help.
1o complicate matters urther, the JVM may choose not to release unused memory
back to the operating system. In the real world this seldom matters, as most
programs will typically require more memory at some point in the near uture and
can reuse the ree memory in the JVM. loweer, it is worth bearing in mind that
not all the memory allocated to the JVM will be in use by the program running in
the JVM.

How to identify memory Ieak?
1ypically, i a growth in memory usage is obsered each time a particular series o
operations is perormed, then it is a memory leak. 1he ideal proo is to
1. get the orm into an initial base state, and record the memory usage,
2. perorm a series o steps to illustrate the problem,
Oracle 9 Forms Diagnostic Techniques.................................Page 59

3. return to the initial base state, and record the memory usage.
By repeating steps 2 & 3, it is possible to determine whether there is a steady
memory leak or not. I the growth in memory is small oer a large number o
iterations, then it may not be a leak at all - it could be the JVM retaining unused
memory, or the garbage collector not actiating as requently as expected.

PERFORMANCE PROBLEMS
\hen any Jaa program runs, the Jaa irtual machine needs to load class iles.
\hen running oer the Internet, the time taken to download a class ile each time
the program runs can lead to perormance problems. In order to sole this
download problem, the JDK supports Jaa Archie ,JAR, iles. A jar ile is simply
a collection o class iles bundled into one compressed ile. 1ypically, the size o
the jar ile will be much smaller than the combined size o the class iles it contains.
In addition to reducing the amount o data to be transerred, jar iles also allow
JInitiator and Oracle`s JDK to use a process reerred to as caching.
Starting with OJDK 1.1..15, seeral perormance improements were made to the
caching process.

What is caching?

\hen the JVM irst reerences a class, it checks the local machine to see i any o
the preiously cached jar iles contain this class. I the class does exist in one o the
pre-cached jar iles, then the JVM checks to see i there is a newer ersion o this
jar ile on the application serer. I there is a newer jar ile aailable then the new
copy o the jar ile is downloaded to the client cache. I the cached jar ile is up to
date, then the class ile is loaded rom the cached jar ile rather than rom oer the
network.

Why is it important?
I the application jar iles do not change, then ater the application has run once,
and all the jar iles required hae been cached on the client, then subsequent
inocations o the application will always load the classes rom the local cached
copies. 1his can lead to signiicant perormance improements in the startup time
or the application. I new classes are needed to run a speciic part o the
application, these will be downloaded as required.

Oracle 9 Forms Diagnostic Techniques.................................Page 60

How to check if caching is enabIed?



Performance improvements in OJDK?
\hilst caching meant that the jar ile would not be downloaded rom the serer
eery time the application is inoked, there were still some issues aecting
perormance.
1he JAR iles contain compressed data. 1he time to decompress this data rom the
cached jar ile outweighs the time saed in downloading less data rom the network.
JAR iles can be digitally signed and undergo authentication to ensure they hae not
been modiied in transit oer the network. 1his procedure inoles expensie
mathematical calculations.
1he new caching mechanism introduced in OJDK addresses these issues in the
ollowing way:
\hen the JAR ile is downloaded or the irst time, two iles are created.
A data ile, which contains all o the unzipped data rom the JAR ile.
Data iles hae the extension .dxx, where xx is a number between 00
and 99. lor example 1056b8.d00
An index ile which contains inormation about the JAR ile, including
the URL it was loaded rom, the date it was last modiied on the serer,
and a table o contents. 1he table o contents lists all o the entries in
the JAR ile, their osets in the data ile, and the authentication status
o each entry. Index iles hae the extension .ixx, where xx is a number
between 00 and 99. lor example 1056b8.i00.
Check
here.
Oracle 9 Forms Diagnostic Techniques.................................Page 61

1he inormation in these iles is stored in a binary ormat. 1here is no easy way to
read them by eye, and there is little alue in doing so.

1he irst eight characters o all cache iles represent the URL where the JAR ile
was downloaded rom. 1his allows the caching mechanism to quickly ind a URL
in the cache by mapping the URL to its corresponding eight-character
representation and looking or iles with that name.

























Oracle 9 Forms Diagnostic Techniques.................................Page 62



\hen a JAR ile is needed to run an applet, the ollowing logic is used:
































\e
Map the jar ile URL to an eight-letter
ilename using a hashing algorithm
Check the cache directory or index iles
matching this eight-character ilename
Cached copy
up to date
Contact the URL to determine i the
cached copy o the URL is up to date.
Cache hit. Read the table o contents
rom the index ile into memory.






1he jar ile
must be
downloaded
.

Download
the jar ile
rom the
serer.
Match
ound
\e
No
No
Oracle 9 Forms Diagnostic Techniques.................................Page 63


\hen a class ile is required by the application, the OJDK uses the inormation in
the table o contents to locate the class ile in the data cache. I the data was
digitally signed, then the list o authenticated signers is read rom the data ile.


TERMINOLOGY
1his section gies a brie explanation o some o the terms used in this paper.
What is OracIe home?
Oracle lome is the directory on your machine where Oracle 9iAS or Oracle 9iDs
is installed.

lor example,
i you choose to install Oracle 9iAS in directory D:`Ora9iAS on a windows
machine, then your Oracle lome is D:`Ora9iAS.

Similarly, i you choose to install Oracle 9iDS in directory ,oracle,ora9ids on a
solaris machine, then your Oracle lome is ,oracle,ora9ids.
What is a ServIet?
Serlets are modules o Jaa code that run in an application serer to answer client
requests. Since they are written in the highly portable Jaa language and ollow a
standard ramework, they proide a means to create sophisticated serer extensions
in a serer and in an operating system independent way. 1hey add unctionality to
an application, similarly to how JaaScript adds unctionality to an l1ML page.

Some example uses or l11P Serlets include:
Processing and,or storing data submitted by an l1ML orm.
Proiding dynamic content, e.g. returning the results o a database
query to the client.
Managing state inormation on top o the stateless l11P, e.g. or an
online shopping cart system which manages shopping carts or many
concurrent customers and maps eery request to the right customer.
What is JInitiator?
Oracle JInitiator is a product rom Oracle Corporation, based on the Jaa Plug-in
rom Sun Microsystem's JaaSot Diision, that runs Jaa applets or JaaBeans in a
l1ML page using Oracle's Jaa Virtual Machine ,JVM, inside Microsot Internet
Lxplorer on \in32 platorms, or Netscape Naigator on \in32 platorms. 1he
Oracle 9 Forms Diagnostic Techniques.................................Page 64

Oracle JInitiator is bundled with the Oracle JRL, Oracle's ersion o the JRL rom
Sun. 1he Oracle JRL is ully compatible with Sun's JRL, and urther includes bug
ixes and eatures designed to increase the stability and perormance o Jaa-based
Oracle enterprise applications.

MORE TERMS


JDK Jaa Deelopment Kit
Produced by Jaasot, the JDK allows a deeloper to build Jaa
programs and run them.
OJDK Oracle Jaa Deelopment Kit
A ersion o the JDK which includes speciic bug ixes made by
Oracle
JVM Jaa Virtual Machine.
1he Jaa Virtual Machine interprets and runs the code generated by
the Jaa compiler.
Applet-
iewer
A simple application which can run any Jaa Applet. Appletiewer is
part o the JDK
Jaa Jaa is both a programming language and a platorm.
1he Jaa language is an object-oriented, interpreted, high-leel
language. lor a complete discussion o the Jaa language see the
white paper 1he Jaa Language Lnironment` at
http:,,jaa.sun.com,
1he Jaa platorm is a sotware only platorm that sits on top o a
hardware platorm. 1he platorm consists o two components - the
JVM and the Jaa Application Programming Interace ,API,
lorms
Runtime
Lngine
1he lorms Runtime Lngine is the lorms process, which runs the
requested lorm. It is spawned by a successul connection request to
the lorms Listener Serlet.
\eb Serer A \eb Serer serices http requests, deliering a ile to the requester.





Oracle 9 Forms Diagnostic Techniques.................................Page 65






OracIe Corporation
WorId Headquarters
500 OracIe Parkway
Redwood Shores, CA 94065
U.S.A.
WorIdwide Inquiries:
+1.650.506.7000
Fax +1.650.506.7200
http://www.oracIe.com/
TitIe: OracIe9 Forms 9i Diagnostic Techniques
Version: 1.0.1
Date: September 2003, January 2009
Authors: Gururaja PadakandIa, Sudarshan Upadhya
Editors: Grant RonaId
Contributors: Chris Lewis, Nick Triggs,
Ros Rason, Matt Hawkins, Steve Noton,
2009 Revision: Jan CarIin
Copyright OracIe Corporation 1999,2000, 2003
AII Rights Reserved
This document is provided for informationaI purposes onIy, and the information herein is subject to change without notice. PIease report any errors herein to OracIe
Corporation. OracIe Corporation does not provide any warranties covering and specificaIIy discIaims any IiabiIity in connection with this document.
OracIe is a registered trademark, and OracIe8i, OracIe8, PL/SQL, and OracIe Expert are trademarks of OracIe Corporation. AII other company and product names mentioned
are used for identification purposes onIy and may be trademarks of their respective owners.

You might also like