Converting Oracle 10gR2 libraries to Forms 11 — without abort message

Although Oracle states it is just a matter of picking up the forms sources (*.fmb) and recompile them on the Forms 11 server, it doesn’t seems to be that easy for us. Besides the normal FMB files we also have a couple of library files who need to be converted, and when we just picked those up and tried to compile them, we ran into interesting issues..

This post is about the solutions we tried and more so: the workaround because at the time of writing, the SR at Oracle is still “work in progress”. The OS we migrate from is Oracle FormsReports 10GR2 on Redhat 5.4 32 bits, and we are migrating to WLS 10.3.5. with FormsReports 11.1.1.3.0 on Redhat 5.4 32 bit. Shouldn’t be that hard, you would think..

First off, we start with the libs since the forms will certainly not compile without those. The logical place to start is to compile the libraries who do not have  other library dependencies.

The first attempt went like this:

Get the pll file from the Linux server (scp/sftp ftp whatever.. 😉 and place this file on the destination server.

Sidenote: we have a script which sets all of the environments just the way Oracle likes them, otherwise the compiler won’t even begin to think about compiling.

The script is show here:

#!/bin/bash
# ENV settings

#source /home/oracle/.bash_profile
ORACLE_HOME=/oracle/formsRep11
export ORACLE_HOME
ORACLE_TERM=vt220
export ORACLE_TERM

. /oracle/formsRep11/forms/config/default.env
# For the frmcmp
export JDK_HOME=/oracle/formsRep11/jdk/jre/lib/i386/native_threads
export LD_LIBRARY_PATH=$JDK_HOME:/oracle/formsRep11/jdk/jre/lib/i386/client

PATH=$PATH:$HOME/scripts:$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin:/oracle/formsRep11/jdk/bin:/oracle/formsRepInst/bin
export PATH

echo "Starting Compilation of " $1
frmcmp_batch.sh module=${1} logon=yes userid=user/password@forms11db window_state=minimize compile_all=yes module_type=library batch=no

If using this script change the user,password and db SID to your environment. The script takes the library filename  as an argument so:

$ compile_libs_pro055.sh ofgcall.pll

will compile the library. For bulk compilation, you can just keep calling this script in a loop.

However…..
This didn’t work. We got a nice little message stating the forms version used of oracle, a nice login of the database…and *whammo!* an abort message and no compiled file.

What to do, what to do…We certainly were not expecting this. No log file (Well..a small stack dump file, which is not of any use for us..) and no message about which form error occurred. Just an abort message.

After thinking and tinkering a bit we came to the following workaround. Just don’t ask how we came up with this, just be as glad as us that we did ;-).

We opened up the library file in the Windows Forms10GR2 builder, and compiled the file in windows to see if the library file is working fine. This was the case. Later In a few steps later we found out we didn’t need to compile the file, just opening it is enough.

Then we saved the file back, but with the SAVE AS..., not the quickSave/normal save. This is important! Otherwise it doesn’t work. The program will ask to overwrite the file and you will say yes. You can say no, but then, the trick is not going to work. When the file is saved, transfer it to the server with forms builder  11 on it, and try to recompile the file again. This time: it should work!

At this time you either hate this post, or love it..Since if it doesn’t work, you’ve read this post for nothing.. 😉

What we did notice was that in some cases the builder on Windows would place some package body code outside the package body where it belongs. In this case, just open the forms builder GUI on the Forms11 server and place them back again. The compiler throws some sensible enough errors on the screen to recognize these cases.

What we also did before getting to this solution is first convert the pll file on the Forms10GR2 version to an pld file and after a TEXT copy to the server, run a dos2unix script on it  to get rid of the end of lines differences between Windows and Linux. This file we converted back to a binary file (.pll) with the Forms11 builder and this would also compile..

But what if….there are library dependencies??

What we did was first compile all the libraries without the dependencies. When we tried to compile one with a dependent library attached, the compiled complained  about not being able to find the attached library all in uppercase and no extension. When this library was added in upper case and no extension (yes, a symbolic link was created in under two seconds ;-0 ) the compiler complied about not being able to find the file it was trying to compile..

This was easy solved by just opening the file in the 10GR2 forms builder, delete all the attached libraries, SAVE the file AS..and transfer it to the forms11 server. There we opened  the file  in the forms builder 11, and reattached the libraries without the path to the library.

This compiled just fine.

 

Of course we filed this in a SR with Oracle, and the result at time of writing was:

Bug 12635464: FRMCMP / FRMCMP_BATCH FAILS TO GENERATE PLX WITH ABORT MSG.

So, we found a bug.. ;-0 . Hopefully if you also encounter this bug, you have the workaround from the real source…

If I have missed something, just post a comment and I’ll follow it up with help if I’m able.

Greetings!

Advertisements

About GemsOfProgramming

Beeing a previously enthusiastic Java programmer, I rolled into the Oracle Database Administration world. It turned out I got a knack for this, and since approx. 2000 I'm a full time DBA. My experiences touches lot of Oracle products like Forms and Reports 9/10, JDAPI, Application Server, Weblogic Fusion and of course: Oracle Enterprise Databases, JavaFX, Swing and other Java components.
This entry was posted in Forms/Reports. Bookmark the permalink.

2 Responses to Converting Oracle 10gR2 libraries to Forms 11 — without abort message

  1. LSC says:

    Hi

    I just faced the same error as you. Migrating from 10gR2 to 11gR2, RHEL 5.3 x86.

    Did they ever put out a patch for this or any official workaround?

    Thanks a lot

    • Hi,

      No, there is no patch for this, and in my humble opinion: Oracle is not going to do this in the near future. Personally I think Oracle Forms is running into a dead-end alleyway..

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s