Получение исключения нулевого указателя при выполнении шага тачлета весеннего пакета - PullRequest
0 голосов
/ 21 апреля 2020

Как показывает вопрос, я получаю java.lang.NullPointerException при попытке запустить пакетное задание в два этапа. Одним из шагов является простой тасклет, где, как и другой, используется чанк. Пакетное задание в настоящее время выполняется через конечную точку REST (просто для целей тестирования).

Вот что у меня есть:

JOB CONFIG CLASS

@Configuration
@EnableBatchProcessing
@Slf4j
public class DailyReportingQueryExecutorJobConfig
{
    @Autowired
    private JobBuilderFactory jobBuilderFactory;

    @Autowired
    private StepBuilderFactory stepBuilderFactory;

    @Autowired
    private QueryDetailsRepository queryRepo;

    @Autowired
    @Qualifier("reportingQueryReader")
    private RepositoryItemReader<QueryDetails> reportingQueryReader;

    @Autowired
    @Qualifier("reportingQueryProcessor")
    private ItemProcessor<QueryDetails, List<ReportingCounts>> reportingQueryProcessor;

    @Autowired
    @Qualifier("reportingQueryResultWriter")
    private ListUnpackingItemWriter<ReportingCounts> reportingQueryResultWriter;


    @Autowired
    private QueryScheduleService queryScheduleService;

    @Autowired
    private ReportingCountsRepository reportingCountsRepo;

    @Autowired
    @Qualifier("parallelTaskExecutor")
    private TaskExecutor taskExecutor;

    @Autowired
    @Qualifier("retrieveReportingQueriesForDayStep")
    private Step retrieveReportingQueriesForDayStep;

    @Autowired
    @Qualifier("identifyAndTrackQueriesToBeExecutedStep")
    private Step identifyAndTrackReportQueriesToExecuteStep;

    @Autowired
    @Qualifier("identifyAndTrackReportQueriesToExecuteTasklet")
    private IdentifyReportingQueriesTasklet identifyAndTrackReportQueriesToExecuteTasklet;

    @Bean(name = "reportingQueryParallelExecutorJob")
    @Autowired
    public Job dailyQueryExecutorJob(JobCompletionNotificationListener jobCompletionNotificationListener)
    {
        return jobBuilderFactory.get("ReportingQueryParallelExecutorJob")
                .incrementer(new RunIdIncrementer())
                .start(identifyAndTrackReportQueriesToExecuteStep)
                .next(retrieveReportingQueriesForDayStep)
                .listener(jobCompletionNotificationListener)
                .build();
    }



    @Bean(name = "identifyAndTrackQueriesToBeExecutedStep")
    public Step identifyAndTrackQueriesToBeExecutedStep()
    {
        return stepBuilderFactory
                .get("identifyAndTrackReportQueriesToExecuteStep") //identifyAndTrackQueriesToBeExecutedStep
                .tasklet(identifyAndTrackReportQueriesToExecuteTasklet)
                .build();

    }



    @Bean(name = "retrieveReportingQueriesForDayStep")
    public Step retrieveReportingQueriesForDayStep()
    {

        return stepBuilderFactory.get("RetrieveReportingQueriesForDayStep")
                .<QueryDetails, List<ReportingCounts>> chunk(1)
                .reader(reportingQueryReader)
                .processor(reportingQueryProcessor)
                .writer(reportingQueryResultWriter)
                .taskExecutor(taskExecutor)
                .allowStartIfComplete(true)
                .build();
    }

    @Bean(name = "reportingQueryReader")
    @StepScope
    public RepositoryItemReader<QueryDetails> reportingQueryReader(@Value("#{jobParameters[asOfDate]}") Date asOfDateParam)

    {
        log.info("Reporting reader invoked for asOfDate "+ asOfDateParam + " Date type: "+ asOfDateParam.getClass());
        Instant instant = asOfDateParam.toInstant();
        ZonedDateTime atZone = instant.atZone(ZoneId.systemDefault());
        LocalDate asOfDate = atZone.toLocalDate();
        List<Integer> queryIdsForDay = queryScheduleService.getQueryIdsForDay(asOfDate, QueryType.REPORT_QUERY);
        ArrayList<Object> argList = new ArrayList<>();
        argList.add(queryIdsForDay);
        log.info("List Of Queries for Day: " + argList.toString() );

        /*****************************************************************************************************/

        RepositoryItemReader<QueryDetails> repositoryItemReader = new RepositoryItemReader<>();
        Map<String, Direction> sort = new HashMap<>();
        sort.put("id", Direction.ASC);
        repositoryItemReader.setSort(sort);
        repositoryItemReader.setRepository(queryRepo);
        repositoryItemReader.setMethodName("findByIdIn");
        repositoryItemReader.setArguments(argList);
        log.info("Repository item reader successfully initialized" );
        return repositoryItemReader;
    }

    @Bean(name = "reportingQueryProcessor")
    @StepScope
    public ReportingQueryItemProcessor reportingQueryProcessor()
    {
        ReportingQueryItemProcessor queryItemProcessor = new ReportingQueryItemProcessor();
        return queryItemProcessor;
    }

    @Bean(name= "reportingQueryResultWriter")
    @StepScope
    public ListUnpackingItemWriter<ReportingCounts> reportingQueryResultWriter()
    {
        RepositoryItemWriter<ReportingCounts> repositoryItemWriter = new RepositoryItemWriter<>();
        repositoryItemWriter.setRepository(reportingCountsRepo);
        repositoryItemWriter.setMethodName("save");
        ListUnpackingItemWriter<ReportingCounts> listUnpackingItemWriter = new ListUnpackingItemWriter<ReportingCounts>();
        listUnpackingItemWriter.setDelegate(repositoryItemWriter);
        return listUnpackingItemWriter;

    }

}

Тасклет

import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.aspen.tools.entities.QueryType;
import com.aspen.tools.services.QueryScheduleService;

import lombok.extern.slf4j.Slf4j;


@Slf4j
@Component(value="identifyAndTrackReportQueriesToExecuteTasklet")
public class IdentifyReportingQueriesTasklet implements Tasklet
{

//  @Autowired
//  @Qualifier("jdbcQueryParameterValues")
//  private Map<String, Date> paramSource; 

    //@Autowired
    //private QueryScheduleService queryScheduleService;

//  @Value("#{jobParameters[queryType]}")
//  private String queryType; // reporting, exception, or notification please see the batch controller
//  
    @Override
    public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception
    {
        // TODO Auto-generated method stub
        System.out.println("hello world");

        //String queryType = chunkContext.getStepContext().getStepExecution()
                  //.getJobParameters().getString("queryType");


        //System.out.println(queryType);

        //Date asOfDateParam = paramSource.get("ASOFDATE");


//      log.info("Inside the tasklet");
//      Instant instant = asOfDateParam.toInstant();
//      ZonedDateTime atZone = instant.atZone(ZoneId.systemDefault());
//      LocalDate asOfDate = atZone.toLocalDate();
//      List<Integer> queryIdsForDay = queryScheduleService.getQueryIdsForDay(asOfDate, QueryType.valueOf(queryType));
//      
//      System.out.println(queryIdsForDay);



        return RepeatStatus.FINISHED;
    }

}

Как видно из комментариев, тасклет должен быть целым, чем просто печатать привет мир, но на данный момент он даже не печатает что.

Контроллер для запуска задания

import java.util.Date;


import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.core.JobParametersInvalidException;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
import org.springframework.batch.core.repository.JobRestartException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.aspen.tools.entities.QueryType;


@RestController
@RequestMapping("/api/batch")
public class BatchController 
{
    @Autowired
    private JobLauncher jobLauncher;

    @Autowired
    @Qualifier("reportingQueryParallelExecutorJob")
    private Job reportingQueryBatchJob;

    @Autowired
    @Qualifier("exceptionQueryParallelExecutorJob")
    private Job exceptionQueryBatchJob;

    @Autowired
    @Qualifier("monitoringQueryParallelExecutorJob")
    private Job monitoringQueryBatchJob;

    @Autowired
    @Qualifier("notificationSenderJob")
    private Job notificationBatchJob;


    @GetMapping(path = "/reporting")
    public ExitStatus executeReportingJob(@RequestParam(name = "AsOfDate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date asOfDate) 
            throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException
    {
        JobParametersBuilder jobParametersBuilder = new JobParametersBuilder();
        jobParametersBuilder.addDate("asOfDate", asOfDate);
        jobParametersBuilder.addString("queryType", QueryType.REPORT_QUERY.toString());
        JobParameters jobParameters= jobParametersBuilder.toJobParameters();
        JobExecution run = jobLauncher.run(reportingQueryBatchJob, jobParameters);
        return run.getExitStatus();

    }


}

Трассировка стека

LOGBACK: No context given for c.q.l.core.rolling.SizeAndTimeBasedRollingPolicy@1457410641

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.1.RELEASE)

2020-04-21 09:06:43.490  INFO 10632 --- [           main] c.aspen.tools.MonitoringToolApplication  : Starting MonitoringToolApplication on ISDTESTWS103 with PID 10632 (C:\Users\adhikarit\git\data-processing\target\classes started by adhikarit in C:\Users\adhikarit\git\data-processing)
2020-04-21 09:06:43.495  INFO 10632 --- [           main] c.aspen.tools.MonitoringToolApplication  : No active profile set, falling back to default profiles: default
2020-04-21 09:06:45.301  INFO 10632 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2020-04-21 09:06:45.441  INFO 10632 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 127ms. Found 10 repository interfaces.
2020-04-21 09:06:46.070  INFO 10632 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-04-21 09:06:46.657  INFO 10632 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8088 (http)
2020-04-21 09:06:46.669  INFO 10632 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-04-21 09:06:46.670  INFO 10632 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.27]
2020-04-21 09:06:46.793  INFO 10632 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-04-21 09:06:46.794  INFO 10632 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2944 ms
2020-04-21 09:06:47.125  INFO 10632 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2020-04-21 09:06:47.333  INFO 10632 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2020-04-21 09:06:47.341  INFO 10632 --- [           main] o.s.b.a.h2.H2ConsoleAutoConfiguration    : H2 console available at '/h2'. Database available at 'jdbc:h2:mem:mydb'
2020-04-21 09:06:48.031  INFO 10632 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-04-21 09:06:48.114  INFO 10632 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.4.8.Final}
2020-04-21 09:06:48.272  INFO 10632 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-04-21 09:06:48.409  INFO 10632 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2020-04-21 09:06:49.715  INFO 10632 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-04-21 09:06:49.724  INFO 10632 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-04-21 09:06:51.101  WARN 10632 --- [           main] o.s.b.c.l.AbstractListenerFactoryBean    : org.springframework.batch.item.ItemProcessor is an interface. The implementing class will not be queried for annotation based listener configurations. If using @StepScope on a @Bean method, be sure to return the implementing class so listener annotations can be used.
2020-04-21 09:06:51.736  WARN 10632 --- [           main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-04-21 09:06:52.438  WARN 10632 --- [           main] o.s.b.a.batch.JpaBatchConfigurer         : JPA does not support custom isolation levels, so locks may not be taken when launching Jobs
2020-04-21 09:06:52.441  INFO 10632 --- [           main] o.s.b.c.r.s.JobRepositoryFactoryBean     : No database type set, using meta data indicating: H2
2020-04-21 09:06:52.463  INFO 10632 --- [           main] o.s.b.c.l.support.SimpleJobLauncher      : No TaskExecutor has been set, defaulting to synchronous executor.
2020-04-21 09:06:52.638  INFO 10632 --- [           main] o.s.s.c.ThreadPoolTaskScheduler          : Initializing ExecutorService 'taskScheduler'
2020-04-21 09:06:52.666  INFO 10632 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 14 endpoint(s) beneath base path '/actuator'
2020-04-21 09:06:52.760  INFO 10632 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8088 (http) with context path ''
2020-04-21 09:06:52.762  INFO 10632 --- [           main] c.aspen.tools.MonitoringToolApplication  : Started MonitoringToolApplication in 9.779 seconds (JVM running for 10.27)
2020-04-21 09:07:14.102  INFO 10632 --- [nio-8088-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-04-21 09:07:14.102  INFO 10632 --- [nio-8088-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-04-21 09:07:14.130  INFO 10632 --- [nio-8088-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 27 ms
2020-04-21 09:07:14.251  INFO 10632 --- [nio-8088-exec-1] o.s.b.c.l.support.SimpleJobLauncher      : Job: [SimpleJob: [name=ReportingQueryParallelExecutorJob]] launched with the following parameters: [{asOfDate=1581404400000}]
2020-04-21 09:07:14.272  INFO 10632 --- [nio-8088-exec-1] .t.b.l.JobCompletionNotificationListener : Email Notifications have been disabled
2020-04-21 09:07:14.272  INFO 10632 --- [nio-8088-exec-1] .t.b.l.JobCompletionNotificationListener : EMAIL SUBJECT : Reporting Batch job has started!!
2020-04-21 09:07:14.272  INFO 10632 --- [nio-8088-exec-1] .t.b.l.JobCompletionNotificationListener : EMAIL BODY : Reporting Batch Job is Being started at: Tue Apr 21 09:07:14 MDT 2020
2020-04-21 09:07:14.282  INFO 10632 --- [nio-8088-exec-1] o.s.batch.core.job.SimpleStepHandler     : Executing step: [identifyAndTrackReportQueriesToExecuteStep]
2020-04-21 09:07:14.292 ERROR 10632 --- [nio-8088-exec-1] o.s.batch.core.step.AbstractStep         : Encountered an error executing step identifyAndTrackReportQueriesToExecuteStep in job ReportingQueryParallelExecutorJob

java.lang.NullPointerException: null
    at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:248) ~[spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208) ~[spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:410) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:136) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:319) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:147) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50) [spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_181]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) [spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) [spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) [spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127) [spring-batch-core-4.2.0.RELEASE.jar:4.2.0.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) [spring-aop-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at com.sun.proxy.$Proxy158.run(Unknown Source) [na:na]
    at com.aspen.tools.controllers.api.BatchController.executeReportingJob(BatchController.java:59) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_181]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108) [spring-boot-actuator-2.2.1.RELEASE.jar:2.2.1.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_181]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.27.jar:9.0.27]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_181]

2020-04-21 09:07:14.297  INFO 10632 --- [nio-8088-exec-1] o.s.batch.core.step.AbstractStep         : Step: [identifyAndTrackReportQueriesToExecuteStep] executed in 13ms
2020-04-21 09:07:14.300  INFO 10632 --- [nio-8088-exec-1] .t.b.l.JobCompletionNotificationListener : Email Notifications have been disabled
2020-04-21 09:07:14.300  INFO 10632 --- [nio-8088-exec-1] .t.b.l.JobCompletionNotificationListener : EMAIL SUBJECT : Reporting batch has Failed
2020-04-21 09:07:14.300  INFO 10632 --- [nio-8088-exec-1] .t.b.l.JobCompletionNotificationListener : EMAIL BODY : Reporting batch has Failed with error: null

2020-04-21 09:07:14.302  INFO 10632 --- [nio-8088-exec-1] o.s.b.c.l.support.SimpleJobLauncher      : Job: [SimpleJob: [name=ReportingQueryParallelExecutorJob]] completed with the following parameters: [{asOfDate=1581404400000}] and the following status: [FAILED] in 39ms



Вот как я запустите пакетное задание:

http://localhost:8088/api/batch/reporting?AsOfDate=2020-02-11

...