2 Replies Latest reply: May 23, 2012 8:18 AM by user514507 RSS

    Issue with Custom transformation provider for DBAT GTC connector in OIM

    user514507
      I have requirement to generate a dynamic user ID during trusted reconciliation. I am trying to create a custom transformation provider for user ID generation. I have followed all the following steps:

      1. Installed Database application Tables connector
      2. Created and Configured all the connector parameters.
      3. Created a new customized transformation provider. Following is the list of files deployed for this -

           a) Deployed the provider XML
           <?xml version='1.0' encoding='UTF-8'?>
           <Provider>
           <Transformation>
                <TransformationProvider class="com.custom.provider.UserNameTransformationProvider" name="UserNameTransformationProvider">
                <Configuration>
                     <Parameter type="Runtime" datatype="String" required="YES" encrypted="NO" name="INPUT_FIRST_NAME"/>
                     <Parameter type="Runtime" datatype="String" required="YES" encrypted="NO" name="INPUT_LAST_NAME"/>
                     <Response code="REMQUOTES_INPUTSTR_MISSING" description="Input String is Missing"/>
                </Configuration>
                </TransformationProvider>
           </Transformation>
           </Provider>

           b) Created a class that implements com.thortech.xl.gc.spi.TransformationProvider
           
           public class UserNameTransformationProvider implements TransformationProvider {
                     public String transformData(Hashtable input, Hashtable utils)
                               throws ProviderException {
                          StringBuffer userID = new StringBuffer();
                          try {        
                               System.out.println("In UserNameTransformationProvider *********");
                               userID.append((String)input.get("INPUT_FIRST_NAME"));
                               userID.append(" ");
                               userID.append((String)input.get("INPUT_LAST_NAME"));

                               return userID.toString();
                          } catch (Exception ex) {
                          ex.printStackTrace();
                          }
                          
                     }
                }

      *     c)Deployed resource bundles with name UserNameTransformationProvider.properties and UserNameTransformationProvider_en.properties*
                ###### Transformation Provider ######
                gc.provider.TransformationProvider.UserNameTransformationProvider=UserNameTransformationProvider
                gc.TransformationProvider.UserNameTransformationProvider.INPUT_FIRST_NAME.Label=INPUT_FIRST_NAME
                gc.TransformationProvider.UserNameTransformationProvider.INPUT_FIRST_NAME.Description=Enter First Name
                gc.TransformationProvider.UserNameTransformationProvider.INPUT_LAST_NAME.Label=INPUT_LAST_NAME
                gc.TransformationProvider.UserNameTransformationProvider.INPUT_LAST_NAME.Description=Enter Last Name
                GC.GCPROV.TransformationProvider.UserNameTransformationProvider.REMQUOTES_INPUTSTR_MISSING=Input String Missing
                GC.GCPROV.TransformationProvider.UserNameTransformationProvider.REMQUOTES_INPUTSTR_MISSING.description=The input string is missing.
           I have also appended these resource bundles to $MW_HOME/Oracle_IDM1/server/*customResources/customResources_en.properties* as mentioned in [ID 1368982.1].

      In connector configuration, When creating mapping for USERID attribute I can see the new custom transformation provider.
      The custom transformation provider is visible at this point, are able to choose it but when we click the "Continue" button in order to provide Mapping information , a exception is displayed in OIM server log and we are not able to provide parameters to the Transformation. Am I missing anything. Please suggest.

      Following is the error in OIM log:
      ***************************************************************************************
      +<May 21, 2012 9:08:26 AM EDT> <Error> <org.apache.struts.tiles.taglib.InsertTag> <BEA-000000> <ServletException in '/gc/ModifyConnectorTransParamsTiles.jsp': null+
      javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
      +     at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:140)+
      +     at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:152)+
      +     at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:764)+
      +     at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:896)+
      +     at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465)+
      +     at jsp_servlet._gc.__genconnectorpopuplayout._jsp__tag2(__genconnectorpopuplayout.java:268)+
      +     at jsp_servlet._gc.__genconnectorpopuplayout._jspService(__genconnectorpopuplayout.java:184)+
      +     at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)+
      +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
      +     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
      +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)+
      +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)+
      +     at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)+
      +     at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)+
      +     at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:164)+
      +     at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:185)+
      +     at sun.reflect.GeneratedMethodAccessor667.invoke(Unknown Source)+
      +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
      +     at java.lang.reflect.Method.invoke(Method.java:597)+
      +     at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:129)+
      +     at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:153)+
      +     at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:765)+
      +     at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:896)+
      +     at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465)+
      +     at jsp_servlet._gc.__modifyconnectortransparams._jsp__tag1(__modifyconnectortransparams.java:150)+
      +     at jsp_servlet._gc.__modifyconnectortransparams._jspService(__modifyconnectortransparams.java:82)+
      +     at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)+
      +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
      +     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
      +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)+
      +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)+
      +     at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)+
      +     at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)+
      +     at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:114)+
      +     at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)+
      +     at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:56)+
      +     at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)+
      +     at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)+
      +     at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)+
      +     at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)+
      +     at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)+
      +     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1914)+
      +     at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:463)+
      +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)+
      +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)+
      +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
      +     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
      +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)+
      +     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at com.thortech.xl.webclient.security.CSRFFilter.doFilter(CSRFFilter.java:78)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:122)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:108)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)+
      +     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)+
      +     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)+
      +     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)+
      +     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)+
      +     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)+
      +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)+
      +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)+
      +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)+
      +     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)+
      +     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)+
      +     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)+
      +     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)+
      +     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)+
      +     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)+
      +     at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)+
      Caused By: java.lang.reflect.InvocationTargetException
      +     at sun.reflect.GeneratedMethodAccessor667.invoke(Unknown Source)+
      +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
      +     at java.lang.reflect.Method.invoke(Method.java:597)+
      +     at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:129)+
      +     at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:153)+
        • 1. Re: Issue with Custom transformation provider for DBAT GTC connector in OIM
          11gA
          There are several issues, that people face while writing Custom Transformation provider. It is always better to handle this situation using a Post process event handler rather than writing Custom Transformation provider in GTC.


          Thanks
          Ak
          • 2. Re: Issue with Custom transformation provider for DBAT GTC connector in OIM
            user514507
            The issue got resolved by changing the following properties from
            gc.TransformationProvider.UserNameTransformationProvider.INPUT_FIRST_NAME.*Label*=INPUT_FIRST_NAME
            gc.TransformationProvider.UserNameTransformationProvider.INPUT_FIRST_NAME.*Description*=Enter First Name
            gc.TransformationProvider.UserNameTransformationProvider.INPUT_LAST_NAME.*Label*=INPUT_LAST_NAME
            gc.TransformationProvider.UserNameTransformationProvider.INPUT_LAST_NAME.*Description*=Enter Last Name

            TO

            TransformationProvider.UserNameTransformationProvider.INPUT_FIRST_NAME.*label*=INPUT_FIRST_NAME
            TransformationProvider.UserNameTransformationProvider.INPUT_FIRST_NAME.*description*=Enter First Name
            TransformationProvider.UserNameTransformationProvider.INPUT_LAST_NAME.*label*=INPUT_LAST_NAME
            TransformationProvider.UserNameTransformationProvider.INPUT_LAST_NAME.*description*=Enter Last Name

            That was a difficult one to find out - 'L' to 'l' was the hitch.

            Thanks,
            NP