title: spring-batch spring boot restart from step failed
body: <p>spring-batch configurated without xml configuration (3.0.7-release version with annotation) how can i repeat a step failed during application restart? For ex: step1 pass, step 2 fails and application stops. So, i run again a job but first step repeats..i want to starting from step2 or step n when step n-1 completed successfully</p>
  
  <pre><code> @BatchConfiguration
      public class Conf{
  
      ..
      ..
  
       @Bean
          public Job importUserJob(@Qualifier("firstJdbcTemplate")final JdbcTemplate jdbcTemplate,
                  @Qualifier("firstDataSource") DataSource ds,
                  @Qualifier("secondJdbcTemplate")final JdbcTemplate jdbcTemplate2,
                  @Qualifier("secondDataSource") DataSource ds2
                  ) throws Exception {
                  log.info("Job starts"); 
              Job jb= 
                      jobBuilderFactory.get("importUserJob")
                      //.incrementer(new RunIdIncrementer())//serve perchè usa il db
                      .listener(listener(jdbcTemplate, jdbcTemplate2))
                      .flow(step1(ds, s1))
                      .on(ExitStatus.COMPLETED.getExitCode()).to(step2(ds,s2))
                      .on(ExitStatus.COMPLETED.getExitCode()).to(step3(ds,s3))
                      .on(ExitStatus.COMPLETED.getExitCode()).to(step4(ds2,s4))
                      .on(ExitStatus.COMPLETED.getExitCode()).to(step5(ds2,s5))
                      .end()
                      .build();
              return jb;
          }
  
      }
  </code></pre>
  
  <p>Thanks</p>
  
  <p>When one of my step fail, the BATCH_ tables still empty...is it right?</p>
  
  <p>LOGS:</p>
  
  <pre><code>24/11/2016 14:37:44.752 DEBUG [main] ScriptUtils: Failed to execute SQL script statement #4 of class path resource [org/springframework/batch/core/schema-sqlserver.sql]: CREATE TABLE BATCH_STEP_EXECUTION ( STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , VERSION BIGINT NOT NULL, STEP_NAME VARCHAR(100) NOT NULL, JOB_EXECUTION_ID BIGINT NOT NULL, START_TIME DATETIME NOT NULL , END_TIME DATETIME DEFAULT NULL , STATUS VARCHAR(10) NULL, COMMIT_COUNT BIGINT NULL, READ_COUNT BIGINT NULL, FILTER_COUNT BIGINT NULL, WRITE_COUNT BIGINT NULL, READ_SKIP_COUNT BIGINT NULL, WRITE_SKIP_COUNT BIGINT NULL, PROCESS_SKIP_COUNT BIGINT NULL, ROLLBACK_COUNT BIGINT NULL, EXIT_CODE VARCHAR(2500) NULL, EXIT_MESSAGE VARCHAR(2500) NULL, LAST_UPDATED DATETIME NULL, constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) 
  java.sql.SQLException: There is already an object named 'BATCH_STEP_EXECUTION' in the database.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
      at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
      at org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:473)
      at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:231)
      at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:48)
      at org.springframework.boot.autoconfigure.batch.BatchDatabaseInitializer.initialize(BatchDatabaseInitializer.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
      at com.cadit.configuration.MainApp.main(MainApp.java:11)
  24/11/2016 14:37:44.754 DEBUG [main] ScriptUtils: Failed to execute SQL script statement #5 of class path resource [org/springframework/batch/core/schema-sqlserver.sql]: CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, SHORT_CONTEXT VARCHAR(2500) NOT NULL, SERIALIZED_CONTEXT TEXT NULL, constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) ) 
  java.sql.SQLException: There is already an object named 'BATCH_STEP_EXECUTION_CONTEXT' in the database.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
      at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
      at org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:473)
      at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:231)
      at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:48)
      at org.springframework.boot.autoconfigure.batch.BatchDatabaseInitializer.initialize(BatchDatabaseInitializer.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
      at com.cadit.configuration.MainApp.main(MainApp.java:11)
  24/11/2016 14:37:44.755 DEBUG [main] ScriptUtils: Failed to execute SQL script statement #6 of class path resource [org/springframework/batch/core/schema-sqlserver.sql]: CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, SHORT_CONTEXT VARCHAR(2500) NOT NULL, SERIALIZED_CONTEXT TEXT NULL, constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) 
  java.sql.SQLException: There is already an object named 'BATCH_JOB_EXECUTION_CONTEXT' in the database.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
      at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
      at org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:473)
      at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:231)
      at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:48)
      at org.springframework.boot.autoconfigure.batch.BatchDatabaseInitializer.initialize(BatchDatabaseInitializer.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
      at com.cadit.configuration.MainApp.main(MainApp.java:11)
  24/11/2016 14:37:44.757 DEBUG [main] ScriptUtils: Failed to execute SQL script statement #7 of class path resource [org/springframework/batch/core/schema-sqlserver.sql]: CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID BIGINT IDENTITY)
  java.sql.SQLException: There is already an object named 'BATCH_STEP_EXECUTION_SEQ' in the database.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
      at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
      at org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:473)
      at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:231)
      at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:48)
      at org.springframework.boot.autoconfigure.batch.BatchDatabaseInitializer.initialize(BatchDatabaseInitializer.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
      at com.cadit.configuration.MainApp.main(MainApp.java:11)
  24/11/2016 14:37:44.758 DEBUG [main] ScriptUtils: Failed to execute SQL script statement #8 of class path resource [org/springframework/batch/core/schema-sqlserver.sql]: CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID BIGINT IDENTITY)
  java.sql.SQLException: There is already an object named 'BATCH_JOB_EXECUTION_SEQ' in the database.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
      at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
      at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
      at org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScript(ScriptUtils.java:473)
      at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:231)
      at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:48)
      at org.springframework.boot.autoconfigure.batch.BatchDatabaseInitializer.initialize(BatchDatabaseInitializer.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)
      at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.
  
      springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
          at com.cadit.configuration.MainApp.main(MainApp.java:11)
  
  
  24/11/2016 14:36:41.630 DEBUG [main] DefaultListableBeanFactory: Eagerly caching bean 'jobOperator' to allow for resolving potential circular references
  24/11/2016 14:36:41.632 DEBUG [main] DefaultListableBeanFactory: Invoking afterPropertiesSet() on bean with name 'jobOperator'
  24/11/2016 14:36:41.633 DEBUG [main] DefaultListableBeanFactory: Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
  24/11/2016 14:36:41.633 DEBUG [main] AnnotationTransactionAttributeSource: Adding transactional method 'SimpleJobOperator.stop' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
  24/11/2016 14:36:41.634 DEBUG [main] InfrastructureAdvisorAutoProxyCreator: Creating implicit proxy for bean 'jobOperator' with 0 common interceptors and 1 specific interceptors
  24/11/2016 14:36:41.635 DEBUG [main] CglibAopProxy: Creating CGLIB proxy: target source is SingletonTargetSource for target object [org.springframework.batch.core.launch.support.SimpleJobOperator@7cc586a8]
  24/11/2016 14:36:41.644 DEBUG [main] CglibAopProxy: Unable to apply any optimisations to advised method: public java.lang.Long org.springframework.batch.core.launch.support.SimpleJobOperator.start(java.lang.String,java.lang.String) throws org.springframework.batch.core.launch.NoSuchJobException,org.springframework.batch.core.launch.JobInstanceAlreadyExistsException,org.springframework.batch.core.JobParametersInvalidException
  24/11/2016 14:36:41.644 DEBUG [main] AnnotationTransactionAttributeSource: Adding transactional method 'SimpleJobOperator.stop' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; ''
  
  
  
     com.cadit.exception.CryptException: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
          at com.cadit.processors.ValueItemProcessor.process(ValueItemProcessor.java:16)
          at org.springframework.batch.core.step.item.SimpleChunkProcessor.doProcess(SimpleChunkProcessor.java:126)
          at org.springframework.batch.core.step.item.SimpleChunkProcessor.transform(SimpleChunkProcessor.java:293)
          at org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:192)
          at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:75)
          at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
          at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
          at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
          at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
          at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
          at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
          at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
          at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
          at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
          at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
          at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
          at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
          at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)
          at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
          at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
          ...org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:233)
          at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:125)
          at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:119)
          at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)
          at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784)
          at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:771)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
          at com.cadit.configuration.MainApp.main(MainApp.java:11)
      Caused by: javax.crypto.IllegalBlockSizeException: Input length must be multiple of 8 when decrypting with padded cipher
          at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:913)
  </code></pre>