Wednesday May 21, 2014

WebCenter Portal .8: Extending portal functionality with ADF Taskflows

This post describes how to extend your portal application functionality using ADF Taskflow.[Read More]

Tuesday May 13, 2014

How to: Create a Custom Component to build a new Content Server page and modify the System Menu

The Oracle Content Server provides a framework to create and/or modify functionality through components. Almost everything within the Content Server can be customized using components right from the user interfaces like the checkin screens, to the core content server functionality (involves Java programming).

The best way to create and modify components is to use the Component Wizard utility which is shipped along with the content server. The Component Wizard provides all the tools and resources required to create components as well as bundle them for deployment to different content servers. You may also use Mozilla Firefox with the Web Developer extension, for creating/modifying user interfaces as it is a wonderful tool to check your JavaScripts and CSS. Although, components can be created without the Wizard, I would highly recommend it as it makes the life of the developer easy.

In this post, I will demonstrate how to add a new Navigation Menu item to the content server. The new menu item will display a new content server page that will execute a service to run a query to fetch the list of content types available within the Content Server. After creating and installing the custom component, the Content Server will show additional menus for the new page created (as shown in the screenshot below).

Create a Resource - HTML Include/String to add the new Menu Item

  1. Start the Component Wizard. On the Component List dialog, click on the Add... button.

  2. Name the new component as SampleComponent01 and keep the rest of the values as is.

  3. Click Ok to create the component and open it up in the Component Wizard.
  4. Add a new resource to add the new menu item. Under the Resource Definition tab, click on the Add... button.
  5. In the Add resource dialog, select the Resource - HTML Include/String Type. Accept the defaults for all the other fields.

  6. Click Next.
  7. In the Add HTML Resource Include/String dialog, create a Data Include. This is the new way to edit navigation items in 11g. Please note that prior to 11g, the NavBuilder JavaScript API was used to tweak the navigation items which is now deprecated in 11g. The new method takes advantage of a new data table construct in 11g Idoc Script called Dynamic Data Tables. These allow you to create tables of data in Idoc Script and dynamically change them as opposed to the static table definitions. This is useful for data that changes frequently and may be user specific like the navigation menu.
  8. Select the Data Include checkbox.
  9. Click Finish.
  10. This will create the resource file and will open it up in the Text Editor for editing.
  11. Enter the following code and save the file. The file will look like the image below. Alternatively, you can also use the wizard to create these data includes. The section on the right hand side allows you to create these includes. I prefer the Text Editor method as it is faster.
  12. To view the results, enable the component and restart the Content Server. Go to Options -> Enable and restart the Content Server.
  13. Log in to the Content Server to view the changes.

Create a Query to fetch the list of Content Types

  1. Return to the Component Wizard.
  2. Under the Resource Definition tab, click on the Add... button.
  3. In the Add resource dialog, select the Query Type. Accept the defaults for all the other fields.
  4. Click Next.
  5. In the Add Query Table Information click Next.
  6. In the Add Query dialog, enter the Name and the Query. Here you can also specify parameters for the query just like you would create a PreparedStatement in Java. The query should have "?" for the parameters. Specify the parameters in the Parameters section below. The sequence of the parameters is defined by the order in the Parameters list.
  7. Click Finish.
  8. You can add more queries to the file by directly editing the file or using the wizard options on the right hand side.

Create a Template to display the Resultset

  1. In the Component Wizard, create a template. A template is nothing but a page that will display the final results of a service call. We will create the template before we create the service.
  2. Before starting with the template, we need to layout the page. What we are trying to do here is display the content types as a table. Since we will be executing a query, we need a resultset to loop through the results. Let us say that the resultset name is SC01DOCTYPES for now.
  3. Under the Resource Definition tab, click on the Add... button.
  4. In the Add resource dialog, select the Template Type. Accept the defaults for all the other fields.
  5. In the Add Template Table Information dialog, keep the default details as is and click Next.

  6. In the Add IntradocTemplate dialog, enter the details as given below:
  7. Click Finish.
  8. Click on the Launch Editor... button on the right hand side to open up the newly created template and make the changes shown below.
  9. Save the File and close the external editor. Note that we are looping through the resultset name that we had decided earlier.

Create a Service to execute the query and populate the Resultset

  1. In the Component Wizard, create a new service. This service will execute the query created above and will redirect the results to the new template. The results of the query will be populated into a RESULTSET named above, that is SC01DOCTYPES.
  2. Under the Resource Definition tab, click on the Add... button.
  3. In the Add resource dialog, select the Service Type. Accept the defaults for all the other fields.
  4. In the Add Service Table Information dialog, keep the default data and click Next.
  5. In the Add Service dialog, enter the details as shown below.
  6. In the Actions section, click on the Add... button and fill in the details as shown below. Note that the parameter field has the Resultset name. This will allow the service to populate the query results into a resultset with this name.
  7. Click Ok and Ok again to create the Service.
  8. Restart the Content Server.

Use existing HTML includes to build a standard Content Server page

  1. Return to the Component Wizard and select the template from the Resource Definition list.
  2. Select the SC01_CONTENT_TYPES template from the right hand side box and click on the Launch editor... button at the bottom.
  3. This opens up the template in the text editor. Update the code to include the the following.
  4. What we have done here is include a set to predefined system includes that are used to build any content server page.
  5. Restart the content server.
  6. Log in to the Content Server to view the component in action. Just use the link, http://localhost:16200/cs/idcplg?IdcService=SC01_GET_DOCTYPES(make sure that you replace localhost:16200 with the hostname and port of your instance) and view the page to see the results.

Wednesday May 07, 2014

How to: Run Repository Creation Utility (RCU) on Solaris

Many of the Oracle Fusion Middleware components require the existence of schemas in a database prior to installation. These schemas are created and loaded in the database using the Repository Creation Utility (RCU). Repository Creation Utility is a graphical and CLI-based tool used to create and manage Oracle Fusion Middleware database schemas.

At this time, RCU is available for Windows and Linux platforms only.

If you want to run RCU on Solaris, edit the RCU executable, <RCU_HOME>/bin/rcu, and make the following changes:
  • Look for the “#Platform Checking” section, and comment out the "exit" statement
  • Look for the line which specifies the JRE_DIR and update it to point to a Solaris JRE or JDK
After making these changes, set the SQLPLUS_HOME variable to point to any ORACLE_HOME and export it before running RCU.

Now you will be able to run RCU on Solaris and create the database objects for Oracle Fusion Middleware.

NOTE: Please note that these instructions should be used for development and testing purposes only, as such it is unsupported and should not be used on production environments.

Tuesday May 06, 2014

Timeout error starting OHS with OAM WebGates on Oracle Solaris (SPARC)

Oracle Access Manager provides single sign-on (SSO), authentication, authorization, and other services to registered agents (in any combination) protecting WebCenter resources. A Web server, Application Server, or any third-party application must be protected by a WebGate or mod_osso instance that is registered with Oracle Access Manager as an agent to enforce policies. The agent acts as a filter for HTTP requests.

This document relates to the following versions of the products:

  • Oracle Web Tier Utilities:
  • OAM WebGates for OHS:

When you try to install and configure Oracle Web Tier Utilities with Oracle OAM WebGates for OHS on Oracle SuperCluster (or Solaris SPARC), the installation and initial configuration may go fine in the beginning. However, once you start putting in your directives for OAM protected resources, you may notice that the OHS component does not start up as it used to.

The opmnctl startall and opmnctl stopall commands take longer than usual with the following error messages. You may also notice that the OHS and OPMN log files do not contain much information.

  user1@hostname1:~$ /u01/oracle/ohs_inst/ohs_server02/bin/opmnctl startall

  opmnctl startall: starting opmn and all managed processes...


  opmn id=hostname1:6701

  Response: 0 of 1 processes started.

  ias-instance id=ohs_server02






  --> Process (index=1,uid=118965811,pid=13118)

  time out while waiting for a managed process to start



The culprit is the webgate.conf include in the httpd.conf file and removing it will resolve the issue. However, now you cannot use OAM for SSO.

You may want to try out the steps in MOS Note 1614464.1 to edit the file; but this may not resolve the issue. I was able to start the OHS server after modifying the file, but got a blank (empty) response when I tried to access the application URLs. I would suggest that you read through the rest of the blog and try the solution below.

The fix to this problem is to add the following entry, where IP_Address is the IP address of the local machine, in /etc/hosts on which Oracle HTTP Server is being installed:

IP_ADDRESS stafas12

Yes, you need to put in this value which may be entirely unrelated to you network configuration into the /etc/hosts file to fix the issue.

You can refer to page 57 in the Oracle Fusion Application Release Notes 11.1.7 in MOS Note 1582125.1 for more details. This document also contains the list of other known issues and their resolutions.


Welcome to my blog. I use this site to share my experience as well as tips and tricks on Oracle Fusion Middleware products.



May 2014 »