Tuesday, September 15, 2020

Migrating the view layer

Convert project to Facelets


1. Open the application which you would like to migrate

2. Select the view controller project and right click, from the menu select Convert to Facelets

3. Select Change Page Extensions and click preview in log

4.  


5. If everything goes well all the files would be converted into facelets and success message should be displayed.

6. Go to view controller and you should notice all the .jspx files are converted into .jsf files and .jsff stays the same.

7. This converter changes the tags in the header of the pages and fragments, adapts the libraries in the ViewController project.

8. New headline in a page based on Facelets:

<ui:composition xmlns:af=http://xmlns.oracle.com/adf/faces/rich xmlns:f="http://java.sun.com/jsf/core" xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces" xmlns:ui="http://java.sun.com/jsf/facelets">


Old headline in a page based in JSP:


<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:f="http://java.sun.com/jsf/core" xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces" xmlns


Properties File

You have to take care about the used resource bundles inside a page. 

After conversion sometimes the entry of the variable which point to the correct resource bundle file is missing or the resource bundle is not recognized (highlighted with yellow warning in jdeveloper). 

If the resource bundle entry is available and the warning is issued, then delete the <c:set> entry of the resource bundle at the top of the page fragment.

You have to add one label of a component via the “Select Resource” wizard – afterward the entry is available again.

A new entry is added with the resource bundle and the values from properties file should be recognised by jdeveloper.

Migration ADF 11g to 12c - Issues and Possible solutions

 One of the clients I am working with had to migrate to ADF 12c from ADF 11g.  The migration process was not straight forward as expected. We faced many issues and had to apply several workarounds to get the application working.

I will be updating this blog with the process, issues faced and the workarounds used to overcome those issues.

Please find below the an overview of the issues.

1. Deprecated Classes

2. Issues with Templates 

3. Facelets Conversions

4. Deprecated Components

5. LDAP connection fails with "javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure"

6. Logout method deprecated

7. Filter Criteria deprecated

8. View objects broken – This one is intermittent, not all of them are broken.

9. Transient Expressions

10. java.lang.IllegalArgumentException: Script text to compile cannot be null!

11. invokeAction

For the ease of understanding I have divided the migration process into two sections
  • Migrating the View Layer
  • Migrating the Model Layer