Loading...

Follow Oracle Technologies – Cedric Leruth on Feedspot

Continue with Google
Continue with Facebook
or

Valid

There are multiple reasons to want your JDeveloper 11g/12c installation to connect to an HTTPS URL. You could, for example, need an application you’re developing to connect to a web service over SSL or configure a Maven install that connect to an HTTPS nexus URL.

I you try to do so with the default installation the following error will occur:

sun.security.validator.ValidatorException: PKIX path building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find validcertification path to requested target

To fix this, you’ll first need to retreive the certificate .crt file from the SSL URL. You can either ask for it or try and retreive it from your browser URL.

Retrieve SSL certificate from URL
  • Navigate to your HTTPS URL in your favorite web browser
  • Click on the padlock next to the URL in your web browser
  • Click the certificate button
  • Navigate to the detail tab
  • Click on copy to file and extract a .crt file
Add SSL certificate to JDeveloper truststore

Once you have the certificate .crt file, you’ll need to add it to the JDeveloper truststore for JDeveloper to trust the HTTPS URL. Here is how to do it :

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

The following error can occur when deploying an Oracle ADF to a newly installed weblogic 12c or 11g server :

Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error Error: Unresolved Webapp Library references for "WebAppModule(YOUR_APPLICATION:YOUR_APPLICATION.war)", defined in weblogic.xml [Extension-Name: adf.oracle.domain.webapp, exact-match: false], [Extension-Name: jstl, Specification-Version: 1.2, exact-match: false], [Extension-Name: jsf, Specification-Version: 1.2, exact-match: false]

Most of the times this error is simply occurring because your WebLogic server wasn’t installed with the Oracle ADF Runtime libraries.

To fix this, install the following on top of your fresh WebLogic server installation: https://oracle-base.com/articles/12c/weblogic-12c-adf-application-development-runtime-installation-on-oracle-linux

Feel free to comment if you encountered another cause for this issue.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

If you’ve read my others Oracle ADF how-to article, you know that I always highly recommend using the JSFUtils and ADFUtils open source class for ADF. Those are a must have for any ADF project and will save you hours of work.

JSFUtils and ADFUtils are two utility java class made by 3 ADF heroes Duncan Mills, Steve Muench and Ric Smith. You can easily find those using your favorite search engine.

The function I use the most from those is the resolveExpression that allow the ADF developer to get the value of an ADF binding directly from the view page without having to implement a complex java code to query the View Object again and iterate through rows.

Here is a simple example on how to use the JSFUtils resolveExpression to retrieve the value of an ADF binding directly from the view page El Expression:

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

“you’ll often have a requirement to customize it by adding a specific user instruction in a tooltip(shortDesc) or placeHolder(watermark) in the ADF table column filter header”

From my experience, the Oracle ADF Framework is mainly used by the companies owning Oracle ERP to display custom data table and forms.

This is why the most used component in the ADF JSF library is the RichTable. To filter the value displayed in those table, the developer can either used a view criteria query form or activate the column filters.

Activating the column filter will display an input component on top of the Rich table column allowing the user to filter the table on a specific column value.

While the filter input component is usable out of the box, you’ll often have a requirement to customize it by adding a specific user instruction in a tooltip(shortDesc) or placeHolder(watermark) in the ADF table column filter header. This is done by adding a “filter” facet to you column as in the following example :

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

It’s pretty common to have to convert an org.apache.myfaces.trinidad.model.UploadedFile to a java.io.File when working with an ADF <af:inputFile>.

Working with a java.io.File being the only way to retrieve values from a CSV.

Here is a simple code snippet to do so :

View the code on Gist.


Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

If you read yesterday article, https://cedricleruth.com/how-to-get-current-column-value-of-selected-richtable-row-from-iterator-in-adf/ , you now know have to retrieve a column value from a table selected rows inside an Oracle ADF Java Bean.

While this is useful when you need to get the current column value on a button click, you may as well need to update it with a new value.

Here is how to set a Table selected row attribute value programmatically in an Oracle ADF Java Bean:

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

One often has to use JDeveloper when working on Oracle Technology.
So you’ll be surprised to discover that while your development computers may allow up to 8Gb or 16Gb Ram; JDeveloper by default will only use 512Mb!
And the same applies to your integrated WebLogic environment.

JDeveloper before increase will only use 512Mb memory!

I’ll highly advise to do yourself a favor and enhance your JDeveloper performance with a recent JDK and all the memor your computer can give.
Your sanity and development productivity will skyrocket.

To do so, you’ll need to update those three files as follow :

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

One of the best ways to enhance your ADF applications UI is to add some excellent Javascript library and to call them in your Java Bean‘s action.

For instance, I often like to implement the izitoast javascript open source library. It’s a great tool to display users notification in nice looking side popups.

You can use the following functions if you need to execute your Javascript during a user action in your ADF java bean (validating a form, clicking a button) :

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Duplicating a table row is often one of the first requirement added on big customer tables in an Oracle ADF application.

To do so, add a column at the start of your row with a “duplicate” button containing an action listener as follow:

... actionListener="#{YOUR_SCOPE.YOUR_BEAN.duplicateRowLine}" ...

In this Action Event, you will need to copy each attribute into a new row and add the row into the ViewObject.

Here is how to do so :

View the code on Gist.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

This error often occurs when you are deploying your Oracle ADF application on WebLogic for the first time. (Or when you add a new Application Module)

To fix it you need to ensure that your Datasource Name is the same in your Model, Controller, and Weblogic console :

View the code on Gist.

Note: This is case sensitive

Read Full Article

Read for later

Articles marked as Favorite are saved for later viewing.
close
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview