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:
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
If you’ve already upgrated to the latest Forms version (currently 184.108.40.206) 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.
Figure 1: Compilation error
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:
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;
Package body Test is
Procedure p1 is
fetch c1 into master_rec;
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.
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.
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:
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) in
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.
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:
- Open up formsweb.cfg located in %DOMAIN_HOME%\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_12.2.1\config.
- Within your config section(s) for PITSS.CON, add the following parameters inside it:
- Save and close the file.
- Go to %ORACLE_HOME%\forms\java and open up extensions.jnlp in a text editor (make a backup of this file first).
- Look for <!– <jar href=”jacob.jar”/ –>. Uncomment this line. It should look like this: <jar href=”jacob.jar”/>
- NOTE: This fixes a Forms startup issue when using Java Web Start. Source: Oracle Support note 2083540.1
- 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):
- <jar href=”/forms/PitssJava/pitssicon.jar”/>
- The file should look like this:
- Save and close the file.
- Clear your Java cache on your PC where you plan to launch PITSS.CON.
- 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
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:
“ExitException: Unable to load resource: http://<host>:<HTTPS_PORT>/forms/java/extensions.jnlp”
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:
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
For the current project that I am working for, we had the requirement to display information in a table that should consist of Master and Detail rows. I knew that there is a component in ADF to solve this requirement quite easily: af:TreeTable.
So I added my master as a TreeTable component and added the detail as a new level. Under display attributes you can select the attributes that shall be displayed.
After adding the af:treeTable component you have to adjust the components in your page –
for example will the added attributes be displayed in one af:outputText component in one node. To change that add new columns to the tree table by performing a rightclick on it -> insert inside Tree Table -> column. You can choose the values by using writing for example:
Hint: In Jdeveloper version 12.1.3 I faced the issue that there was only an autosuggest for the Master attributes. Just type your detail attributes likewise, seems like this is a bug.
Deleting selected row
When it came to deleting rows I had the same problem as probably many more developers before me: I thought that I can just use the standard delete operation from the bindings. Well that is just working for the master. So I did some research and found following blog entry:
The author discribes how to implement methods in the Bean to extract the RowIterator and the key of the af:TreeTable. With that you can implement a method in the model to delete the any selected row and add it as a client implementation.
After that I asked myself, if that was all or if I would have to implement some more. You have to modify your association to be able to delete Master records and cascade the deletion to the details. For that, open the association and click on relationship. Under behavior you find the option composite association & implement cascade delete. When you select this option, the deletion of a master row will result in deleting all child records.
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.
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.
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.
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.
I’ve been working on my first ADF-project the last couple of months and its time for a first blog post regarding ADF-development. We had the requirement to export data from the new developed ADF-Application to Excel. The standard Excel Export functionality was not sufficient, since also the chosen search criteria and other values should be exported, too.
For that purpose we used the docx4j project, with which the manipulation of excel, word and powerpoint files is possible. To export the data from the view objects to the java class that is responsible for creating the excel, the view object class and the view row class was created on view object level. In the view row class we used following code to export the data of the view object:
In the beginning the view object had a Master-Detail-Relationship. When testing the export with a huge amount of data we ran into performance issues. We found out, that the relation was the cause of the bad performance and merged the different view objects into one view object – with that change the performance increased a lot. It seems that ADF evaluates all details and concatenates the resulting XML – and that takes time.
So when you have the requirement to export a lot of data and the standard ADF functionality is not enough, keep in mind that the XML-export could cause performance issues due to a Master-Detail relationship.
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.