0 Replies Latest reply on Jun 22, 2016 6:05 AM by 984902

    Submit a concurrent program within a Java concurrent program

    984902

      Hi,

       

      I am trying to submit a concurrent program (Active Users) from my custom Java concurrent program:

       

      Below is my code piece:

       

      public class JcpxPsDataInbound implements JavaConcurrentProgram {
          
          OutFile out;    
          LogFile log;
          public void runProgram(CpContext ctx) {
      ...
      
      

       

      try {
                  out = ctx.getOutFile();
                  log = ctx.getLogFile();
      
        ConcurrentRequest cr = new ConcurrentRequest(oracleConn);
        int requestId = cr.submitRequest("FND", "FNDSCURS", "Active Users", null, false, null);
        log.writeln("Program submitted.",0);
        } catch (Exception e) {
        log.writeln("Error",0);
        e.printStackTrace();
        ctx.getReqCompletion().setCompletion(ReqCompletion.ERROR, "Completed.");
        }
      

       

      I am getting below null pointer exception:

       

      Error

      java.lang.NullPointerException

      at oracle.apps.fnd.cp.request.ConcurrentRequest.submitRequest(ConcurrentRequest.java:109)

      at jcpx.oracle.apps.jcpx.JcpxPsDataInbound.runProgram(JcpxPsDataInbound.java:137)

      at oracle.apps.fnd.cp.request.Run.main(Run.java:157)

       

      Please help if I am missing anything here.