Pythian Blog: Technical Track

EBS Forms Compilation Errors in Large Terminal Windows: Size Does Matter!

During a recent customer environment cloning activity, I got myself up to the point where CUSTOM.plx was required to be recompiled. Nothing difficult, you might say, right? I thought the same. But that activity just killed lots of troubleshooting hours for me. frmcmp_batch.sh call was just failing with “Terminal map initialization failed.”
 [oracle@appslab01 ~]$ frmcmp_batch.sh module=CUSTOM.pll userid=apps/apps output_file=CUSTOM.plx module_type=LIBRARY compile_all=YES
 Terminal map initialization failed.
 API: could not initialize character-mode driver.
 FRM-91500: Unable to start/complete the build.
 [oracle@appslab01 ~]$
 
After some short troubleshooting, I thought that just setting the DISPLAY variable and running a manual compilation should be okay. And it actually worked.
 [oracle@appslab01 ~]$ export DISPLAY=:1
 [oracle@appslab01 ~]$ frmcmp.sh module=CUSTOM.pll userid=apps/apps output_file=CUSTOM.plx module_type=LIBRARY compile_all=YES
 Forms 10.1 (Form Compiler) Version 10.1.2.3.0 (Production)
 
 Forms 10.1 (Form Compiler): Release - Production
 
 Copyright (c) 1982, 2005, Oracle. All rights reserved.
 
 Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
 With the Partitioning, OLAP, Data Mining and Real Application Testing options
 PL/SQL Version 10.1.0.5.0 (Production)
 Oracle Procedure Builder V10.1.2.3.0 - Production
 Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
 Oracle Multimedia Version 10.1.2.0.2 (Production)
 Oracle Tools Integration Version 10.1.2.0.2 (Production)
 Oracle Tools Common Area Version 10.1.2.0.2
 Oracle CORE 10.1.0.5.0 Production
 Compiling library CUSTOM...
 ...
 ...
 ...
 ...
 ...
 Done.
 [oracle@appslab01 ~]$
 
My victory didn’t last too long. During one of the later steps, I was recompiling Form objects for several products using the ADADMIN, and all of these jobs were failing too. When I started looking into worker logs, I found that frmcmp_batch.sh was being executed, of course, and the logs were full of “Terminal map initialization failed” messages. I spent many hours troubleshooting this. I couldn't find any clue or known issue in MyOracleSupport, and my Google/Bing searches were unable to guide me to a solution. So I started “digging” myself. Referring to Oracle Support Note [ID 1085526.1] for a generic FRM-91500 troubleshooting gave me good hints on possible issues with the fmrcvt220.res terminal mapping resource file and interaction with TERM/ORACLE_TERM environment variables. Getting no results here, I thought of trying another terminal connection using the Mac default Terminal.app (I was using SecureCRT prior to that). And it worked!!! I saw no issues with frmcmp_batch.sh, and initiated ADADMIN Forms object compilation, which also proceeded successfully. Having a small Terminal.app window on the screen opened by default and a 1920x1200 resolution on the screen visibility wasn’t too good, so I maximized the window by clicking on the plus icon. As soon as my window was maximized, all running ADADMIN jobs started to fail. And what do you think I found in worker logs? Exactly! The same “Terminal map initialization failed” error. So the reason for all these failures was just my “too large” terminal window size. I remembered that “Terminal too wide” VIM text editor issues were due to the same reason. This can be easily reproduced. I resized my terminal to half-size, ran ADADMIN, and initiated Forms compilation for all products. While workers processed the compilation jobs, I started to resize the window using the lower-right corner. It was possible to clearly see how all workers started to fail, and again started to successfully compile when I was resizing the terminal window back to half-size. I have just reproduced it on my lab instance while I was writing this blog post. And it’s not only happening on more exclusive platforms like HP-UX or AIX. It’s also a generic Linux issue, which is most commonly used for E-Business Suite.
 -- Maximized Terminal window
 
 [oracle@appslab01 ~]$ frmcmp_batch.sh module=CUSTOM.pll userid=apps/apps output_file=CUSTOM.plx module_type=LIBRARY compile_all=YES
 Terminal map initialization failed.
 API: could not initialize character-mode driver.
 FRM-91500: Unable to start/complete the build.
 [oracle@appslab01 ~]$
 
 -- Resized it a bit and running same command.
 
 [oracle@appslab01 ~]$ frmcmp_batch.sh module=CUSTOM.pll userid= apps/apps output_file=CUSTOM.plx module_type=LIBRARY compile_all=YES
 Forms 10.1 (Form Compiler) Version 10.1.2.3.0 (Production)
 
 Forms 10.1 (Form Compiler): Release - Production
 
 Copyright (c) 1982, 2005, Oracle. All rights reserved.
 
 Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
 With the Partitioning, OLAP, Data Mining and Real Application Testing options
 PL/SQL Version 10.1.0.5.0 (Production)
 Oracle Procedure Builder V10.1.2.3.0 - Production
 Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
 Oracle Multimedia Version 10.1.2.0.2 (Production)
 Oracle Tools Integration Version 10.1.2.0.2 (Production)
 Oracle Tools Common Area Version 10.1.2.0.2
 Oracle CORE 10.1.0.5.0 Production
 Compiling library CUSTOM...
 ...
 ...
 ...
 Done.
 [oracle@appslab01 ~]$
 

Conclusion

This blog post is definitely not about a common issue that many of my colleagues all over the world might face. It is, however, a good starting point and, I hope, will save lots of troubleshooting time or Severity 1 SR’s for someone as soon as the search engines process this post. High-resolution displays are slowly getting a wider usage and good old 1024x768 isn’t always appropriate anymore. Who knows what else besides “Terminal too wide” and this one might await us.

Update

Referencing to one of my comment replies. The actual problem is not with the resolution itself, but more with the row/column count your terminal has. This problem is starting to show up as soon as you are crossing 255 column width. I didn't get the row count to the same number with the highest resolution on my Retina. Even with the minimal font size, I got only 123 rows. It's just my personal guess that having more than 255 rows might lead to the same error message. So... there is a workaround. If you would still like to use your terminal window at the full scale and not worry about such possible issues, get your font size configured properly in the terminal session so that cols/rows wouldn't cross 255.

No Comments Yet

Let us know what you think

Subscribe by email