org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters.

Spring JIRA | Trevor Baker | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Using the CommandLineJobRunner I pass in some non-identifying parameters but when I rerun with the same parameter, SimpleJobRepository throws an exception: {noformat} 2015-05-14 12:03:58,414 [ERROR] org.springframework.batch.core.launch.support.CommandLineJobRunner#start:368 | Job Terminated in error: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters. org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters. at org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:126) {noformat} This is because SimpleJobRepository only checks the number of JobParameters but doesn't check if they are identifying or not. {code:java} BatchStatus status = execution.getStatus(); if (execution.getJobParameters().getParameters().size() > 0 && (status == BatchStatus.COMPLETED || status == BatchStatus.ABANDONED)) { throw new JobInstanceAlreadyCompleteException( "A job instance already exists and is complete for parameters=" + jobParameters + ". If you want to run this job again, change the parameters."); } {code} Related Jira: BATCH-1412

    Spring JIRA | 2 years ago | Trevor Baker
    org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters.
  2. 0

    Using the CommandLineJobRunner I pass in some non-identifying parameters but when I rerun with the same parameter, SimpleJobRepository throws an exception: {noformat} 2015-05-14 12:03:58,414 [ERROR] org.springframework.batch.core.launch.support.CommandLineJobRunner#start:368 | Job Terminated in error: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters. org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters. at org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:126) {noformat} This is because SimpleJobRepository only checks the number of JobParameters but doesn't check if they are identifying or not. {code:java} BatchStatus status = execution.getStatus(); if (execution.getJobParameters().getParameters().size() > 0 && (status == BatchStatus.COMPLETED || status == BatchStatus.ABANDONED)) { throw new JobInstanceAlreadyCompleteException( "A job instance already exists and is complete for parameters=" + jobParameters + ". If you want to run this job again, change the parameters."); } {code} Related Jira: BATCH-1412

    Spring JIRA | 2 years ago | Trevor Baker
    org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters.
  3. 0

    Spring batch A job instance already exists

    Stack Overflow | 3 years ago | Petar Tahchiev
    org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={catalogVersionPK=3378876823725152, type=UPDATE}. If you want to run this job again, change the parameters.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Batch : A job instance already exists and is complete for parameters={}

    mkyong.com | 1 year ago
    org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={}. If you want to run this job again, change the parameters.
  6. 0

    Spring Batch 'RunIdIncrementer' not generating next value

    Stack Overflow | 4 years ago | Greg
    org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException: A job instance already exists and is complete for parameters={run.id=23, tenant.code=XXX}. If you want to run this job again, change the parameters.

  1. Andreas Häber 2 times, last 2 months ago
  2. tvrmsmith 1 times, last 9 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException

    A job instance already exists and is complete for parameters={report.date=1431586800000}. If you want to run this job again, change the parameters.

    at org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution()
  2. Spring Batch Core
    SimpleJobRepository.createJobExecution
    1. org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:126)
    1 frame