Thursday, May 23, 2013

Error in Approval Details / SOA Worklist App Pages after adding a Catalog Custom UDF in OIM 11g R2

We have recently added a Custom Catalog UDF in OIM 11g R2 after which we are seeing an error on page whenever we access Approval Details or SOA Worklist App as shown in the screen shot below.


The stack trace in the OIM diagnostic log is as shown below:


ADF: Adding the following JSF error message: Localized message not available.  Error returned is: null[[
java.lang.NullPointerException
        at oracle.iam.ui.catalog.model.am.CatalogAMImpl.isAllCartItemsReadyToSubmit(CatalogAMImpl.java:252)
        at sun.reflect.GeneratedMethodAccessor1655.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:657)
        at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2143)
        at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3114)
        at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
        at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)
        at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)


In order to fix this issue we had to add keys in the CommonModelBundle.properties and CommonModelBundle_en.propertie files in adflibCommonModel.jar (adflibCommonModel.jar\oracle\iam\ui\common\model directory) file inside oracle.iam.ui.view.war (oracle.iam.ui.view.war\WEB-INF\lib directory) file.

For example if the UDF you have added is CustomCatalogUDF then the entries in the property file should look like

oracle.iam.ui.common.model.catalog.entity.CatalogItemsEO.customCatalogUDF_LABEL=CustomCatalogUDF
oracle.iam.ui.common.model.catalog.entity.CartItemsEO.customCatalogUDF_LABEL=CustomCatalogUDF

Copy the updated war file $OIM_ORACLE_HOME/server/apps directory stop OIM managed server, remove tmp and cache folders under the manager server directory and then restart the managed server.

Access the Approval Details / SOA Worklist APP pages and you should not see this error anymore.

Note: We have also modified the adflibCommonModel.jar file inside oracle.iam.ui.model.ear (oracle.iam.ui.model.ear\APP-INF\lib directory) file to add these keys in keys in the CommonModelBundle.properties and CommonModelBundle_en.propertie files. But modifying the view war is the step that fixed the issue for us.


Friday, May 3, 2013

DBAT CONNECTOR INSTALLATION AND SETUP


Create a lookup for User Status:
1.    Login to Design Console. 
2.    Expand Administration and double click on Lookup Definition.
3.    Enter “Lookup.DBAT.User.Status” for Code and “DBAT” for Group and then Click Save.  
4.    Add two new Lookup Codes and click Save as highlighted.
Note: Creating a lookup is not a mandatory step. It is used only if you are provisioning user status to the target database table.

Installing DBAT Connector: 
1.    Copy the Database_App_Tables_9.1.0.5.0 directory into $ORACLE_OIM_HOME/server/ConnectorDefaultDirectory folder
Note: replace $ORACLE_OIM_HOME with the OIM HOME directory.
2.    Login to OIM System Administration Console.
3.    Click on Manage Connector link.
4.    Click on Install.
5.    Select DatabaseApplicationTables 9.1.0.5.0 from the Connector List and Click Load.
6.    Click Continue.
7.    Click Exit on the Confirmation of Successful Connector Installation Page.

Configure Generic Technology Connector:
1.    Login to OIM System Administration Console.
2.    Click on the Generic Connector link.
3.    Click on Create.
4.    Enter Name as “DBAT_USR_CONNECTOR” or any name you want unselect Reconciliation check box and select Provisioning check box. Select “Database Application Tables Provisioning” for both Transport Provider and Format Provider under Provisioning and then click Continue.
5.    Enter the details of the target database, target table, Unique column, Status Column and Status lookup as "Lookup.DBAT.User.Status" created earlier and click next.
6.    Map the OIM attributes and Click Close.
7.    Enter “DBATUSR” for OIM – Account and click Continue.
8.    Verify the Connector information and click Save.

Run catalog sync scheduler job.
You can create an Access Policy to provision this resource automatically. For testing this you can manually add the DBAT_USR_CONNECTOR_GTC resource manually.