My Spring batch process runs twice.
After reading this link here, I added spring.batch.job.enabled=false to my application.yml.
But the job itself did not run.
Then I tried doing some alterations to my job configuration Class. I moved the instance variables to method parameters hoping that would fix the issue. But no luck again.
Configuration Class
#Configuration
public class CarJobConfiguration {
private static final Logger logger = LoggerFactory.getLogger(CarJobConfiguration.class);
#Value("${com.car-update.thread-count}")
private int threadCount;
#Value("${com.car-update.delta-time}")
private int deltaTime;
#Bean
public MongoItemReader<CarMongo> carReader( #Autowired MongoTemplate mongoTemplate, #Value("${com.car-update.chunkSize}") final int chuckSize) {
MongoItemReader<CarMongo> reader = new MongoItemReader<>();
reader.setTemplate(mongoTemplate);
Map<String, Direction> sortDirection = new HashMap<>();
sortDirection.put("_id", Direction.DESC);
reader.setSort(sortDirection);
reader.setTargetType(CarMongo.class);
String query = getQuery();
logger.info("***** Mongo query *****: {}", query);
reader.setQuery(query);
reader.setPageSize(chuckSize);
return reader;
}
private String getQuery() {
// Some logic to get query
}
#Bean
public Job carDeltaJob(JobBuilderFactory jobBuilderFactory, JobCompletionNotificationListener listener, #Autowired #Qualifier("carDeltaStep")
Step carDeltaStep) {
return jobBuilderFactory.get("car_delta_extraction")
.incrementer(new RunIdIncrementer())
.listener(listener)
.flow(carDeltaStep)
.end()
.build();
}
#Bean
public Step carDeltaStep(StepBuilderFactory stepBuilderFactory,
#Value("${com.car-update.chunkSize}") final int chuckSize,
#Value("${com.car-update.thread-count}") final int threadCount,
MongoItemReader<CarMongo> mongoItemReader, CarProcessor carProcessor,
CarWriter carWriter) {
System.out.println("STEPSSSS this.chuckSize " + chuckSize +", thread count: " + this.threadCount);
return stepBuilderFactory.get("car-delta-step")
.<CarMongo, CarMongo>chunk(chuckSize)
.reader(mongoItemReader)
.processor(carProcessor)
.writer(carWriter)
.taskExecutor(taskExecutor())
.throttleLimit(threadCount)
.build();
}
#Bean
public TaskExecutor taskExecutor(){
//some logic
}
}
AppConfig.java UPDATE
#Configuration
#EnableBatchProcessing(modular=true)
public class AppConfig {
#Bean
public ApplicationContextFactory SomeOtherExtractionJob() {
return new GenericApplicationContextFactory(SomeOtherConfiguration.class);
}
#Bean
public ApplicationContextFactory carDeltaJob() {
return new GenericApplicationContextFactory(CarJobConfiguration.class);
}
}
LOGS:
03:04:57.313 INFO 9092 --- [ main] c.w.ProductExtractionApplication : Starting ProductExtractionApplication on CHMB113786.local with PID 9092 (/Users/andy/Car-Extractionbatch/bin/main started by andy in /Users/andy/Car-Extractionbatch)
03:04:57.318 INFO 9092 --- [ main] c.w.ProductExtractionApplication : No active profile set, falling back to default profiles: default
03:04:57.353 INFO 9092 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#d78795: startup date [Thu Jun 06 03:04:57 IST 2019]; root of context hierarchy
03:04:57.774 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'catalogExtractionJob' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appConfig; factoryMethodName=catalogExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/AppConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=catalogExtractionJobConfiguration; factoryMethodName=catalogExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CatalogExtractionJobConfiguration.class]]
03:04:57.774 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'productCategoryExtractionJob' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appConfig; factoryMethodName=productCategoryExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/AppConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=categoryExtractionJobConfiguration; factoryMethodName=productCategoryExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CategoryExtractionJobConfiguration.class]]
03:04:57.775 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'taskExecutor' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=catalogExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CatalogExtractionJobConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=categoryExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CategoryExtractionJobConfiguration.class]]
03:04:57.775 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'dimensionExtractionJob' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appConfig; factoryMethodName=dimensionExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/AppConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=dimensionExtractionJobConfiguration; factoryMethodName=dimensionExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/DimensionExtractionJobConfiguration.class]]
03:04:57.776 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'taskExecutor' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=categoryExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CategoryExtractionJobConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=dimensionExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/DimensionExtractionJobConfiguration.class]]
03:04:57.776 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'gwpExtractionJob' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appConfig; factoryMethodName=gwpExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/AppConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=gwpExtractionJobConfiguration; factoryMethodName=gwpExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/GwpExtractionJobConfiguration.class]]
03:04:57.777 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'taskExecutor' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=dimensionExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/DimensionExtractionJobConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=gwpExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/GwpExtractionJobConfiguration.class]]
03:04:57.777 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'taskExecutor' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=gwpExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/GwpExtractionJobConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=carDeltaUpdateJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CarJobConfiguration.class]]
03:04:57.779 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'productRecommendedExtractionJob' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appConfig; factoryMethodName=productRecommendedExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/AppConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=productRecommendedExtractionJobConfiguration; factoryMethodName=productRecommendedExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/ProductRecommendedExtractionJobConfiguration.class]]
03:04:57.783 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'skuExtractionJob' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appConfig; factoryMethodName=skuExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/AppConfig.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=skuExtractionJobConfiguration; factoryMethodName=skuExtractionJob; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/SkuExtractionJobConfiguration.class]]
03:04:57.783 INFO 9092 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'taskExecutor' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=carDeltaUpdateJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/CarJobConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=skuExtractionJobConfiguration; factoryMethodName=taskExecutor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/mycar/configuration/SkuExtractionJobConfiguration.class]]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/Users/andy/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.0.5.RELEASE/1bd9feb1d9dac6accd27f5244b6c47cfcb55045c/spring-core-5.0.5.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
03:04:58.414 INFO 9092 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
03:04:58.490 INFO 9092 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
03:04:58.500 INFO 9092 --- [ main] o.s.b.c.r.s.JobRepositoryFactoryBean : No database type set, using meta data indicating: H2
03:04:58.623 INFO 9092 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : No TaskExecutor has been set, defaulting to synchronous executor.
03:04:58.878 INFO 9092 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[mongo1:27017, mongo2:27017, mongo3:27017], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
03:04:58.879 INFO 9092 --- [ main] org.mongodb.driver.cluster : Adding discovered server mongo1:27017 to client view of cluster
03:04:58.924 INFO 9092 --- [ main] org.mongodb.driver.cluster : Adding discovered server mongo2:27017 to client view of cluster
03:04:58.927 INFO 9092 --- [ main] org.mongodb.driver.cluster : Adding discovered server mongo3:27017 to client view of cluster
03:04:59.051 INFO 9092 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[mongo1:27017, mongo2:27017, mongo3:27017], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
03:04:59.052 INFO 9092 --- [ main] org.mongodb.driver.cluster : Adding discovered server mongo1:27017 to client view of cluster
03:04:59.054 INFO 9092 --- [ main] org.mongodb.driver.cluster : Adding discovered server mongo2:27017 to client view of cluster
03:04:59.056 INFO 9092 --- [ main] org.mongodb.driver.cluster : Adding discovered server mongo3:27017 to client view of cluster
#####from Inside JobCompletionNotificationListener construtor#####
03:04:59.193 INFO 9092 --- [ main] org.mongodb.driver.cluster : Cluster description not yet available. Waiting for 30000 ms before timing out
03:05:01.912 INFO 9092 --- [reens.com:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:2, serverValue:816666}] to mongo2:27017
03:05:01.912 INFO 9092 --- [reens.com:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:5, serverValue:816667}] to mongo2:27017
03:05:01.914 INFO 9092 --- [reens.com:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:4, serverValue:510177}] to mongo1:27017
03:05:01.914 INFO 9092 --- [reens.com:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:1, serverValue:510176}] to mongo1:27017
03:05:01.916 INFO 9092 --- [reens.com:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:6, serverValue:1677186}] to mongo3:27017
03:05:02.206 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=mongo1:27017, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 7]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=288249712, setName='mongodbEnterprise_lowerEnvironment', canonicalAddress=mongo1:27017, hosts=[mongo2:27017, mongo3:27017, mongo1:27017], passives=[], arbiters=[], primary='mongo1:27017', tagSet=TagSet{[]}, electionId=7fffffff0000000000000127, setVersion=2, lastWriteDate=Thu Jun 06 03:05:05 IST 2019, lastUpdateTimeNanos=368580308198796}
03:05:02.207 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=mongo3:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 7]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=290187882, setName='mongodbEnterprise_lowerEnvironment', canonicalAddress=mongo3:27017, hosts=[mongo2:27017, mongo3:27017, mongo1:27017], passives=[], arbiters=[], primary='mongo1:27017', tagSet=TagSet{[]}, electionId=null, setVersion=2, lastWriteDate=Thu Jun 06 03:05:05 IST 2019, lastUpdateTimeNanos=368580309720591}
03:05:02.207 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=mongo2:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 7]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=288378005, setName='mongodbEnterprise_lowerEnvironment', canonicalAddress=mongo2:27017, hosts=[mongo2:27017, mongo3:27017, mongo1:27017], passives=[], arbiters=[], primary='mongo1:27017', tagSet=TagSet{[]}, electionId=null, setVersion=2, lastWriteDate=Thu Jun 06 03:05:05 IST 2019, lastUpdateTimeNanos=368580309928421}
03:05:02.206 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=mongo1:27017, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 7]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=286870787, setName='mongodbEnterprise_lowerEnvironment', canonicalAddress=mongo1:27017, hosts=[mongo2:27017, mongo3:27017, mongo1:27017], passives=[], arbiters=[], primary='mongo1:27017', tagSet=TagSet{[]}, electionId=7fffffff0000000000000127, setVersion=2, lastWriteDate=Thu Jun 06 03:05:05 IST 2019, lastUpdateTimeNanos=368580308253613}
03:05:02.209 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Discovered cluster type of REPLICA_SET
03:05:02.210 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Setting max election id to 7fffffff0000000000000127 from replica set primary mongo1:27017
03:05:02.210 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Discovered cluster type of REPLICA_SET
03:05:02.210 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Setting max set version to 2 from replica set primary mongo1:27017
03:05:02.211 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Setting max election id to 7fffffff0000000000000127 from replica set primary mongo1:27017
03:05:02.211 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Discovered replica set primary mongo1:27017
03:05:02.212 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Setting max set version to 2 from replica set primary mongo1:27017
03:05:02.213 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Discovered replica set primary mongo1:27017
03:05:02.216 INFO 9092 --- [reens.com:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:3, serverValue:1677187}] to mongo3:27017
03:05:02.218 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=mongo2:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 7]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=301879122, setName='mongodbEnterprise_lowerEnvironment', canonicalAddress=mongo2:27017, hosts=[mongo2:27017, mongo3:27017, mongo1:27017], passives=[], arbiters=[], primary='mongo1:27017', tagSet=TagSet{[]}, electionId=null, setVersion=2, lastWriteDate=Thu Jun 06 03:05:05 IST 2019, lastUpdateTimeNanos=368580320523441}
03:05:02.487 INFO 9092 --- [reens.com:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=mongo3:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 7]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=269161222, setName='mongodbEnterprise_lowerEnvironment', canonicalAddress=mongo3:27017, hosts=[mongo2:27017, mongo3:27017, mongo1:27017], passives=[], arbiters=[], primary='mongo1:27017', tagSet=TagSet{[]}, electionId=null, setVersion=2, lastWriteDate=Thu Jun 06 03:05:06 IST 2019, lastUpdateTimeNanos=368580589179359}
03:05:04.645 INFO 9092 --- [ main] org.mongodb.driver.connection : Opened connection [connectionId{localValue:7, serverValue:510178}] to mongo1:27017
03:09:05.799 WARN 9092 --- [ main] o.s.b.c.s.b.FaultTolerantStepBuilder : Asynchronous TaskExecutor detected with ItemStream reader. This is probably an error, and may lead to incorrect restart data being stored.
***** Mongo query *****: {'dttm' : { $gte: ISODate('2019-06-06T02:39:06.434209Z')}}
STEPSSSS this.chuckSize 1000, thread count: 10
03:09:06.575 INFO 9092 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [org/springframework/batch/core/schema-h2.sql]
03:09:06.614 INFO 9092 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [org/springframework/batch/core/schema-h2.sql] in 38 ms.
03:09:06.976 INFO 9092 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
03:09:06.980 INFO 9092 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'batchDataSource' has been autodetected for JMX exposure
03:09:06.981 INFO 9092 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'mariaDB' has been autodetected for JMX exposure
03:09:06.986 INFO 9092 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'mariaDB': registering with JMX server as MBean [com.zaxxer.hikari:name=mariaDB,type=HikariDataSource]
03:09:06.988 INFO 9092 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'batchDataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=batchDataSource,type=HikariDataSource]
03:09:06.992 INFO 9092 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase -2147482648
03:09:06.995 INFO 9092 --- [ main] ory$ResourceAnnotationApplicationContext : Refreshing ResourceAnnotationApplicationContext:com.mycar.configuration.CarJobConfiguration
***** Mongo query *****: {'dttm' : { $gte: ISODate('2019-06-06T02:39:07.00335Z')}}
STEPSSSS this.chuckSize 1000, thread count: 10
03:09:07.095 INFO 9092 --- [ main] c.w.ProductExtractionApplication : Started CarExtractionApplication in 250.186 seconds (JVM running for 251.358)
03:09:07.097 INFO 9092 --- [ main] o.s.b.a.b.JobLauncherCommandLineRunner : Running default command line with: [--spring.output.ansi.enabled=always]
03:09:07.141 INFO 9092 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : Job: [FlowJob: [name=car_delta_extraction]] launched with the following parameters: [{-spring.output.ansi.enabled=always, run.id=1}]
03:09:07.159 INFO 9092 --- [ main] o.s.batch.core.job.SimpleStepHandler : Executing step: [car-delta-step]
********** Processor **********
********** Processor **********
03:09:26.017 INFO 9092 --- [ main] c.w.l.JobCompletionNotificationListener : !!! JOB FINISHED! Time to verify the results : 18 seconds
03:09:26.019 INFO 9092 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : Job: [FlowJob: [name=car_delta_extraction]] completed with the following parameters: [{-spring.output.ansi.enabled=always, run.id=1}] and the following status: [COMPLETED]
03:09:26.066 INFO 9092 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : Job: [FlowJob: [name=car_delta_extraction]] launched with the following parameters: [{-spring.output.ansi.enabled=always, run.id=2}]
03:09:26.073 INFO 9092 --- [ main] o.s.batch.core.job.SimpleStepHandler : Executing step: [car-delta-step]
********** Processor **********
********** Processor **********
03:09:31.753 INFO 9092 --- [ main] c.w.l.JobCompletionNotificationListener : !!! JOB FINISHED! Time to verify the results : 5 seconds
03:09:31.755 INFO 9092 --- [ main] o.s.b.c.l.support.SimpleJobLauncher : Job: [FlowJob: [name=car_delta_extraction]] completed with the following parameters: [{-spring.output.ansi.enabled=always, run.id=2}] and the following status: [COMPLETED]
03:09:31.757 INFO 9092 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#d78795: startup date [Thu Jun 06 03:04:57 IST 2019]; root of context hierarchy
03:09:31.759 INFO 9092 --- [ Thread-1] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase -2147482648
03:09:31.760 INFO 9092 --- [ Thread-1] ory$ResourceAnnotationApplicationContext : Closing ResourceAnnotationApplicationContext:com.mycar.configuration.CarJobConfiguration
03:09:31.766 INFO 9092 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
03:09:31.767 INFO 9092 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
03:09:32.042 INFO 9092 --- [ Thread-1] org.mongodb.driver.connection : Closed connection [connectionId{localValue:7, serverValue:510178}] to mongo1:27017 because the pool has been closed.
03:09:32.043 INFO 9092 --- [ Thread-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
03:09:32.048 INFO 9092 --- [ Thread-1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
From the Logs, you can notice that
*********** Processor *********** is printed twice.(Processor is printed twice each time as there are 2 records only)
Mongo Query and the chunck size and threadcount are printed twice.
!!! JOB FINISHED! Time to verify the results : __ is printed twice
Any suggestion would be greatly helpful.
I had this happen recently for a Job created in the method runScenario(). In my Spring Boot App, I had this:
#SpringBootApplication
public class SimulationBatchServiceApplication implements CommandLineRunner {
#Autowired
private JobLauncher jobLauncher;
#Autowired
private Job job;
public static void main(String[] args) {
SpringApplication.run(SimulationBatchServiceApplication.class, args);
}
#Override
public void run(String... args) throws Exception {
JobParameters params = new JobParametersBuilder()
.addString("runScenario", String.valueOf(System.currentTimeMillis()))
.toJobParameters();
jobLauncher.run(job, params);
}
}
runScenario() was also marked with #Bean. Spring therefore picked it up twice -- once to #Autowire the job field, once because I specified "runScenario" in JobParameters. Removing "runScenario" from the JobParameters object did the trick.
#Override
public void run(String... args) throws Exception {
jobLauncher.run(job, new JobParameters());
}
If I required a more dynamic case, I believe I could have removed #Bean and the job field, then specified "runScenario" in JobParameters. That way no autowiring would've occurred, but the job would've been found anyway by looking for the method name.
Perhaps this isn't your issue, but hopefully it provides a clue (or helps a future reader!)
I have configured restful webservice and hosted with the help of Spring Boot. But I'm not able to hit the service. And getting Response Status: -1 - Request Failed (Canceled or Timed-Out)
Logs:-
⁃ 2017-10-08 18:33:33.149 INFO 6806 --- [ main] com.mypleaks.PleaksRSApp : Starting PleaksRSApp on 3inmderaj1.local with PID 6806 (/Users/deraj/home/code/leaks-rs/mypleaks-rs/myPleaks-RS/target/classes started by deraj in /Users/deraj/home/code/leaks-rs/mypleaks-rs/myPleaks-RS)
⁃ 2017-10-08 18:33:33.155 INFO 6806 --- [ main] com.mypleaks.PleaksRSApp : No active profile set, falling back to default profiles: default
⁃ 2017-10-08 18:33:33.202 INFO 6806 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#311bf055: startup date [Sun Oct 08 18:33:33 IST 2017]; root of context hierarchy
⁃ 2017-10-08 18:33:33.998 INFO 6806 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'requestContextFilter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.class]] with [Root bean: class [org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
⁃ 2017-10-08 18:33:34.276 INFO 6806 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
⁃ 2017-10-08 18:33:34.372 INFO 6806 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$af71e9e1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
⁃ 2017-10-08 18:33:34.745 INFO 6806 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
⁃ 2017-10-08 18:33:34.756 INFO 6806 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
⁃ 2017-10-08 18:33:34.756 INFO 6806 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.6
Resource :-
Request:-
Response:-
It seems that you are using the annotations from the javax. package instead of the spring ones.
Try using #RestController on the class level and #RequestMapping on the method level (all other annotations should be from the spring package also):
#RestController
#RequestMapping(path = "/place")
public class PlaceResource{
#RequestMapping(method = RequestMethod.GET, path="/countries")
public Response getCountries(..){..}
}
Sorry Guys, Its was terrible mistake from my side. I had used below code in my application.
public class NotificationEngine implements InitializingBean {
#Override
public void afterPropertiesSet() throws Exception {"Here I was running some stupid endless process, Due to which the tomcat was not getting up completely and because of that Iwas getting this issue."}}
Please check that you have following dependency in your pom.xml, If it is not there please add it and re-run.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Why RabbitMQ is triggered or running while building the spring-boot jar.While running the Application.java or pom.xml.
i am able to see the following loggers
2016-07-01 16:40:04.334 INFO 7004 --- [ main] com.rabbit.App : No active profile set, falling back to default profiles: default
2016-07-01 16:40:04.391 INFO 7004 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#1da51a35: startup date [Fri Jul 01 16:40:04 CEST 2016]; root of context hierarchy
2016-07-01 16:40:05.331 INFO 7004 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'rabbitListenerContainerFactory' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=rabbitMqConfiguration; factoryMethodName=rabbitListenerContainerFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/rabbit/messaging/configuration/RabbitMqConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=taskConsumerConfiguration; factoryMethodName=rabbitListenerContainerFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/rabbit/messaging/configuration/TaskConsumerConfiguration.class]]
2016-07-01 16:40:05.334 INFO 7004 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'connectionFactory' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=rabbitMqConfiguration; factoryMethodName=connectionFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/rabbit/messaging/configuration/RabbitMqConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=taskConsumerConfiguration; factoryMethodName=connectionFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/rabbit/messaging/configuration/TaskConsumerConfiguration.class]]
2016-07-01 16:40:05.334 INFO 7004 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'jsonMessageConverter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=rabbitMqConfiguration; factoryMethodName=jsonMessageConverter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/rabbit/messaging/configuration/RabbitMqConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=taskConsumerConfiguration; factoryMethodName=jsonMessageConverter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [com/rabbit/messaging/configuration/TaskConsumerConfiguration.class]]
2016-07-01 16:40:05.868 INFO 7004 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration' of type [class org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration$$EnhancerBySpringCGLIB$$ad9295b0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-07-01 16:40:06.657 INFO 7004 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
Is there any option to disable this?
While building the jar during test phase it throws following exception.
LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor#76dc36e5]
2016-06-30 15:10:32.989 WARN 21614 --- [cTaskExecutor-1] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it
org.springframework.amqp.AmqpIOException: java.net.SocketTimeoutException: connect timed out
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:67)
at
You get the log entry 'Overriding bean definition..' when you define a bean with that name more than once.
This leads to the question, which of the, at least two, beans do you use and how are they configured?
Set breakpoint(s) on the constructor(s) of the rabbitListenerContainerFactory bean and see which instances you are creating.
Looking up the stack trace may give you information about why this bean is created, so you can remove the duplicate from your spring configuration.
You can also add breakpoints, where the rabbit connection properties are set.
"connect timed out" also appears, when the given ip is wrong.
Anyway I would not recommend to set the properties in the build script, instead point to the property files on the command line, when you start the application. That allows you to use your build in different environments.
See howto-properties-and-configuration
Why it is throwing while building the jar?
You wrote you are setting the properties with a script during build.
This means that the tests are using those properties and now the tests are failing, may be because the rabbit mq server is not reachable with the provided properties or is not up.
As long as you are overriding beans, you do not really know which instance you use, so you dont really know which properties you use.
Try to log it out, than I am sure you will see....
You can't "lazy load" beans that implement SmartLifecycle (such as the listener container) because the context has to load the bean to call isAutoStartup() to see whether or not the bean should be started.
If the context is being loaded while "building the jar", you must have test cases that are using the beans. You can set autoStartup to false - but your tests will probably fail then.
You can skip running the tests with -DskipTests=true (maven) or -x test (gradle).
I have the same problem in my tests. I don't use rabbit and because the timeouts occur the tests duration increases.
As a simple workaround, you can disable the configuration of queues, exchanges etc. during tests using spring profiles.
Example:
Having the configuration that is disabled if the spring profile "no_rabbit" is present.
#Configuration
#Profile("!no_rabbit")
public class RabbitMQConfig {
#Bean
public Queue queue() {
return QueueBuilder.durable("NAMW").withArgument("x-message-ttl", 3600).build();
}
// more definitions of bean, exchanges etc.
}
Then, in the test simply add the profile "no_rabbit".
#RunWith(SpringRunner.class)
#ActiveProfiles({ "no_rabbit" })
public class TestClass {
...
}
The drawbacks of this approach is that you have to add the profile in every single test that don't uses rabbit. But for my case it's ok until I have a better solution.
I'm using a yaml configuration to configure my spring boot application. the .yaml has only port configuration for the server. However, when I run the app the YAML configuration file seems to not pick the port number from .yaml file. I have provided my yaml and console output below. Not sure why the server doesn't startup at 8282 and still starts with default.
application.yaml configuration
server:
port:8282
console output
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.2.6.RELEASE)
10:33:51 INFO com.vti.Application logStarting Starting Application on TUSGA00FLKHT01Q with PID 5408 (C:\svn-repository\ivr-callcenter-common-services\target\classes started by v579424 in C:\svn-repository\ivr-callcenter-common-services)
10:33:51 DEBUG com.vti.Application logStarting Running with Spring Boot v1.2.6.RELEASE, Spring v4.1.7.RELEASE
10:33:51 INFO ntext.embedded.AnnotationConfigEmbeddedWebApplicationContext prepareRefresh Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3b2c72c2: startup date [Wed Sep 30 10:33:51 EDT 2015]; root of context hierarchy
10:33:52 INFO rg.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [spring/beans.xml]
10:33:53 INFO ngframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition Overriding bean definition for bean 'mvcContentNegotiationManager': replacing [Root bean: class [org.springframework.web.accept.ContentNegotiationManagerFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration; factoryMethodName=mvcContentNegotiationManager; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]]
10:33:53 INFO ngframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition Overriding bean definition for bean 'mvcResourceUrlProvider': replacing [Root bean: class [org.springframework.web.servlet.resource.ResourceUrlProvider]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration; factoryMethodName=mvcResourceUrlProvider; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]]
10:33:53 INFO ngframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition Overriding bean definition for bean 'mvcPathMatcher': replacing [Root bean: class [org.springframework.util.AntPathMatcher]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration; factoryMethodName=mvcPathMatcher; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]]
10:33:53 INFO ngframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition Overriding bean definition for bean 'mvcUrlPathHelper': replacing [Root bean: class [org.springframework.web.util.UrlPathHelper]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration; factoryMethodName=mvcUrlPathHelper; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]]
10:33:53 INFO rk.context.annotation.ConfigurationClassBeanDefinitionReader iddenByExistingDefinition Skipping bean definition for [BeanMethod:name=mvcUriComponentsContributor,declaringClass=org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport]: a definition for bean 'mvcUriComponentsContributor' already exists. This top-level bean definition is considered as an override.
10:33:53 INFO ngframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
10:33:54 INFO framework.beans.factory.config.PropertyPlaceholderConfigurer loadProperties Loading properties file from class path resource [framework_dev.properties]
10:33:54 INFO framework.beans.factory.config.PropertyPlaceholderConfigurer loadProperties Loading properties file from class path resource [data/testdata/testdata_dev.properties]
10:33:54 INFO framework.beans.factory.config.PropertyPlaceholderConfigurer loadProperties Loading properties file from class path resource [db/db_dev.properties]
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$3e9fd57a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'transactionAttributeSource' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'transactionInterceptor' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [class org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$a5fd9fd8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'cacheOperationSource' of type [class org.springframework.cache.annotation.AnnotationCacheOperationSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'cacheInterceptor' of type [class org.springframework.cache.interceptor.CacheInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:54 INFO t.PostProcessorRegistrationDelegate$BeanPostProcessorChecker rocessAfterInitialization Bean 'org.springframework.cache.config.internalCacheAdvisor' of type [class org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
10:33:55 INFO .boot.context.embedded.tomcat.TomcatEmbeddedServletContainer initialize Tomcat initialized with port(s): 8080 (http)
10:33:55 INFO org.springframework.web.context.ContextLoader ddedWebApplicationContext Root WebApplicationContext: initialization completed in 4473 ms
10:33:57 INFO pringframework.boot.context.embedded.ServletRegistrationBean onStartup Mapping servlet: 'dispatcherServlet' to [/]
10:33:57 INFO springframework.boot.context.embedded.FilterRegistrationBean configure Mapping filter: 'characterEncodingFilter' to: [/*]
10:33:57 INFO springframework.boot.context.embedded.FilterRegistrationBean configure Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
10:33:57 INFO org.springframework.oxm.jaxb.Jaxb2Marshaller ateJaxbContextFromClasses Creating JAXBContext with classes to be bound [class com.vzt.ws.stubs.cca.ivrinfows.CallData,class com.vzt.ws.stubs.cca.ivrinfows.GetCallData,class com.vzt.ws.stubs.cca.ivrinfows.IvrTransfer,class com.vzt.ws.stubs.cca.ivrinfows.IvrTransferred,class com.vzt.ws.stubs.weather.Alert,class com.vzt.ws.stubs.weather.DataSet,class com.vzt.ws.stubs.weather.GetAll,class com.vzt.ws.stubs.weather.GetAllResponse,class com.vzt.ws.stubs.weather.Weather,class com.hughestelematics.htimessageheader.MessageHeaderT,class com.hughestelematics.xmlns.webservicesr.WebserviceSRRequest,class com.hughestelematics.xmlns.webservicesr.WebserviceSRReturn,class com.siebel.customui.UpdateSRTypeInput,class com.siebel.customui.UpdateSRTypeOutput,class com.hti.xmlns.webservicepstn.ObjectFactory,class com.hti.xmlns.webservicepstn.PSTNRequestT,class com.hti.xmlns.webservicepstn.PSTNReturnT,class com.hti.xmlns.webservicepstn.PSTNOutput,class com.vti.ws.stubs.provisioning.ApplicationBasicType,class com.vti.ws.stubs.provisioning.ApplicationDetailListRequest,class com.vti.ws.stubs.provisioning.ApplicationDetailListResponse,class com.vti.ws.stubs.provisioning.ApplicationType]
10:33:58 INFO org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName Loaded JDBC driver: oracle.jdbc.OracleDriver
10:33:58 INFO .springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ctiAgentTransfer/{profileId}],methods=[GET]}" onto public com.vti.callcenter.model.TransferProfile com.vti.callcenter.web.CTIAgentTransferController.getTransferProfileByProfileId(java.lang.Integer)
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ctiAgentTransfer/]}" onto public java.util.HashMap<java.lang.Integer, com.vti.callcenter.model.TransferProfile> com.vti.callcenter.web.CTIAgentTransferController.getTransferProfiles()
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/customAgentRoute/]}" onto public java.util.List<com.vti.callcenter.model.CustomRoute> com.vti.callcenter.web.CustomAgentRouteController.customAgentRoutes()
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/customAgentRoute/{mdn}],methods=[GET]}" onto public com.vti.callcenter.model.CustomRoute com.vti.callcenter.web.CustomAgentRouteController.getCustomRougeByMdn(java.lang.String)
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ivrService/getAllRoutes],methods=[GET],produces=[application/json]}" onto public com.vti.callcenter.model.RouteParamsMap com.vti.callcenter.web.IVRRestController.getAllRouteParms()
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ivrService/validateDnis],methods=[GET],produces=[text/plain]}" onto public java.lang.String com.vti.callcenter.web.IVRRestController.validateDnis(java.lang.String,java.lang.String)
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/middleware/getDeviceDetails/{mdn}],methods=[GET]}" onto public com.vti.callcenter.model.GetDeviceDetailsResponse com.vti.callcenter.web.MiddlewareRestController.getDeviceDetails(java.lang.String)
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3b2c72c2: startup date [Wed Sep 30 10:33:51 EDT 2015]; root of context hierarchy
10:33:58 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3b2c72c2: startup date [Wed Sep 30 10:33:51 EDT 2015]; root of context hierarchy
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3b2c72c2: startup date [Wed Sep 30 10:33:51 EDT 2015]; root of context hierarchy
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ctiAgentTransfer/{profileId}],methods=[GET]}" onto public com.vti.callcenter.model.TransferProfile com.vti.callcenter.web.CTIAgentTransferController.getTransferProfileByProfileId(java.lang.Integer)
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ctiAgentTransfer/]}" onto public java.util.HashMap<java.lang.Integer, com.vti.callcenter.model.TransferProfile> com.vti.callcenter.web.CTIAgentTransferController.getTransferProfiles()
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/customAgentRoute/]}" onto public java.util.List<com.vti.callcenter.model.CustomRoute> com.vti.callcenter.web.CustomAgentRouteController.customAgentRoutes()
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/customAgentRoute/{mdn}],methods=[GET]}" onto public com.vti.callcenter.model.CustomRoute com.vti.callcenter.web.CustomAgentRouteController.getCustomRougeByMdn(java.lang.String)
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ivrService/getAllRoutes],methods=[GET],produces=[application/json]}" onto public com.vti.callcenter.model.RouteParamsMap com.vti.callcenter.web.IVRRestController.getAllRouteParms()
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/ivrService/validateDnis],methods=[GET],produces=[text/plain]}" onto public java.lang.String com.vti.callcenter.web.IVRRestController.validateDnis(java.lang.String,java.lang.String)
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/service/middleware/getDeviceDetails/{mdn}],methods=[GET]}" onto public com.vti.callcenter.model.GetDeviceDetailsResponse com.vti.callcenter.web.MiddlewareRestController.getDeviceDetails(java.lang.String)
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
10:33:59 INFO b.servlet.mvc.method.annotation.RequestMappingHandlerMapping registerHandlerMethod Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
10:33:59 INFO .springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
10:33:59 INFO .springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
10:33:59 INFO .springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
10:33:59 INFO pringframework.jmx.export.annotation.AnnotationMBeanExporter terSingletonsInstantiated Registering beans for JMX exposure on startup
10:33:59 INFO .boot.context.embedded.tomcat.TomcatEmbeddedServletContainer start Tomcat started on port(s): 8080 (http)
10:33:59 INFO com.vti.Application logStarted Started Application in 8.7 seconds (JVM running for 9.813)
After copy pasting your code from this page straight into my project it also didn't work. It had 2 tabs in front of port which it needs to be spaces and between port, :, and 8282 there was no space(It requires one space apparently) both of these issues caused it to load as port 8080 for me.(Failed silently)
Instead I came up with this
server:
port: 8282
And this worked for me.