Professional Documents
Culture Documents
Applications to Forms10g
Introduction
Upgrading Oracle Forms applications from 6i to 10g is achievable once you know what
to do. In this document I will explain the process I followed when upgrading the
Automated Lands Project (ALP) at the USFS. I will not go into great detail regarding
application specific issues encountered when upgrading, such as the use of OLE or
Mouse Triggers. Covering this subject would quickly balloon this paper into a short story
and neither you nor I want that! It is my hope that this document will provide you with
an understanding of what is involved in the upgrade process and some specifics for
configuring Oracle Components for Java (OC4J) and Internet Application Server (iAS)
that you will need to be able to deploy your application.
When completing this step, I recommend creating an inventory of the Application source
code. I create a spreadsheet that contains all of the files sorted by category (Forms,
Libraries, Menus, Graphics, Utilities and Reports). I then open all the forms, libraries,
menus and reports and note their library attachments. You may think this is a lot of work,
but the couple of hours you spend doing this up front will eliminate wasted time
downstream when you realize that you are missing files or when you are debugging
problems with library attachments. You’ll find this document useful in the future so
check it into your Version Control system.
The order that you upgrade your application is important! You will run into the least
amount of errors if you upgrade your application in the following sequence:
1. Library files (.pll/plx): Starting with library files that do not have attachments and
then preceding to those that do have library attachments.
The Forms Migration Assistant logs what it does to each of your files, so it is a good idea
to review the log as you run your files through.
Libraries
Forms libraries require a fair amount of work to prepare for deployment on a platform
other than Windows. Below is an overview of the tasks to be completed.
Rename the Libraries to Uppercase: Starting with the easiest task, forms
attachments are implicit in nature – meaning that you can not edit the name
referenced in the Forms Builder once you attach a library to a form. The name of
the library is attached in uppercase. So at runtime if you want your attached
libraries to be successfully referenced, you need to make sure the file names are
uppercase.
Consolidate Infrastructure Libraries: While nesting libraries is a great object
oriented development technique, it is only minimally support in 10g deployments.
Libraries can only be referenced by a form if they are 2 levels removed, for
example:
o Valid: Form A has Lib1 as an attached library. Lib1 has Lib2 and Lib3 as
attached libraries. Lib2 and Lib3 do not have attached libraries.
o Invalid: Form B has Lib1 as an attached library. Lib1 has Lib2 and Lib3
as attached libraries. Lib2 does not have an attached library. Lib3 has
Lib4 as an attached library.
Refer to the Inventory document that you created as part of Step 1. If you
determine that you have nested-libraries that are more the 2 levels removed from
the form, you will need to spend some time consolidating and reorganizing your
libraries.
Convert the Contents of Libraries to Uppercase: This step will ensure that
referenced code functions all the time. This is not as tedious a process as you
might expect if you follow this procedure:
o Use 10g Forms Builder to convert the library files to text from binary
File Menu – Convert
o Use TextPad to convert the case to Uppercase
Open the file
Graphics
To make sure you iconic buttons remain, well, “iconic”, we need to do a little work to
prepare them for the web. There are currently two graphic file types that can be used for
iconic buttons, .gif and .jpeg. In your 6i application you probably had .ico files though,
unless you happened to be deployed in motif in which case you have .xpm files. So we
know that you need to convert your icon files to .gif or .jpeg format for sure. These will
be used at runtime (OC4J or iAS). What you probably don’t know is that 10g Forms
Builder does not use this file format. To see the graphics on your iconic buttons in Forms
Builder you will need to maintain those .ico files as well.
So your first task is to convert your icon files to .gif or .jpeg. Below is a procedure which
should help reduce the time to complete this task:
Download and install irfanview from www.irfanview.com (it’s free)
Using irfanview convert you icon files
o File – Batch Conversion
If you have .xpm files convert to .ico
Be sure to click on options and use the transparent
background. Click on the black area around the image to
have it be transparent
Convert .ico files to .gif (or .jpeg)
Be sure to click on options and use the transparent
background. Click on the black area around the image to
have it be transparent.
Now that you have .gif files, you next need to create a .jar file that contains all of the .gif
files. To do this:
Open a command window on your PC
Navigate to the directory where your .ico files are located
Then run this command:
c:\<Oracle Home>\jdk\bin\jar.exe –cvf <new file name>.jar *.gif
Next you need to move the .jar file to your application home directory and you will be
ready to configure OC4J on your PC to use this file at when running your Forms.
If you haven’t already, now is a good time to do some reading on Deploying 10g
applications. Oracle has some excellent documentation to assist you with this task
available at http://www.oracle.com/technology/documentation/9i_forms.html. There are
two documents that I highly recommend:
In the remainder of this section, I will refer to the modifications required for testing in
OC4J.
Below is the named configuration that I created for the ALP project. This configuration
is used when calling all Forms in the Application.
Now you have a choice in how you implement this change. You can modify the
Default.env file directly adding the directory of your application to the end of the
FORM90_PATH variable. The directory you add will then be immediately available in
your runtime environment. The problem is that all applications that use the default.env
will also have that directory added to the search path. If two applications happen to have
the same file name in their application you will run into problems.
Orion-web.xml(c:\<oracle home>\j2ee\devsuite\application-deployments\forms\forms90web\orion-web.xml )
This is the listener configuration file specific to OC4J. You can define a virtual directory
path for your application’s graphics .jar file here. The example below show the edit made
for the ALP application. The customization for ALP is the last entry in BOLD red font.
Note: “/forms90/” is automatically added to the prefix of your virtual path.
<virtual-directory virtual-path="/html" real-path="C:\oracle\client10g/tools/web90/html" />
<virtual-directory virtual-path="/java" real-path="C:\oracle\client10g/forms90/java" />
<virtual-directory virtual-path="/jinitiator" real-path="C:\oracle\client10g/jinit" />
<virtual-directory virtual-path="/alp" real-path="C:\env\alp" />
When you have created the two directories copy your application into the directory you
are planning to use for the compilation. Copy over all of the application binary (.fmb, .pll
and .mmb) files and the application graphics .jar file.
Navigate to the directory where your binary files are located. In the ALP
Upgrade this was $HOME/alpdev. Note: You must be in the directory where
your binary files (.fmb, ,mmb, .pll) are located when you compile the application.
Start a Terminal Emulator (Exceed or VNC). You need to do this whether you
plan to upgrade your application interactively or in batch mode.
Export ORACLE_HOME
Digital Visions Enterprise Unit 6 of 8 10/19/04
Paul Dirksen pdirksen@fs.fed.us
export ORACLE_HOME=<Form Services $ORACLE_HOME>
Move the executables (.fmx, .plx, .mmx) and the graphics (.jar) to the testing
directory. In our upgrade we move the files to /fsapps/fsprod/alp. You are
now ready to configure iAS.
iAS Configuration
Many of the steps here are similar, if not the same, as configuring OC4J on your PC. In
that sense, the tasks involved here should go more fairly quickly due to your familiarity.
If you do not have the ability to edit these files as the user ORACLE you will need to
involve you iAS Administrator. The edits described below can be made using OEM of
iAS or directly editing the files listed. In the examples below, I will be providing
examples editing the files directly.
#ALP
#08/30/04 Paul Dirksen - Digital Visions
[alp]
userid=pdirksen/dvcontractor@cell2.idb.pnw
workingDirectory=/fsapps/fsprod/alp
envfile=alp.env
imageBase=codebase
width=883
height=857
archive_jini=f90all_jinit.jar,/forms90/alp/alpicons.jar
After completing this modification, you need to restart the HTTP Server for this
modification to take effect.
Testing
The last task here is to thoroughly test the application. You will be looking for problems
in the upgrade and/or your configuration. Be sure to allow yourself sufficient time to
complete this step. If problems are found in the Forms, you will need to go back and
work on those in the Windows environment. When you are satisfied with your work
there, you will need to recompile on AIX and test again. Configuration problems will
require you to work closely with your System Administrator to resolve the problems.
This information will need to be supplied with the other normal IRM information for
deploying applications.
Conclusion
Upgrading application from 6i to 10g is detailed, but not a daunting process. Like most
things, with experience comes proficiency. At first the steps outlined in this document
may seem tedious, but once you have completed an upgrade you will find that your next
experience will be much smoother. Each application will likely have it own unique
application specific upgrade challenges, but the process of getting there will likely remain
fairly constant. Thanks for taking the time to read this document.