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.


No comments: