Tuesday, March 29, 2016

Programmatic PPR af:outputText refresh issues - no PPR-capable ID found for elements of: RichOutputText [UIXFacesBeanImpl, id=ot05]

We sometimes see the below issue on doing a programmatic refresh of af:outputText Component

The error message

PprResponseWriter$PPRTag> <finish> no PPR-capable ID found for elements of: RichOutputText[UIXFacesBeanImpl, id=ot05]

Why do we see this issue?

By default, the framework does not generate the ids for the components unless and absolutely required to optimize the page performance but we need id to be present at the client side to do PPR and thus we see the issue in doing a programmatic PPR of af:outputText. This issue can be solved in 2 methods described below.

Solution 1

Set the clientComponent="true" for the output text, sample is as below

              <af:outputText value="Test" id="ot5" styleClass="share-error"
                             binding="#{backingBeanScope.MB.message}"
                             clientComponent="true"/>

Refer to <af:outputText> documentation for more details on the clientComponent attribute

Solution 2

Add the following in web.xml

<context-param>
    <param-name>
      oracle.adf.view.rich.SUPPRESS_IDS
    </param-name>
    <param-value>auto</param-value>
</context-param>

Tuesday, March 22, 2016

oracle.jsp.parse.JavaCodeException - Root cause and solution

Sometimes we see the following exception after doing a webcenter portal deployment

Error details

OracleJSP error: oracle.jsp.parse.JavaCodeException: Line # 13, oracle.jsp.parse.JspParseTagScriptlet@5cefd96
Error: Java code in jsp source files is not allowed in ojsp.next mode.

Solution

Make sure that the web.xml in the Deployer project is empty, it should not have any adf library references.

It should looks as below.

<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
</web-app>

Do we need to restart the managed server after webcenter deployments?

Yes, we need to restart the managed server after Webcenter deployments

Many developers are wondered why the changes made to the Webcenter are not dynamically obtain the changes?

An excerpt from the Webcenter portal documentation is as below

Most WebCenter application configuration changes that you make, through Fusion Middleware Control or using WLST, are not dynamic; you must restart the managed server on which the application is deployed for your changes to take effect. For example, when you add or modify connection details for WebCenter services such as Announcements, Discussions, Documents, Mail, and so on, you must restart the application's managed server.
There are several exceptions; portlet producer and external application registration is dynamic. Any new portlet producers and external applications that you register are immediately available in your WebCenter application and any changes that you make to existing connections take effect immediately too.

Wednesday, March 16, 2016

Sample code to get the user profile information in the WebCenter Portal

The sample code to get the currently logged in user profile information is as below


import oracle.webcenter.peopleconnections.profile.WCUserProfile;

String currentUserId = ADFContext.getCurrent().getSecurityContext().getUserName();
WCUserProfile currentProfile = ProfileFactory.getProfileManager().getProfile(currentUserId);
currentProfile.getDisplayName();


The complete documentation for WCUserProfile is here

