2017-05-08 18 views
-2

私はスプリングブートとスプリングバッチプロジェクトを持っています。私はこの例外だプロジェクトを実行しているとき 私は春のバッチIndexOutOfBoundsExceptionスプリングバッチとスプリングブート

<dependency> 
    <groupId>org.springframework.batch</groupId> 
    <artifactId>spring-batch-core</artifactId> 
    <version>3.0.7.RELEASE</version> 
</dependency> 

と春のブート1.3.5 を使用しています:

2017-05-08 19:33:28.363 DEBUG 23790 --- [   main] o.s.w.c.s.StandardServletEnvironment  : Adding [server.ports] PropertySource with highest search precedence 
2017-05-08 19:33:28.372 INFO 23790 --- [   main] o.s.b.a.b.JobLauncherCommandLineRunner : Running default command line with: [--debug, --spring.output.ansi.enabled=always] 
2017-05-08 19:33:28.399 ERROR 23790 --- [   main] o.s.boot.SpringApplication    : Application startup failed 

java.lang.IllegalStateException: Failed to execute CommandLineRunner 
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:809) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at com.sellware.module.ebay.Application.main(Application.java:52) [classes/:na] 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] 
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] 
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) [idea_rt.jar:na] 
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 
    at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[na:1.8.0_121] 
    at java.util.ArrayList.get(ArrayList.java:429) ~[na:1.8.0_121] 
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.getNextJobParameters(JobLauncherCommandLineRunner.java:145) ~[spring-boot-autoconfigure-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.execute(JobLauncherCommandLineRunner.java:214) ~[spring-boot-autoconfigure-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:233) ~[spring-boot-autoconfigure-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:125) ~[spring-boot-autoconfigure-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:119) ~[spring-boot-autoconfigure-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    ... 11 common frames omitted 

答えて

2

によって解決を

@SpringBootApplication(exclude = BatchAutoConfiguration.class) 
BatchAutoConfigurationを除外
関連する問題