title: Job not found in JobRegistry
body: <p>I am trying to stop the spring batch execution. I have tried</p>
  
  <pre><code>jobExecution.stop();
  jobRepository.update(jobExecution);
  </code></pre>
  
  <p>has no effect on the job.</p>
  
  <p>When i tried </p>
  
  <pre><code>jobOperator.stop(JOB_EXECUTION_ID);
  </code></pre>
  
  <p>i am getting NoSuchJobException. I am new to Spring Batch. Can anyone explain why i am getting NoSuchJobException?</p>
  
  <p>After some debugging, I have found that Job is not found in JobRegistry. JobExplorer and JobRepository are able to find the job. Is there any specific configuration required for JobRegistry.</p>
  
  <pre><code>07:22:27.625  WARN o.s.b.c.l.s.SimpleJobOperator            : Cannot find Job object in the job registry. StoppableTasklet#stop() will not be called org.springframework.batch.core.launch.NoSuchJobException: No job configuration with the name [wf-demo-1552486941361] was registered
      at org.springframework.batch.core.configuration.support.MapJobRegistry.getJob(MapJobRegistry.java:66) ~[spring-batch-core-4.0.1.RELEASE.jar:4.0.1.RELEASE]
      at org.springframework.batch.core.launch.support.SimpleJobOperator.stop(SimpleJobOperator.java:403) ~[spring-batch-core-4.0.1.RELEASE.jar:4.0.1.RELEASE]
  </code></pre>
  
  <p>is the error stack</p>