Wednesday, October 9, 2013

Moving Forms Applications From One Platform To Another

For this example the assumption is that the "development" machine is a MS Windows platform and the "deployment" machine is a Unix platform.
IMPORTANT: FMX, MMX, and PLX files are NOT portable between platforms. They are also not portable between major versions. For example, you cannot run a 9.0.4 FMX in a 10.1.2 environment. Source code (FMB, MMB, PLL) must be recompiled when moving from one platform and/or major version to another. This includes moving from one Unix platform to another (i.e. Sun Solaris to Linux) or one Windows platform version to another.
( FRM-40031: File xxxxx.fmx is not a Forms Runtime File.)
Failure to correctly compile source files on the machine where they are being deployed will cause instability or prevent the application from running or may cause trigger code to not fire.
Requirements for "deployment" machine:
Log-in access as the "oracle" user
X-session (GUI)
It is NOT supported to perform the following via a remote session. 


1. Verify that the deployment environment has been correctly installed and configured as documented in the product Installation Guide.

2. Create a staging directory where the application source files (FMB, MMB, PLL, OLB) can be stored permanently or temporarily. This directory will also be where the compiled executables (FMX, MMX, PLX) will be created. For example:
mkdir /u02/oracle/ias904_mid/forms90/myApplication


3. Copy/transfer all of the Forms components which make up the application to the directory created in step 2. These will include FMB, MMB, PLL and OLB files.
IMPORTANT: Unix is a case sensitive operating system. Be sure that any references to files within your application have been corrected to match files on the new file system. This will usually impact references to image (icon) files, other forms, menus, and libraries.


4. Copy/transfer all other application files as needed. These files may include custom resource (.res), image or custom JARs files. These files will need to be placed in specific locations based on how you developed the application. Refer to the product documentation for more details.
IMPORTANT: If transferring using FTP, all files must be transferred in binary mode.
The following steps must be performed from the local "deployment" machine. Performing these steps remotely is not supported. 


5. Open a shell session.

6. Set the ORACLE_HOME variable and point it to the Application Server installation. Be sure to use the appropriate syntax for the particular shell you are using. For example in csh the command would look something like this:
export ORACLE_HOME=/u02/oracle/ias904_mid


7. Set the FORMS90_PATH variable to the directory which was created in step 2. For example:
export FORMS90_PATH=/u02/oracle/ias904_mid/forms90/myApplication
Additional variables may be necessary or desired based on your needs and system configuration. Here are a few examples:
TNS_ADMIN
NLS_LANG
CLASSPATH
TERM
DISPLAY
In most cases, setting these will not be necessary if you use the provided script (.sh file) noted in the next step.
When compiling a Forms application it is important to understand the application. Most important is to understand the dependencies which may exist between components. In other words, for example you will not be able to compile an FMB if it has a dependant PLL which has not yet been compiled. In most cases the order in which compiling should occur is as follows:
1. PLL
2. MMB
3. FMB
There are exceptions, but this will work in most cases.


8. Using the compiler, generate "X" files for all of the application's binaries (PLL, MMB, FMB). The command will be something like the following:
f90genm.sh module=myForm module_type=form compile_all=yes userid=scott/tiger@orcl
Other possible module_type values:
library
menu
form
Addition compiler options can be found in the Forms Builder online help. For Forms 9.0.4, the Builder help is also available online at:
http://www.oracle.com/forms/10g/help/
Click on Reference then Form Compiler Options
NOTE: In Forms 10.1.2.0.2 and newer, the script names have changed. f90genm.sh is now frmcmp.sh and f90gen.sh is now frmcmp_batch.sh. Also, FORMS90_PATH is now FORMS_PATH. Please refer to the product documentation for more details.


9. Once all of the executables have been generated, the path to these files will need to be included in the Forms deployment environment. In most cases this will be the FORMS90_PATH value in the Forms env file, "default.env"

No comments:

Post a Comment