OIM API to Load request Data


  1. package com.oimacademy.NeedEvaluate;
  2. import com.oimacademy.connection.Platform;
  3. import oracle.iam.request.api.RequestService;
  4. import oracle.iam.request.exception.NoRequestPermissionException;
  5. import oracle.iam.request.exception.RequestServiceException;
  6. import oracle.iam.request.vo.Request;
  7. public class RequestLoadAPI {
  8.  public static void main(String[] args) throws RequestServiceException, NoRequestPermissionException {
  9.   RequestService srv1 = Platform.getService(RequestService.class); 
  10.         long start = System.currentTimeMillis(); 
  11.         Request request =srv1.getBasicRequestData("1"); 
  12.         request.getTargetEntities();
  13.         System.out.println(request.getTargetEntities().size());
  14.         System.out.println("Operation took: " + (System.currentTimeMillis() - start) + " miliseconds"); 
  15.  }
  16. }

1 comment:

  1. When i execute above code i got following error,

    javax.ejb.EJBException: failed to unmarshal interface oracle.iam.request.vo.Request; nested exception is:
    java.io.InvalidClassException: org.eclipse.persistence.indirection.IndirectList; local class incompatible: stream classdesc serialVersionUID = 4038061360325736360, local class serialVersionUID = 2384809430150901168; nested exception is: java.io.InvalidClassException: org.eclipse.persistence.indirection.IndirectList; local class incompatible: stream classdesc serialVersionUID = 4038061360325736360, local class serialVersionUID = 2384809430150901168
    java.io.InvalidClassException: org.eclipse.persistence.indirection.IndirectList; local class incompatible: stream classdesc serialVersionUID = 4038061360325736360, local class serialVersionUID = 2384809430150901168

    Can u tell me why this error get appear?

    ReplyDelete