Some other supported methods are as below

  1. currentProfile.getBusinessCity()
  2. currentProfile.getBusinessCountry()
  3. currentProfile.getBusinessEmail()
  4. currentProfile.getBusinessFax()
  5. currentProfile.getBusinessLocationMapURL()
  6. currentProfile.getBusinessMobile()
  7. currentProfile.getBusinessPOBox()
  8. currentProfile.getBusinessPager()
  9. currentProfile.getBusinessPhone()
  10. currentProfile.getBusinessPostalCode()
  11. currentProfile.getBusinessState()
  12. currentProfile.getBusinessStreet()
  13. currentProfile.getDateofBirth()
  14. currentProfile.getDateofHire()
  15. currentProfile.getDefaultGroup()
  16. currentProfile.getDepartment()
  17. currentProfile.getDescription()
  18. currentProfile.getDisplayName()
  19. currentProfile.getEmployeeNumber()
  20. currentProfile.getEmployeeType()
  21. currentProfile.getExpertise()
  22. currentProfile.getFirstName()
  23. currentProfile.getGuid()
  24. currentProfile.getHomeAddress()
  25. currentProfile.getHomePhone()
  26. currentProfile.getID()
  27. currentProfile.getInitials()
  28. currentProfile.getLastName()
  29. currentProfile.getLocalizedDisplayNames()
  30. currentProfile.getMaidenName()
  31. currentProfile.getManager()
  32. currentProfile.getManagerDisplayName()
  33. currentProfile.getMiddleName()
  34. currentProfile.getName()
  35. currentProfile.getNameSuffix()
  36. currentProfile.getOrganization()
  37. currentProfile.getOrganizationalUnit()
  38. currentProfile.getOriginalPhoto()
  39. currentProfile.getPersonalStatusNote()
  40. currentProfile.getPhoto(WCUserProfile.PhotoSize size)
  41. currentProfile.getPhotoUID()
  42. currentProfile.getPreferredLanguage()
  43. currentProfile.getReporteeDisplayNames()
  44. currentProfile.getReporteeList()
  45. currentProfile.getReporteeProfiles()
  46. currentProfile.getReportees()
  47. currentProfile.getTimeZone()
  48. currentProfile.getTimeZoneAsObject()
  49. currentProfile.getTitle()
  50. currentProfile.getUpdateDate()
  51. currentProfile.getUserName()
  52. currentProfile.getWirelessAcctNumber()

Tuesday, March 15, 2016

Tuesday, February 9, 2016

Fix for Oracle 12c database installation error: File not found C:\app\oracle12c\product\12.1.0\dbhome_2\ctx\admin\dr0ulib.sql.sbs


Sometimes we see the below error on installation of the Oracle 12c Database

File not found C:\app\oracle12c\product\12.1.0\dbhome_2\ctx\admin\dr0ulib.sql.sbs

Solution for the issue

1. Unzip the database zip files into one single directory (C:\DBSetup) say as below

  • winx64_12102_database_1of2
  • winx64_12102_database_2of2

2. Now copy the setup folder in 2nd folder to first older (If the windows asks for merging, do it)

3. Then abort the current installation and start fresh again. It should be done.


Tuesday, December 1, 2015

Code to read the adfc-config.xml parameters from managed bean in ADF

The sample code to  read the adfc-config.xml parameters from managed bean in ADF is as follows

# Get the adf context object and get the config object from there
ADFContext adfContext = ADFContext.getCurrent();
ADFConfig adfConfig = adfContext.getADFConfig();

# Read the details of adfc-config.xml in the form of a MAP
Map configurationMap = adfConfig.getConfigObject("http://xmlns.oracle.com/adfm/config");
Long rowLimit =(Long)configurationMap.get("jbo.row.limit");  

Tuesday, March 17, 2015

ADF JavaScript Partitioning for better performance


What is JS Partitioning?
By default ADF framework downloads a bunch of Java Script libraries on each page load and we should consider to bucket the JS library calls to reduce the number of calls made. By default all ADF pages need the boot.js and core.js files to operate.

Additionally, JS files are downloaded either combined as partitions or one for each component (if no partition is defined).

Why should we implement it?
ADF is smart enough to download only the javaScripts belonging to the components rendered on the page. If individual JS files are downloaded, however, then there will be lot of network traffic per page, slowing down the page performance. The solution is to use JavaScript Partitions.

How to implement it?
The exact procedure is to create the java script partitions xml file with the name adf-js-partitions.xml file in WEB-INF and configure the partitions as needed. More documentation can be found here

Monday, February 2, 2015

Change the Oracle SOA BPEL properties at runtime

Often it is useful to be able to set properties influencing behavior of a BPEL process after it has been deployed. Of course, a danger with changing settings at runtime is that they also need to be applied to the development branch in order to avoid the changes to be overwritten at redeployment of a process. Oracle provides several mechanisms of changing settings of a BPEL process at runtime.

Implementation details can be found here

How to obtain the list of exposed SOAP HTTP endpoints in OSB