6 Replies Latest reply: Jan 4, 2011 10:27 AM by 828440 RSS

    Attestation Issue  -- need help

    Suren.Khatana
      Hi Guys ,

      I am trying to create a attestation process using OIM APi's . First challenge i am facing is that the Java Docs for attestation APi's is so poorly written that
      one cant understand what to pass and what you will get .

      Anyways after hit and trials , this is the way i m creating a attestation process .


      public class AttestationCreation implements Constants {

      private com.thortech.xl.vo.AttestationProcessDefinitionVO attestDefVO = null;

      private AttestationDefinitionOperationsIntf attestDefOper = null;
      private String className = this.getClass().getName();
      private HQLogger logger = new HQLogger(ADAPTER_LOGGER);

      public void createAttestationDefinition(tcDataProvider dataProvider, String userID){

      System.out.println("dataProvider = "+dataProvider);
      System.out.println("userID = "+userID);

      ArrayList userList = new ArrayList();
      ArrayList resourceList = new ArrayList();

      /*User List*/
      userList.add(userID);

      /*Resource Object List*/
      resourceList.add("AD User");


      attestDefVO = new AttestationProcessDefinitionVO();

      System.out.println("attestDefVO == "+attestDefVO);

      try {

      System.out.println("00000000000000000000000");

      attestDefOper = (AttestationDefinitionOperationsIntf) tcUtilityFactory.getUtility(dataProvider,
      "Thor.API.Operations.AttestationDefinitionOperationsIntf");
      System.out.println("11111111111111111111111");

      tcResultSet attestSet = null;


      attestDefVO.setProcessName("DemoProcess1");
      System.out.println("22222222222222222222222");

      attestDefVO.setProcessCode("DemoProcessCode");
      System.out.println("333333333333333333333333");

      attestDefVO.setProcessDescription("DemoProcessDescription");
      System.out.println("444444444444444444444444");

      attestDefVO.setUserScope(userList);
      System.out.println("555555555555555555555555");

      attestDefVO.setResourceScope(resourceList);
      System.out.println("66666666666666666666666");

      attestDefVO.setReviewerFirstName("System");
      attestDefVO.setReviewerLastName("Administrator");
      attestDefVO.setReviewerType("SPECIFIC.REVIEWER");

      System.out.println("7777777777777777777777777");

      attestDefVO.setProcessScheduleFrequency(1);

      attestDefVO.setProcessGracePeriod(1);

      attestDefVO.setProcessStatus("Active");

      attestDefVO.setProcessOwner("1");

      attestDefVO.setProcessStartTime("2010-02-12");

      attestDefOper.createAttestationDefinition(attestDefVO);

      System.out.println("9999999999999999999999999999999999");



      } catch (tcAPIException e) {
      System.out.println("Exception Occurred 1");
      e.printStackTrace();
      } catch (DuplicateAttestationProcessException e) {
      System.out.println("Exception Occurred 2");
      e.printStackTrace();
      } /*catch (tcColumnNotFoundException e) {
      System.out.println("Exception Occurred 3");
      e.printStackTrace();
      }*/





      }

      So , its throwing exception after createAttestationDefinition() is invoked . Below is the exception trace .



      [2/10/10 20:14:42:410 IST] 00000048 SystemOut O Running GENERATEATTESTATIONTASK
      [2/10/10 20:14:42:420 IST] 00000048 SystemOut O Target Class = ca.hq.gia.adapters.AttestationCreation
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O dataProvider *****= com.thortech.xl.dataobj.tcDataBase@1d101d10
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O userID = IAMREQUESTED
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O Array List = IAMREQUESTED
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O attestProcessInfo = {REVIEWERUSERID=XELSYSADM}
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O attestDefVO == com.thortech.xl.vo.AttestationProcessDefinitionVO@4ad44ad4
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O 00000000000000000000000
      [2/10/10 20:14:42:430 IST] 00000048 SystemOut O 11111111111111111111111

      [2/10/10 20:14:42:440 IST] 00000048 SystemOut O 22222222222222222222222
      [2/10/10 20:14:42:440 IST] 00000048 SystemOut O 333333333333333333333333
      [2/10/10 20:14:42:440 IST] 00000048 SystemOut O 444444444444444444444444
      [2/10/10 20:14:42:440 IST] 00000048 SystemOut O 555555555555555555555555
      [2/10/10 20:14:42:440 IST] 00000048 SystemOut O 66666666666666666666666
      [2/10/10 20:14:42:440 IST] 00000048 SystemOut O 7777777777777777777777777
      [2/10/10 20:14:42:510 IST] 00000048 SystemOut O ERROR,10 Feb 2010 20:14:42,470,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: ORA-02291: integrity constraint (XLADM.FK_APD_UGP) violated - parent key not found

      java.sql.SQLException: ORA-02291: integrity constraint (XLADM.FK_APD_UGP) violated - parent key not found

           at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
           at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
           at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3423)
           at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:748)
           at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
           at com.thortech.xl.dataobj.PreparedStatementUtil.executeUpdate(Unknown Source)
           at com.thortech.xl.dataobj.tcTableDataObj.insertImplementation(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
           at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
           at com.thortech.xl.ejb.beansimpl.AttestationDefinitionOperationsBean.createAttestationDefinition(Unknown Source)
           at com.thortech.xl.ejb.beans.AttestationDefinitionOperationsSession.createAttestationDefinition(Unknown Source)
           at com.thortech.xl.ejb.interfaces.EJSLocalStatelessAttestationDefinitionOperations_00e8b6e1.createAttestationDefinition(Unknown Source)
           at Thor.API.Operations.AttestationDefinitionOperationsClient.createAttestationDefinition(Unknown Source)
           at ca.hq.gia.adapters.AttestationCreation.createAttestationDefinition(AttestationCreation.java:108)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:615)
           at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpGENERATEATTESTATIONTASK.GENERATEATTESTATIONTASK(adpGENERATEATTESTATIONTASK.java:102)
           at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpGENERATEATTESTATIONTASK.implementation(adpGENERATEATTESTATIONTASK.java:50)
           at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
           at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
           at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
           at com.thortech.xl.client.events.tcTriggerUserProcesses.insertMileStones(Unknown Source)
           at com.thortech.xl.client.events.tcTriggerUserProcesses.trigger(Unknown Source)
           at com.thortech.xl.client.events.tcUSRTriggerUserProcesses.implementation(Unknown Source)
           at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.eventPostUpdate(Unknown Source)
           at com.thortech.xl.dataobj.tcUSR.eventPostUpdate(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
           at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
           at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUserData(Unknown Source)
           at com.thortech.xl.ejb.beansimpl.tcUserOperationsBean.updateUser(Unknown Source)
           at com.thortech.xl.ejb.beans.tcUserOperationsSession.updateUser(Unknown Source)
           at com.thortech.xl.ejb.interfaces.EJSRemoteStatelesstcUserOperations_8eddc563.updateUser(Unknown Source)
           at com.thortech.xl.ejb.interfaces._tcUserOperations_Stub.updateUser(_tcUserOperations_Stub.java:2240)
           at Thor.API.Operations.tcUserOperationsClient.updateUser(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:615)
           at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
           at java.security.AccessController.doPrivileged(AccessController.java:214)
           at javax.security.auth.Subject.doAs(Subject.java:495)
           at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
           at Thor.API.Security.LoginHandler.websphereLoginSession.runAs(Unknown Source)
           at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
           at $Proxy2.updateUser(Unknown Source)
           at com.thortech.xl.webclient.actions.tcManageUserAction.editUser(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:615)
           at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
           at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
           at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
           at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
           at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
           at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
           at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
           at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
           at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1102)
           at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1037)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
           at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
           at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
           at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
           at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832)
           at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679)
           at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:566)
           at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
           at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
           at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
           at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
           at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
           at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
           at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
           at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
           at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
           at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
           at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
           at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
           at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
           at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
           at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
           at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
      [2/10/10 20:14:42:540 IST] 00000048 SystemOut O ERROR,10 Feb 2010 20:14:42,540,[XELLERATE.SERVER],Class/Method: tcTableDataObj/insertImplementation encounter some problems: {1}
      com.thortech.xl.orb.dataaccess.tcDataAccessException
           at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
           at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
           at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
           at com.thortech.xl.dataobj.PreparedStatementUtil.executeUpdate(Unknown Source)
           at com.thortech.xl.dataobj.tcTableDataObj.insertImplementation(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
           at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
           at com.thortech.xl.ejb.beansimpl.AttestationDefinitionOperationsBean.createAttestationDefinition(Unknown Source)
           at com.thortech.xl.ejb.beans.AttestationDefinitionOperationsSession.createAttestationDefinition(Unknown Source)
           at com.thortech.xl.ejb.interfaces.EJSLocalStatelessAttestationDefinitionOperations_00e8b6e1.createAttestationDefinition(Unknown Source)
           at Thor.API.Operations.AttestationDefinitionOperationsClient.createAttestationDefinition(Unknown Source)
           at ca.hq.gia.adapters.AttestationCreation.createAttestationDefinition(AttestationCreation.java:108)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:615)
           at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpGENERATEATTESTATIONTASK.GENERATEATTESTATIONTASK(adpGENERATEATTESTATIONTASK.java:102)
           at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpGENERATEATTESTATIONTASK.implementation(adpGENERATEATTESTATIONTASK.java:50)
           at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
           at com.thortech.xl.dataobj.tcScheduleItem.runMilestoneEvent(Unknown Source)
           at com.thortech.xl.dataobj.tcScheduleItem.eventPostInsert(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
           at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
           at com.thortech.xl.client.events.tcTriggerUserProcesses.insertMileStones(Unknown Source)
           at com.thortech.xl.client.events.tcTriggerUserProcesses.trigger(Unknown Source)
           at com.thortech.xl.client.events.tcUSRTriggerUserProcesses.implementation(Unknown Sou



      [2/10/10 20:14:35:530 IST] 00000048 SystemErr R MessageDateFieldBean, localName='messageDateField': Illegal character (space) in "name" attribute
      [2/10/10 20:14:35:530 IST] 00000048 SystemErr R MessageDateFieldBean, localName='messageDateField': Illegal character (space) in "name" attribute
      [2/10/10 20:14:35:530 IST] 00000048 SystemErr R MessageDateFieldBean, localName='messageDateField': Illegal character (space) in "name" attribute
      [2/10/10 20:14:35:540 IST] 00000048 SystemErr R MessageDateFieldBean, localName='messageDateField': Illegal character (space) in "name" attribute
      [2/10/10 20:14:42:570 IST] 00000048 SystemErr R Thor.API.Exceptions.tcAPIException: Insert failed.
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at com.thortech.xl.ejb.beansimpl.AttestationDefinitionOperationsBean.createAttestationDefinition(Unknown Source)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at com.thortech.xl.ejb.beans.AttestationDefinitionOperationsSession.createAttestationDefinition(Unknown Source)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at com.thortech.xl.ejb.interfaces.EJSLocalStatelessAttestationDefinitionOperations_00e8b6e1.createAttestationDefinition(Unknown Source)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at Thor.API.Operations.AttestationDefinitionOperationsClient.createAttestationDefinition(Unknown Source)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at ca.hq.gia.adapters.AttestationCreation.createAttestationDefinition(AttestationCreation.java:108)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at java.lang.reflect.Method.invoke(Method.java:615)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpGENERATEATTESTATIONTASK.GENERATEATTESTATIONTASK(adpGENERATEATTESTATIONTASK.java:102)
      [2/10/10 20:14:42:600 IST] 00000048 SystemErr R      at com.thortech.xl.adapterGlue.ScheduleItemEvents.adpGENERATEATTESTATIONTASK.implementation(adpGENERATEATTESTATIONTASK.java:50)
      [2/10