miércoles, 15 de agosto de 2012

Launching Forms Builder and Reports Builder 11g R2 if shortcuts are not created

I followed a nice and simple Oracle Forms 11g R2 installation guide I found in an Oracle presentation in Windows 7 (following the steps for a development environment), but when the installation  finished I noticed the installer didn't create shortcuts to Forms Builder or Reports Builder (Developer). This are the executables I'm using to launch the programs:
  • Forms Builder: C:\oracle\Middleware\Oracle_FRHome1\bin\frmbld.exe
  • Reports Builder: C:\oracle\Middleware\asinst_1\config\reports\bin\rwbuilder.bat 
If I launch Reports Builder from C:\oracle\Middleware_Forms\Oracle_FRHome1\bin\rwbuilder.exe, I get the following error: REP-50125: rwbuilder.conf: java.lang.NullPointerException.


UPDATE: I don't remember if Reports Builder ran successfully at least once. When I really started needing to work with Reports Builder, I tried to launch it using the shortcut previously described, but It didn't start; CMD flashes but Reports Builder just stays in the Windows taskbar, showing no window; even sometimes it crash and Windows shows an APPCRASH report. I searched but didn't find a solution that worked for me. The installer I used was a Windows 64 bits installer. Searching through the forums, I found a My Oracle Support note that describes several problems working with the 64 bits Report Builder binaries in Windows 64 bits; they suggest installing the 32 bits version, even if you are Working in Windows 64 bits. Reference:
  • ALERT : 64-Bit Reports Builder 11gR2 (11.1.2) Problems on 64-bit Windows Operating Systems [ID 1395965.1]
I Installed again the environment usign the 32 bits installer (in my 64 bits Windows) and both tools (Forms Builder and Reports Builder) worked without problems (but my 64 bits servers stoped working; specifically, I started receiving "FRM-93652: The runtime process has terminated abnormally" when I invoked any form; what I did was to delete the references to my 32 bits installation from PATH and LD_LIBRARY_PATH -I deleted LD_LIBRARY_PATH- and rebooted; I saved obviously a backup with the previous values. I should just work with the 32 bits servers, but don't have time to configure them now).

If you are in the same situation as me, temporaly dealing with Forms and trying to get fast your way around, here are other tips (I don't know right now if those are the best or correct way of doing the configurations but have worked for me; all paths and configurations apply for a development environment installation):
  • The FORMS_PATH variable used to tell Forms Builder where to find forms, reports and libraries: can be configured in the Windows registry, in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OHXXXXXXXX key (where XXXXXX is a number that varies; you have to find the correct one). It value can be a list of disc paths, followed by semicolon. If you install the product using 32 bits binaries in a 64 bit system, the key is: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_OHXXXXXXX.
  • Database connection configuration: can be specified in the C:\oracle\Middleware_Forms\asinst_1\config\tnsnames.ora file. The related error is "ORA-12154 TNS: Could not resolve the connection identifer specified".
  • default.env and formsweb.cfg files:  
    • Windows dev env: C:\oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\AdminServer\applications\formsapp_11.1.2\config
    • Linux: /oracle/Oracle/Middleware/user_projects/domains/FormsResportsDomain/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config
    • In default.env you can configure the FORMS_PATH variable to be used by the server to find forms, reports and libraries.
    • In formsweb.cfg you can change for example the width and height of the forms applet (width and height properties).
    • In default.env you can find the correct values for ORACLE_HOME and ORACLE_INSTANCE for your forms installation.
      • ORACLE_HOME=C:\oracle\Middleware\Oracle_FRHome1
      • ORACLE_INSTANCE=C:\oracle\Middleware\asinst_1
  • Registry.dat file: C:\oracle\Middleware_Forms\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.2\config\forms\registry\oracle\forms\registry\Registry.dat
  • Problem with Java Plugin in Firefox on Windows 7: I'm working with Windows 7 64 bits and Firefox 14. I had to set the exact version of Java JRE I had installed in Windows in formsweb.cfg; I had also to install a 32 bits JRE (even if I am in a 64 bits Windows). References:
  • base.htm , basejpi.htm, etc. files location:
    • /oracle/Oracle/Middleware/asinst_1/config/FormsComponent/forms/server
  • Forms migration assistant: C:\oracle\Middleware\asinst_1\bin\frmplsqlconv.bat
  • httpd.conf location: /oracle/Oracle/Middleware/asinst_1/config/OHS/ohs1/httpd.conf
  • Images (icons) in buttons: I followed the steps in this great post: How to set forms 11g buttons to display icons. Actually, I just followed just some of the steps to successfully show the icons:
    1. Create the icons jar in an arbitrary path (jar -cvf frmicons.jar *.*).
    2. Paste the icons jar in C:\oracle\Middleware_Forms\Oracle_FRHome1\forms\java.
    3.  Edit the archive key in formsweb.cfg to add the icons jar name (the codebase and imageBase keys were already correctly configured acording the instructions); for example: 
      • archive=frmall.jar,frmicons.jar
      • imageBase=codebase
      • codebase=/forms/java
    4. Sign the jar with sign_webutil.bat.
  • FRM-41213 trying to invoke reports from forms: when I first tried to invoke a Report from a Form or Form Menu, I got the following error: "FRM-41213: Unable to connect to report server x". The developers of the Forms app I was trying to deploy were using a parametric table to find the report's server name to use in run_report_object. I didn't know the "report's server name" was a logical name and not the hostname of the server the service is running in; then I tried to set this report's server name to things like the server hostname, its IP address, but none of this worked. I found that name is a logical name you can find through an utiliy called rwdiag.bat. You can do this to find the names of the reachable reports severs: rwdiag.bat -findall. I also found the mechanism through the client can find the reports servers is defined here: C:\oracle\Middleware_Forms\asinst_1\config\ReportsToolsComponent\ReportsTools\rwnetwork.conf; it is using a multicast discovery mechanism by default.
    • rwdiag.bat location for Windows developer environment installation: C:\oracle\Middleware\asinst_1\config\reports\bin\rwdiag.bat.
    • To diagnose this problem, I use the following My Oracle Support note:
      • Diagnosis Test Form for Easy Debugging of FRM-41213 Error (11g) [Video] [ID 880823.1].
      • This note provides a test form that gives you detailed information about the report invocation.
    • Rwdialog invocation example:
  • FRM-41214 Unable to run report: after I fixed FRM-41213, I started receiving FRM-41214. The good news is that if you get FRM-41214, you are getting correctly connected to the reports server. You can look at the following URL to know if the report generation job was registered by the reports server and to see the concrete error: http://localhost:7001/reports/rwservlet/showjobs?server=reports_server_name (reports_server_name is again, the reports server logical name as returned by rwdialog).
  • Nothing happens when calling Reports from form's menu items: I compiled manually some forms and menus from Forms Builder 11g in Windows; some of those menus called reports. The invocation ran OK in Windows. I uploaded the compiled forms, menus and reports to a Linux server and when I clicked menu items which called reports, nothing happened; I saw no errors in the client's Java Console or in the server logs. I recompiled the menus and forms in Linux and everything started working again. I though Forms and Menus were "multi platform" :-\

Extra references:
Tricks: