Mozilla Firefox 52 ESR for extended NPAPI-support

Interesting post from my colleagues from the US regarding Oracle Forms & Firefox 52:

As of March 7, 2017, Mozilla has released the newest release of Firefox, version 52. Similar to what Google Chrome did about a year or so ago, Mozilla has now disabled the NPAPI plug-in which is required to run anything with Java such as Oracle Forms without using Java Web Start. What will happen is if Firefox is updated to version 52 and you try to access Forms, you will see a blank screen which will result in the Forms application to not start at all.

Fortunately, Mozilla has realized that businesses still need to use services such as Java during this transition, so Mozilla has released the Firefox “Extended Support Release” for version 52. This is a version of Firefox which is used by companies and organizations which need support for running Java with the NPAPI plug-in especially for mass deployments. The current ESR version of 52 will continue to allow the use of the NPAPI plug-in for Java through May 2018. The download link (to download the 32-bit Firefox 52 ESR for Windows 32 and 64-bit machines) may be found here:

https://www.mozilla.org/en-US/firefox/organizations/all/

After this is installed on your PC, you will be able to run Forms using Firefox again without the need of Java Web Start. This is important for anyone who is still running Forms 11gR2 (or older) which has no support for Java Web Start. However, if you are running Forms 12c, you may use Java Web Start which allows you to run Java (required for running Oracle Forms) without the NPAPI plug-in. Java Web Start allows you to run Oracle Forms 12c from any web browser (Internet Explorer, Firefox, Chrome, Edge, etc.). If you decide to use Java Web Start, the Firefox ESR is not necessary.

Sources: https://support.mozilla.org/t5/Problems-with-add-ons-plugins-or/Why-do-Java-Silverlight-Adobe-Acrobat-and-other-plugins-no/ta-p/31069 and https://www.fxsitecompat.com/en-CA/docs/2016/plug-in-support-has-been-dropped-other-than-flash/

from Oracle Knowledgebase – PITSS America, LLC

Oracle Forms 12c: Error 801 while compiling

If you’ve already upgrated to the latest Forms version (currently 12.2.1.2) you’ve maybe encountered following problem:
If you use a cursor, that is specified in a package specification within your forms and define a rowtype based on that cursor that is fetched into the rowtype in a different other part of the form (in my case the package body). If you then try to compile you may get the error 801 internal error [unexpected fragile external reference] from figure 1.

unbenannt

Figure 1: Compilation error

Metalink documents

We’ve opened a service request for that problem in metalink and received an answer, that I would like to show you in this blogpost. There is also a bug filed as well: Bug 23250870
The solution for the compilation error and it’s solution is described the following document in Metalink. It says, that the base bug is a PLSQL bug.
Rather than providing a patch for that problem, Oracle gives the information, that you have to set following variable to one to enable the compilation:

FORMS_PLSQL_BHVR_COMMON_SQL=1

If you set a path variable in CMD before starting the Forms Developer and then execute frmbld.exe you are able to compile a module that contains a construct like:

PACKAGE Test IS
  cursor c1 is select name_object from all_obj;
  master_rec            c1%ROWTYPE;
END;
Package body Test is  
  Procedure p1 is
  begin
      fetch c1 into master_rec;      
      close c1;
  end p1;    
end;  

 

Registry entry & environment variable

Warning: Changing the Windows registry can mess up your OS.

I’ve tried to also create a registry entry in a Windows machine under HKEY_LOCAL_MACHINE\Software\Oracle\KEY_OracleHome1 and set it to “1” so you don’t have to execute a batch before running Forms Builder. Also I have tried to create a new environment variable. Both options enable the Forms Builder to compile. But I had complications while compiling a bigger customer forms module, when I hit directly Ctrl+shift+k – the Forms Builder crashed when I did not connect to the database before hitting the hotkey.

OTN links

https://community.oracle.com/thread/3986558

https://community.oracle.com/message/13371977#13371977

Oracle Forms & Database Wallet

During my work as an Consultant I’ve seen some Forms applications, where developers made their lifes easier by using the Oracle connect string to directly connect to the database when starting Forms application. The problem is that the password in most cases is entered in plain text as part of the formsweb.cfg. In this blog post I am going to show an Oracle database feature that enables you to combine comfort and security. This is most properly only a problem for forms applications without SSO.

Purpose for using the userid

In most cases the connect string was utilized in the formsweb.cfg parameter userid. Here you are able to specify a complete connect string, e.g. userid=user/pw@mydatabase. Why would connect that way to your application? Often it was a way to perform a connect to the database and have a user login afterwards. Some developers say it would be to complicated for the users to first type in the credentials for the db and then connect with their personal user. But this usage of the userid is not feasible. Which DBA wants to have a unencrypted database production password in any configuration file?

Oracle Database Wallet

To be able to use the connect string in a secure way – not also to login to the application but also to enable batch processing etc. you can use the oracle wallet. This is a feature from the oracle database.capture

There are quite some guides in the web on how to set up a wallet and add credentials to it. I found the following guide as most helpful:
http://www.dba-resources.com/oracle/a-guide-to-oracle-wallet/

After you have set up the wallet correctly, you are able to connect to the database without entering the username and password. Those information are now stored encrypted in the wallet. With /@TNS_NAMES_ALIAS you can directly connect to the database.

Using wallet in configuration

So if you really need to use the parameter userid (which I normally do not recommend) incapture2

your formsweb.cfg you can now use the wallet instead of unencrypted password. Add userid=/@TNS_NAMES_ALIAS to directly connect to the application on startup. As mentioned in the linked blog above, the wallet is slightly safer – keep in mind that you have to ensure OS security.

Configure Webstart for custom Jar-Files

The following text is from a knowledgebase entry from my colleagues from the US. It describes how you have to configure Forms & Reports to be able to use PITSS.CON with webstart. Since adding your jar-files to the extensions.jnlp is a general task when you want to use webstart in 12c, I thought that this could also be helpful for people that want to configure webstart for their application in 12c.

Oracle Forms 12c is the first version of Forms to be supported with the new Java Web Start functionality. This allows you to launch your Forms application using any certified browser including Google Chrome. PITSS.CON can also be configured to run with Java Web Start. To implement this functionality with PITSS.CON, you will need to run these steps:

  1. Open up formsweb.cfg located in %DOMAIN_HOME%\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.2.1\config.
  2. Within your config section(s) for PITSS.CON, add the following parameters inside it:
    1. basejnlp=webutil.jnlp
      webstart=enabled
  3. Save and close the file.
  4. Go to %ORACLE_HOME%\forms\java and open up extensions.jnlp in a text editor (make a backup of this file first).
  5. Look for <!– <jar href=”jacob.jar”/ –>. Uncomment this line. It should look like this: <jar href=”jacob.jar”/>
    1. NOTE: This fixes a Forms startup issue when using Java Web Start. Source: Oracle Support note 2083540.1
  6. Add the following lines for each of the PITSS.CON jar files (this will allow all jar files for PITSS.CON to be used while running Java Web Start):
    1. <jar href=”/forms/PitssJava/pitssicon.jar”/>
      <jar href=”/forms/PitssJava/pitssE.jar”/>
      <jar href=”/forms/PitssJava/pitssH.jar”/>
      <jar href=”/forms/PitssJava/pitssFS.jar”/>
      <jar href=”/forms/PitssJava/pitssCFS.jar”/>
      <jar href=”/forms/PitssJava/pitssLE.jar”/>
      <jar href=”/forms/PitssJava/FileLastModified.jar”/>
      <jar href=”/forms/PitssJava/pitss_calendar.jar”/>
      <jar href=”/forms/PitssJava/pitssXSL.jar”/>
      <jar href=”/forms/PitssJava/classes12.jar”/>
      <jar href=”/forms/PitssJava/PitssFileUtils.jar”/>
      <jar href=”/forms/PitssJava/BarChart.jar”/>
      <jar href=”/forms/PitssJava/colorpicker.jar”/>
      <jar href=”/forms/PitssJava/jcommon-1.0.16.jar”/>
      <jar href=”/forms/PitssJava/jfreechart.jar”/>
      <jar href=”/forms/PitssJava/PieChart.jar”/>
      <jar href=”/forms/PitssJava/OGD.jar”/>
    2. The file should look like this:
    3. Java Web Start PITSSCON
  7. Save and close the file.
  8. Clear your Java cache on your PC where you plan to launch PITSS.CON.
  9. Launch PITSS.CON.

After completing the steps above, you should be able to use PITSS.CON using Java Web Start.

über Oracle Knowledgebase – PITSS America, LLC

Running Forms 12c with SSL and Java Web Start Uses HTTP Instead of HTTPS

There is a known SSL-related issue when you run Oracle Forms 12c using the Java Web Start functionality. What happens is when you launch your Forms application using Java Web Start using HTTPS, you will notice that the URL will change to using HTTP instead of HTTPS. In some cases, you may encounter the following error:

“General Exception”

“ExitException: Unable to load resource: http://<host&gt;:<HTTPS_PORT>/forms/java/extensions.jnlp”

HTTPS Java Web Start issue

HTTPS Java Web Start issue

To fix this problem, you will need to add the following parameter inside your config section in formsweb.cfg which is configured for Java Web Start:

webstart_codebase=http://<host>:<HTTP_PORT>/forms/java

HTTPS Java Web Start fix

After making this change, the Java Web Start session should maintain the SSL connection using HTTPS without this error appearing.

thanks to my colleagues from PITSS LLC via Oracle Knowledgebase – PITSS America, LLC

JDeveloper Plugin for Forms2ADF Migration

I’ve migrated my first Oracle Forms module last week. It is the first time for me to be part of a migration project. The colleagues that I am working with instead have a high experience when it comes to ADF and migrating Forms to this technology, while my focus the last couple of years was mostly Oracle Forms. I think that is a possible scenario for many projects, where the aim is to migrate Forms to ADF.

So how can Forms developers start to migrate their application? The first step for me was to gather information on ADF, its architecture and the basics. I tried this with some self training, online materials and the help of my colleagues. When I came to the point to migrate the first module by myself I used the Forms Developer & PITSS.CON to understand how the form worked before and how the workflow was. There are people out there, that tell you that tools won’t do the job for you – and I agree. But they can make your job as a developer much easier. My colleague Mathias Waedt has developed a plugin for JDeveloper, that helps you as a developer when struggling with a migration. It helped me to understand which objects in ADF have been generated and which not. It showed me, were I had to put my effort into. The plugin fetches its information from the PITSS.CON repository.


Unbenannt

When the plugin is started it shows the basic information of the project like the database scheme, the names packages for the different objects (entity objects, view objects, etc.) and some other parameters. With a click on the details tab it is possible to see information of single forms. The form summary tab displays information regarding how many Forms objects already have been transformed to ADF components with PITSS.CON. This gave me a first overview of the upcoming work for that specific module. I saw, that most of the graphical objects were generated and only small modifications  were neccessary here, while I had to modify the business logic that was formerly located in triggers and program units.


Unbenannt2

 

With a click on Form Details it is possible to see which objects have been generated and which not. So for me as a newbie it was a big relief to use this kind of a checklist.


Unbenannt3

You can see all the objects from Oracle Forms and the corresponding generated objects in ADF – with a doubleclick you will directly jump into the generated object (e.g. Java Bean). As a future functionality it is planned to mark the objects that were added by the developer and are considered to be done. So you can work your way through the module without the danger to forget a functionality that was present in Forms up to 100%. The plugin is currently in the beta phase.

Update: jp2launcher.exe workaround

So, first post in the year 2016 – its gonna be a short one 🙂

In a previous post in this blog I mentioned a problem for using the webstart in Oracle Forms 11g: That the jp2launcher.exe process will not be terminated automatically when the webstart window is closed (view post). I ran a few tests the last days and it seems, that this problem is solved with the new release of Forms 12c as the webstart is included as a separated configuration option.

So I just wanted to let you know, that if you plan to use the webstart feature and to upgrade to 12c the mentioned solution is obsolete.

How to enable scrolling in Forms Developer Object Navigator

Since I started developing Oracle Forms within the Forms Developer there has always been an issue that was quite annoying: The fact, that srolling in the object navigator is not possible. But there is a tool out there, which enables additional mouse support called KatMouse. It provides universal mouse scrolling – here the link to download the tool:

http://ehiti.de/katmouse/

After the installation and start of KatMouse it is possible to use the mouse wheel in the Forms Developer which is not a big deal – but it makes life easier. Thanks to my colleague Peter Kopac for the hint.

Start options in Oracle Forms 12c

So I’ve read quite a lot of blog entries and news regarding Oracle Forms 12c in the last weeks since the release. It is nice to hear and see that Oracle Forms still is not dead.
The release brought some nice features with it. Today I would like to have a look at the different start options, that are now available.

Embedded Java applet

The standard start in the last couple of years. So its still possible to call your form application through the Java plugin embedded in html. Just create a new section in the formsweb.cfg. The parameters for the standard behaviour are:

baseHTML=webutilbase.htm
baseHTMLjpi=webutiljpi.htm

Unbenannt

There is also an option to embed JNLP in html:

basejnlp=base.jnlp
baseHTMLjpi=basejpi_jnlp.htm

Both options require a Java Plugin and a browser.

Java Webstart

This method of starting a Formsapplication is not new. But whats new is the fact that Oracle now supports this option. Since more and more browsers stopped or will stop supporting the NPAPI-Plugin this step was neccessary. Google Chrome already stopped the support, Firefox will support the plugin until December 2016. Microsoft still supports it in the Internet Explorer 11, while Edge does not.
So if you want to use webstart, just copy following lines into your configuration section:

webstart=enabled
basejnlp=base.jnlp

Afterwards you can open your application through entering following URL:

http://<host>:port/forms/frmservlet?config=<configname>

You will be asked to open a file (frmservlet). Just open it and you should get the following screen – you need to have a JRE installed for that.

2

There are some facts that have to be considered when using the webstart (copied from Michael Ferrante’s PPT):

  •  Limited SSO support (requires
    browser). SSO cookie will not be shared
    with browsers launched from Forms.
  •  No support for SSO Logout or Java
    Script Integration.
  •  Requires either JDK or Java Plugin (JRE).
  •  Browser optional (required with SSO).
  •  Presents application with native
    appearance.

Standalone

There is a new standalone option. For that you have to download the Oracle Forms Stand-alone Luncher(FSAL). A howto is to be found on your server environment under:

http://<host>:<port>/forms/html/fsal.htm

I did not have the time to fully test this option but here is what Michael Farrante stated in his Oracle Open World 2015 presentation:

  • No support for SSO, SSO Logout or Java
    Script Integration.
  • Requires either JDK or Java Plugin (JRE)
    installation.
  • Browser not required.
  • Presents application with native
    appearance.
  • Example page available at:
    /forms/html/fsal.htm

This option shall offer “a browser-less, more client/server-like interface”.

Oracle Forms 12c BI Publisher Integration

Today I started to have a look at the possibilities of integrating the BI Publisher in Forms 12c.

2

Sadly I didn’t find anything regarding this topic in the online documentation – so I created a report object and had a look at the properties.

We found out, that there are several new properties in the report object. So I created a forms module with a simple button and tried to call a BI-Publisher Server. As expected, my first try was not successful – I got an “FRM-41223: BI Publisher integration error”. So I had a look at the online help under “SET_REPORT_OBJECT_PROPERTY” to see if there are any new properties – and yes there are quite a lot new BI-Properties:

  • BIP_SSL_CONNECTION: Indicates whether or not SSL is mandatory or optional.
  • BIP_SERVICE_LOCATION: The URL to the Oracle BI_Publisher server Web Services WSDL for ScheduleServices.
  • BIP_REPORT_PATH: The absolute path to the report to be run (on the BI_Publisher server).
  • BIP_REPORT_LOCALE: Preferred report locale.
  • BIP_REPORT_FORMAT: Desired report output format.
  • BIP_REPORT_TEMPLATE: A template registered with the report specified in BIP_REPORT_PATH. It is common practice to provide this property along with report name/path but BI-Publisher gives the option of setting a default value when creating/editing a report, therefore this is an optional property in Forms. Value is used and validated by BI-Publisher.
  • BIP_REPORT_PARAMETERS: A list of name/value pairs separated by a space.
  • BIP_USER: The BI-Publisher username required to access the Web Service. This value cannot be set in the Property Palette.
  • BIP_PASSWORD: The BI-Publisher user password required to access the Web Service. This value cannot be set in the Property Palette.
  • FTP_SERVER: FTP server name as configured in BI-Publisher.
  • FTP_SECURED: Determine if FTP will be secured (i.e. SFTP) or unsecure.
  • FTP_USER: FTP server username.
  • FTP_PASSWORD: FTP server user password.
  • FTP_FILE_NAME: Output file name to be stored on FTP server.
  • FAX_NUMBER: Fax number. Format as required by your server configuration.
  • FAX_SERVER: Name of Fax server as configured in BI-Publisher.
  • MAIL_TO: The mailto email address.
  • MAIL_FROM: The mailfrom email address.
  • MAIL_CC: The mailcc email address.
  • MAIL_BCC: The mailbcc email address.
  • MAIL_REPLYTO: The replyto email address.
  • MAIL_SUBJECT: The email subject string.
  • MAIL_BODY: The email body string.
  • MAIL_SERVER: Name of the email server (SMTP) configured in BI-Publsher.
  • LOCAL_FILE_NAME: Absolute path and filename of the output file.
  • PRINT_COPIES: Number of copies to print.
  • PRINT_ORIENTATION: Page orientation.
  • PRINT_RANGE: Page range to print.
  • PRINT_SIDE: Enable two-sided printing. This setting will be ignored if the target printer does not support two-sided printing
  • PRINT_TRAY: The tray number. If you do not specify this option, the default media of the target printer will be used. It will be ignored if the target printer doesn’t support the media option.
  • PRINTER_NAME: Printer name on the BI-Publisher host to send the documents to.
  • WEBDAV_AUTH_TYPE: The authentication type.
  • WEBDAV_USER: The WebDAV username.
  • WEBDAV_PASSWORD: The WebDAV user password.
  • WEBDAV_FILE_NAME: The remote filename.
  • WEBDAV_SERVER: The WebDAV server name.

After setting the properties BIP_USER & BIP_PASSWORD I was able to run the BI-Report:3