spring initialization hangs for few min - spring

When starting Spring it will get hang for like 5 min
If you look at the log WebApplicationContext: initialization happens in 16:36
the next message is Initialized JPA EntityManagerFactory happens in 16:41 almost 5 min later
What could be the issue?
Thank you!
2019-05-09 16:36:59.619 INFO 18120 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 10419 ms
2019-05-09 16:41:18.196 INFO 18120 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'portal'
2019-05-09 16:41:18.362 INFO 18120 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2019-05-09 16:41:26.759 INFO 18120 --- [ restartedMain] s.s.l.DefaultSpringSecurityContextSource : URL 'ldap://ldap01:389', root DN is ''
2019-05-09 16:41:26.863 INFO 18120 --- [ restartedMain] .s.s.l.u.DefaultLdapAuthoritiesPopulator : groupSearchBase is empty. Searches will be performed from the context source base
2019-05-09 16:41:27.128 DEBUG 18120 --- [ restartedMain] com.xerox.printerfarm.config.SecurityConfig : secureEndPoints => /printers/**,/employees/user/**
2019-05-09 16:41:27.984 INFO 18120 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#6935ce05, org.springframework.security.web.context.SecurityContextPersistenceFilter#5c58f813, org.springframework.security.web.header.HeaderWriterFilter#54fe23e9, org.springframework.security.web.authentication.logout.LogoutFilter#1f81a1d8, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#43759aa7, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter#40017880, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter#60c590e1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#64a8529a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#4cd90a9, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#6dd6807b, org.springframework.security.web.session.SessionManagementFilter#b218290, org.springframework.security.web.access.ExceptionTranslationFilter#b52b511, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#6d4bb1]
2019-05-09 16:41:28.354 INFO 18120 --- [ restartedMai
UPDATE
with some debug code from logger.org.springframework set to debug
2019-05-14 11:45:16.891 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name 'entityManagerFactory' via factory method to bean named 'entityManagerFactoryBuilder'
2019-05-14 11:45:16.891 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name 'entityManagerFactory' via factory method to bean named 'dataSource'
2019-05-14 11:45:16.995 DEBUG 22824 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'portal'
2019-05-14 11:45:18.665 DEBUG 22824 --- [ restartedMain] o.s.j.d.DriverManagerDataSource : Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:#devserv1:1521/DEV01SID]
2019-05-14 11:45:24.169 DEBUG 22824 --- [ restartedMain] o.s.j.d.DriverManagerDataSource : Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:#devserv1:1521/DEV01SID]
2019-05-14 11:45:24.703 DEBUG 22824 --- [ restartedMain] o.s.j.d.DriverManagerDataSource : Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:#devserv1:1521/DEV01SID]
2019-05-14 11:46:14.229 DEBUG 22824 --- [alina-utility-2] org.apache.catalina.session.ManagerBase : Start expire sessions StandardManager at 1557848774228 sessioncount 0
2019-05-14 11:46:14.229 DEBUG 22824 --- [alina-utility-2] org.apache.catalina.session.ManagerBase : End expire sessions StandardManager processingTime 1 expired sessions: 0
---- 1 min here
2019-05-14 11:47:14.240 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase : Start expire sessions StandardManager at 1557848834240 sessioncount 0
2019-05-14 11:47:14.240 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase : End expire sessions StandardManager processingTime 0 expired sessions: 0
---- 1 min here
2019-05-14 11:48:14.246 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase : Start expire sessions StandardManager at 1557848894246 sessioncount 0
2019-05-14 11:48:14.246 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase : End expire sessions StandardManager processingTime 0 expired sessions: 0
---- 1 min here
2019-05-14 11:49:13.998 INFO 22824 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'portal'
2019-05-14 11:49:14.009 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'delegatingApplicationListener'
2019-05-14 11:49:14.018 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'liveReloadServerEventListener'
2019-05-14 11:49:14.019 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$LiveReloadConfiguration'
2019-05-14 11:49:14.031 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'optionalLiveReloadServer'
2019-05-14 11:49:14.035 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties'
2019-05-14 11:49:14.043 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name 'liveReloadServer' via factory method to bean named 'spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties'
2019-05-14 11:49:14.071 DEBUG 22824 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name 'optionalLiveReloadServer' via factory method to bean named 'liveReloadServer'
2019-05-14 11:49:14.083 DEBUG 22824 --- [ restartedMain] o.s.b.d.livereload.LiveReloadServer : Starting live reload server on port 35729

Related

Hibernate - Dialect configured but still getting error

I'm updating a JHipster microservice and found some issues when running the app in production environment. The application crashes with a strange Hibernate error:
2020-10-22 10:59:12.755 INFO 1 --- [ main] com.hazelcast.core.LifecycleService : [172.18.0.3]:5701 [dev] [3.12.7] [172.18.0.3]:5701 is STARTED
2020-10-22 10:59:13.066 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : Driver class org.postgresql.Driver found in Thread context class loader jdk.internal.loader.ClassLoaders$AppClassLoader#4ae3c1cd
2020-10-22 10:59:13.868 INFO 1 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1603364353868, current=UP, previous=STARTING]
2020-10-22 10:59:13.946 INFO 1 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_MISCELLANEOUS/miscellaneous:2b1983b040c376288a15e1a536a4f8f9: registering service...
2020-10-22 10:59:14.182 INFO 1 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_MISCELLANEOUS/miscellaneous:2b1983b040c376288a15e1a536a4f8f9 - registration status: 204
2020-10-22 10:59:14.257 INFO 1 --- [ main] t.h.e.m.config.WebConfigurer : Web application configuration, using profiles: prod
2020-10-22 10:59:14.258 INFO 1 --- [ main] t.h.e.m.config.WebConfigurer : Web application fully configured
2020-10-22 10:59:14.961 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : Hikari - configuration:
2020-10-22 10:59:14.969 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : allowPoolSuspension.............false
2020-10-22 10:59:14.969 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : autoCommit......................false
2020-10-22 10:59:14.969 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : catalog.........................none
2020-10-22 10:59:14.970 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionInitSql...............none
2020-10-22 10:59:14.970 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTestQuery.............none
2020-10-22 10:59:14.971 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTimeout...............30000
2020-10-22 10:59:14.971 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSource......................none
2020-10-22 10:59:14.971 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceClassName.............none
2020-10-22 10:59:14.972 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceJNDI..................none
2020-10-22 10:59:15.042 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceProperties............{password=<masked>}
2020-10-22 10:59:15.043 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : driverClassName................."org.postgresql.Driver"
2020-10-22 10:59:15.043 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : exceptionOverrideClassName......none
2020-10-22 10:59:15.044 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckProperties...........{}
2020-10-22 10:59:15.045 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckRegistry.............none
2020-10-22 10:59:15.045 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : idleTimeout.....................600000
2020-10-22 10:59:15.047 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : initializationFailTimeout.......1
2020-10-22 10:59:15.048 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : isolateInternalQueries..........false
2020-10-22 10:59:15.049 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : jdbcUrl.........................jdbc:postgresql://postgresql:5432/miscellaneous?socketTimeout=30
2020-10-22 10:59:15.050 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : leakDetectionThreshold..........15000
2020-10-22 10:59:15.050 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : maxLifetime.....................1800000
2020-10-22 10:59:15.050 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : maximumPoolSize.................5
2020-10-22 10:59:15.051 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : metricRegistry..................none
2020-10-22 10:59:15.051 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : metricsTrackerFactory...........none
2020-10-22 10:59:15.051 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : minimumIdle.....................5
2020-10-22 10:59:15.054 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : password........................<masked>
2020-10-22 10:59:15.055 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : poolName........................"Hikari"
2020-10-22 10:59:15.056 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : readOnly........................false
2020-10-22 10:59:15.057 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : registerMbeans..................false
2020-10-22 10:59:15.059 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : scheduledExecutor...............none
2020-10-22 10:59:15.059 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : schema..........................none
2020-10-22 10:59:15.059 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : threadFactory...................internal
2020-10-22 10:59:15.060 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : transactionIsolation............default
2020-10-22 10:59:15.061 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : username........................"teste"
2020-10-22 10:59:15.064 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : validationTimeout...............5000
2020-10-22 10:59:15.065 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : Hikari - Starting...
2020-10-22 10:59:15.445 DEBUG 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : Hikari - Added connection org.postgresql.jdbc.PgConnection#47d6a31a
2020-10-22 10:59:15.450 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : Hikari - Start completed.
2020-10-22 10:59:15.550 DEBUG 1 --- [ari housekeeper] com.zaxxer.hikari.pool.HikariPool : Hikari - Pool stats (total=1, active=1, idle=0, waiting=0)
2020-10-22 10:59:15.566 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : Hikari - Added connection org.postgresql.jdbc.PgConnection#c2d5356
2020-10-22 10:59:15.573 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : Hikari - Added connection org.postgresql.jdbc.PgConnection#2eaaca3
2020-10-22 10:59:15.643 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : Hikari - Added connection org.postgresql.jdbc.PgConnection#6d53826
2020-10-22 10:59:15.654 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : Hikari - Added connection org.postgresql.jdbc.PgConnection#43d7a698
2020-10-22 10:59:15.659 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : Hikari - After adding stats (total=5, active=1, idle=4, waiting=0)
2020-10-22 10:59:28.156 WARN 1 --- [scoveryClient-0] c.netflix.discovery.TimedSupervisorTask : task supervisor timed out
java.util.concurrent.TimeoutException: null
at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:68)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
2020-10-22 10:59:30.453 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : Hikari - Shutdown initiated...
2020-10-22 10:59:30.454 DEBUG 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : Hikari - Before shutdown stats (total=5, active=0, idle=5, waiting=0)
2020-10-22 10:59:30.465 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : Hikari - Closing connection org.postgresql.jdbc.PgConnection#47d6a31a: (connection evicted)
2020-10-22 10:59:30.471 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : Hikari - Closing connection org.postgresql.jdbc.PgConnection#c2d5356: (connection evicted)
2020-10-22 10:59:30.544 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : Hikari - Closing connection org.postgresql.jdbc.PgConnection#2eaaca3: (connection evicted)
2020-10-22 10:59:30.545 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : Hikari - Closing connection org.postgresql.jdbc.PgConnection#6d53826: (connection evicted)
2020-10-22 10:59:30.548 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : Hikari - Closing connection org.postgresql.jdbc.PgConnection#43d7a698: (connection evicted)
2020-10-22 10:59:30.564 DEBUG 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : Hikari - After shutdown stats (total=0, active=0, idle=0, waiting=0)
2020-10-22 10:59:30.564 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : Hikari - Shutdown completed.
2020-10-22 10:59:30.565 WARN 1 --- [ main] i.g.j.c.liquibase.AsyncSpringLiquibase : Warning, Liquibase took more than 5 seconds to start up!
2020-10-22 10:59:31.050 DEBUG 1 --- [ main] o.hibernate.jpa.internal.util.LogHelper : PersistenceUnitInfo [
name: default
persistence provider classname: null
classloader: jdk.internal.loader.ClassLoaders$AppClassLoader#4ae3c1cd
excludeUnlistedClasses: true
JTA datasource: null
Non JTA datasource: HikariDataSource (Hikari)
Transaction type: RESOURCE_LOCAL
PU root URL: file:/app/libs/commons-microservice-1.1.0.jar
Shared Cache Mode: UNSPECIFIED
Validation Mode: AUTO
Jar files URLs []
Managed classes names [
tech.h2r.ecommerce.miscellaneous.domain.AbstractAuditingEntity
tech.h2r.ecommerce.miscellaneous.domain.Banner
tech.h2r.ecommerce.miscellaneous.domain.CustomPage
tech.h2r.ecommerce.miscellaneous.domain.DirectMail
tech.h2r.ecommerce.miscellaneous.domain.PersistentAuditEvent
tech.h2r.ecommerce.miscellaneous.domain.Theme
tech.h2r.commons.microservice.domain.ConsumedMessage
tech.h2r.commons.microservice.domain.ProducedMessage
tech.h2r.commons.domain.Config]
Mapping files names []
Properties []
2020-10-22 10:59:31.064 DEBUG 1 --- [ main] o.h.i.internal.IntegratorServiceImpl : Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
2020-10-22 10:59:31.066 DEBUG 1 --- [ main] o.h.i.internal.IntegratorServiceImpl : Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2020-10-22 10:59:31.068 DEBUG 1 --- [ main] o.h.i.internal.IntegratorServiceImpl : Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2020-10-22 10:59:31.270 INFO 1 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.15.Final
2020-10-22 10:59:31.343 DEBUG 1 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2020-10-22 10:59:31.851 DEBUG 1 --- [ main] o.hibernate.service.spi.ServiceBinding : Overriding existing service binding [org.hibernate.secure.spi.JaccService]
2020-10-22 10:59:31.867 DEBUG 1 --- [ main] o.h.c.internal.RegionFactoryInitiator : Cannot default RegionFactory based on registered strategies as `[]` RegionFactory strategies were registered
2020-10-22 10:59:31.868 DEBUG 1 --- [ main] o.h.c.internal.RegionFactoryInitiator : Cache region factory : org.hibernate.cache.internal.NoCachingRegionFactory
2020-10-22 10:59:31.960 INFO 1 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-10-22 10:59:32.769 DEBUG 1 --- [ main] o.h.boot.internal.BootstrapContextImpl : Injecting JPA temp ClassLoader [org.springframework.instrument.classloading.SimpleThrowawayClassLoader#20852557] into BootstrapContext; was [null]
2020-10-22 10:59:32.770 DEBUG 1 --- [ main] o.h.boot.internal.ClassLoaderAccessImpl : ClassLoaderAccessImpl#injectTempClassLoader(org.springframework.instrument.classloading.SimpleThrowawayClassLoader#20852557) [was null]
2020-10-22 10:59:32.771 DEBUG 1 --- [ main] o.h.boot.internal.BootstrapContextImpl : Injecting ScanEnvironment [org.hibernate.jpa.boot.internal.StandardJpaScanEnvironmentImpl#41ca7df9] into BootstrapContext; was [null]
2020-10-22 10:59:32.842 DEBUG 1 --- [ main] o.h.boot.internal.BootstrapContextImpl : Injecting ScanOptions [org.hibernate.boot.archive.scan.internal.StandardScanOptions#4f0908de] into BootstrapContext; was [org.hibernate.boot.archive.scan.internal.StandardScanOptions#19469022]
2020-10-22 10:59:33.153 DEBUG 1 --- [ main] o.h.boot.internal.BootstrapContextImpl : Injecting JPA temp ClassLoader [null] into BootstrapContext; was [org.springframework.instrument.classloading.SimpleThrowawayClassLoader#20852557]
2020-10-22 10:59:33.160 DEBUG 1 --- [ main] o.h.boot.internal.ClassLoaderAccessImpl : ClassLoaderAccessImpl#injectTempClassLoader(null) [was org.springframework.instrument.classloading.SimpleThrowawayClassLoader#20852557]
2020-10-22 10:59:33.243 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [uuid2] -> [org.hibernate.id.UUIDGenerator]
2020-10-22 10:59:33.243 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [guid] -> [org.hibernate.id.GUIDGenerator]
2020-10-22 10:59:33.244 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [uuid] -> [org.hibernate.id.UUIDHexGenerator]
2020-10-22 10:59:33.245 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [uuid.hex] -> [org.hibernate.id.UUIDHexGenerator]
2020-10-22 10:59:33.245 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [assigned] -> [org.hibernate.id.Assigned]
2020-10-22 10:59:33.247 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [identity] -> [org.hibernate.id.IdentityGenerator]
2020-10-22 10:59:33.249 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [select] -> [org.hibernate.id.SelectGenerator]
2020-10-22 10:59:33.251 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [sequence] -> [org.hibernate.id.enhanced.SequenceStyleGenerator]
2020-10-22 10:59:33.253 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [seqhilo] -> [org.hibernate.id.SequenceHiLoGenerator]
2020-10-22 10:59:33.254 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [increment] -> [org.hibernate.id.IncrementGenerator]
2020-10-22 10:59:33.255 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [foreign] -> [org.hibernate.id.ForeignGenerator]
2020-10-22 10:59:33.256 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [sequence-identity] -> [org.hibernate.id.SequenceIdentityGenerator]
2020-10-22 10:59:33.256 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [enhanced-sequence] -> [org.hibernate.id.enhanced.SequenceStyleGenerator]
2020-10-22 10:59:33.258 DEBUG 1 --- [ main] .i.f.i.DefaultIdentifierGeneratorFactory : Registering IdentifierGenerator strategy [enhanced-table] -> [org.hibernate.id.enhanced.TableGenerator]
2020-10-22 10:59:33.262 WARN 1 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata : HikariDataSource HikariDataSource (Hikari) has been closed.
2020-10-22 10:59:33.266 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [tech/h2r/ecommerce/miscellaneous/config/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2020-10-22 10:59:33.365 INFO 1 --- [ main] com.hazelcast.core.LifecycleService : [172.18.0.3]:5701 [dev] [3.12.7] [172.18.0.3]:5701 is SHUTTING_DOWN
2020-10-22 10:59:33.449 INFO 1 --- [ main] com.hazelcast.instance.Node : [172.18.0.3]:5701 [dev] [3.12.7] Shutting down connection manager...
2020-10-22 10:59:33.457 INFO 1 --- [ main] com.hazelcast.instance.Node : [172.18.0.3]:5701 [dev] [3.12.7] Shutting down node engine...
2020-10-22 10:59:33.547 INFO 1 --- [ main] com.hazelcast.instance.NodeExtension : [172.18.0.3]:5701 [dev] [3.12.7] Destroying node NodeExtension.
2020-10-22 10:59:33.548 INFO 1 --- [ main] com.hazelcast.instance.Node : [172.18.0.3]:5701 [dev] [3.12.7] Hazelcast Shutdown is completed in 101 ms.
2020-10-22 10:59:33.549 INFO 1 --- [ main] com.hazelcast.core.LifecycleService : [172.18.0.3]:5701 [dev] [3.12.7] [172.18.0.3]:5701 is SHUTDOWN
2020-10-22 10:59:33.550 INFO 1 --- [ main] t.h.e.m.config.CacheConfiguration : Closing Cache Manager
2020-10-22 10:59:33.554 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
2020-10-22 10:59:36.557 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Unregistering ...
2020-10-22 10:59:36.666 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : DiscoveryClient_MISCELLANEOUS/miscellaneous:2b1983b040c376288a15e1a536a4f8f9 - deregister status: 200
2020-10-22 10:59:36.744 INFO 1 --- [ main] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
2020-10-22 10:59:36.951 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [tech/h2r/ecommerce/miscellaneous/config/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at tech.h2r.ecommerce.miscellaneous.MiscellaneousApp.main(MiscellaneousApp.java:44)
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:176)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1214)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1245)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:378)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
... 14 common frames omitted
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
... 31 common frames omitted
The error says the problem is with dialect, but it is configured correctly:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://postgresql:5432/miscellaneous?socketTimeout=30
hikari:
poolName: Hikari
auto-commit: false
jpa:
database-platform: io.github.jhipster.domain.util.FixedPostgreSQL10Dialect
show-sql: false
open-in-view: false
properties:
hibernate.jdbc.time_zone: UTC
hibernate.id.new_generator_mappings: true
hibernate.connection.provider_disables_autocommit: true
hibernate.cache.use_second_level_cache: true
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: false
hibernate.jdbc.batch_size: 25
hibernate.order_inserts: true
hibernate.order_updates: true
hibernate.query.fail_on_pagination_over_collection_fetch: true
hibernate.query.in_clause_parameter_padding: true
hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory
hibernate.cache.use_minimal_puts: true
hibernate.cache.hazelcast.instance_name: miscellaneous
hibernate.cache.hazelcast.use_lite_member: true
hibernate:
ddl-auto: none
naming:
physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
What could be causing this problem?
Instead of use the injected jpaVendorAdapter in my EntityManager, I was creating it:
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, SchemaPerTenantConnectionProvider schemaPerTenantConnectionProvider, HeaderTenantIdentifierResolver headerTenantIdentifierResolver) {
...
em.setJpaVendorAdapter(jpaVendorAdapter());
em.setJpaPropertyMap(properties);
return em;
}
simply using the injected bean solved this problem:
#Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, SchemaPerTenantConnectionProvider schemaPerTenantConnectionProvider, HeaderTenantIdentifierResolver headerTenantIdentifierResolver, JpaVendorAdapter jpaVendorAdapter) {
...
em.setJpaVendorAdapter(jpaVendorAdapter);
em.setJpaPropertyMap(properties);
return em;
}
Add the dialect to the properties under the name hibernate.dialect.

Spring cloud Turbine service is not subscribed on Rabbit stream

In my spring cloud application I want configure turbine service for dashboard. Example below:
server:
port: 0
turbine:
amqp:
port: 8989
---
spring:
profiles: docker
rabbitmq:
host: rabbitmq
turbine:
clusterNameExpression: new String("default")
appConfig: card-statement
combineHostPort: true
eureka:
instance:
preferIpAddress: true
client:
serviceUrl:
defaultZone: http://discovery-service:8761/eureka/
server:
port: 8989
Starting turbine service I have no errors. Docker contained in compose is registered as rabbitmq. card-statement is a service with some #HystrixCommand(fallbackMethod = to be observed on dashboard...
2019-05-14 16:12:57.288 INFO 6 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2019-05-14 16:12:57.373 INFO 6 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2019-05-14 16:12:57.441 INFO 6 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2019-05-14 16:12:58.494 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration$$EnhancerBySpringCGLIB$$1a0a1e3f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-14 16:12:58.617 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration' of type [org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration$$EnhancerBySpringCGLIB$$f59c295f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-14 16:12:58.704 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration$$EnhancerBySpringCGLIB$$2e83d22c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-14 16:12:58.961 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanServer' of type [com.sun.jmx.mbeanserver.JmxMBeanServer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-14 16:12:59.122 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationDisposableAutoCreatedBeans' of type [org.springframework.integration.config.annotation.Disposables] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-14 16:12:59.354 INFO 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$cb32660d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-05-14 16:13:01.701 WARN 6 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2019-05-14 16:13:01.889 INFO 6 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2019-05-14 16:13:01.889 INFO 6 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 15942 ms
2019-05-14 16:13:02.653 WARN 6 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-05-14 16:13:02.653 INFO 6 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-05-14 16:13:02.745 INFO 6 --- [ main] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration#70f59913
2019-05-14 16:13:08.116 WARN 6 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2019-05-14 16:13:08.116 INFO 6 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2019-05-14 16:13:10.392 INFO 6 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-05-14 16:13:19.434 INFO 6 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2019-05-14 16:13:20.108 INFO 6 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2019-05-14 16:13:21.732 INFO 6 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel turbineStreamInput
2019-05-14 16:13:22.397 INFO 6 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel errorChannel
2019-05-14 16:13:22.608 INFO 6 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel nullChannel
2019-05-14 16:13:22.824 INFO 6 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageHandler errorLogger
2019-05-14 16:13:23.068 INFO 6 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageHandler hystrixStreamAggregator.sendToSubject.serviceActivator
2019-05-14 16:13:23.234 INFO 6 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2019-05-14 16:13:23.235 INFO 6 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'turbine-1.errorChannel' has 1 subscriber(s).
2019-05-14 16:13:23.235 INFO 6 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
2019-05-14 16:13:23.236 INFO 6 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {service-activator:hystrixStreamAggregator.sendToSubject.serviceActivator} as a subscriber to the 'turbineStreamInput' channel
2019-05-14 16:13:23.237 INFO 6 --- [ main] o.s.c.s.m.DirectWithAttributesChannel : Channel 'turbine-1.turbineStreamInput' has 1 subscriber(s).
2019-05-14 16:13:23.240 INFO 6 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started hystrixStreamAggregator.sendToSubject.serviceActivator
2019-05-14 16:13:23.342 INFO 6 --- [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
2019-05-14 16:13:23.619 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
2019-05-14 16:13:24.657 INFO 6 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON encoding codec LegacyJacksonJson
2019-05-14 16:13:24.657 INFO 6 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using JSON decoding codec LegacyJacksonJson
2019-05-14 16:13:25.453 INFO 6 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML encoding codec XStreamXml
2019-05-14 16:13:25.454 INFO 6 --- [ main] c.n.d.provider.DiscoveryJerseyProvider : Using XML decoding codec XStreamXml
2019-05-14 16:13:26.240 INFO 6 --- [ main] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
2019-05-14 16:13:26.352 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Disable delta property : false
2019-05-14 16:13:26.352 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Single vip registry refresh property : null
2019-05-14 16:13:26.352 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Force full registry fetch : false
2019-05-14 16:13:26.352 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Application is null : false
2019-05-14 16:13:26.352 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Registered Applications size is zero : true
2019-05-14 16:13:26.352 INFO 6 --- [ main] com.netflix.discovery.DiscoveryClient : Application version is -1: true
It seems some topics was created. Checking rabbit I do not see turbine service connection. Also trying to verify turbine.stream on dashboard I can see that stream is connected to dashboard, but no updates (card-statement service endpoints registered in hystrix was used). And last thing. I expected turbine is connected to RabbitMQ. I have not detected turbine connection to rabbit via admin console.
Issue
Is there any ideas how to fix turbine?
Turbine code:
#SpringBootApplication
#EnableTurbineStream
#EnableEurekaClient
#EnableDiscoveryClient
public class TurbineApplication {
public static void main(String[] args) {
SpringApplication.run(TurbineApplication.class, args);
}
}

Hot swap doesn't work with Spring Boot in IntelliJ

(Sorry for my poor English first of all.)
I'm using IntelliJ in two places. (just trial to know about IDE)
I'm doing the same spring boot project via git sharing gradle configuration.
I did setting for hot swap like devtools, registry.. etc) in two PC same.
But one works properly the other is not.
I did test as follow :
run spring boot app
web page works fine.
modify a controller code like adding a message to console.
and embedded tomcat automatically restart.
HERE, one pc works good (print added message perfectly)
but the other doesn't.
after tomcat automatically restart, the same url show Whitelabel Error Page.
I investigated it and found that some logs are different between two pc.
--- logs the one working good :
[ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
[ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
[ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#587affdb, org.springframework.security.web.context.SecurityContextPersistenceFilter#31140227, org.springframework.security.web.header.HeaderWriterFilter#8d6f8a9, org.springframework.web.filter.CharacterEncodingFilter#7b52656a, org.springframework.security.web.authentication.logout.LogoutFilter#79495199, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter#79292790, org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter#8f41e43, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#3851ad6a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#2585005f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#6db344a5, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#1e39862c, org.springframework.security.web.session.SessionManagementFilter#28677efc, org.springframework.security.web.access.ExceptionTranslationFilter#2a7abf09, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#2e8469aa]
[ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
[ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : 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
[ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 80 (http) with context path ''
[ restartedMain] com.community.CommunityApplication : Started CommunityApplication in 8.985 seconds (JVM running for 11.655)
[ Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
[ Thread-5] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
[ Thread-5] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
[ Thread-5] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
[ Thread-5] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
[ Thread-5] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
__ _ _
_ __ _ \ \ \ \
\/ _` | \ \ \ \
|| (_| | ) ) ) )
|_\__, | / / / /
==|___/=/_/_/_/
(v2.1.2.RELEASE)
[ restartedMain] com.community.CommunityApplication : Starting CommunityApplication on PC with PID 16868 (C:\work\IntelliJ\SpringBootCommunityWeb\out\production\classes started by in C:\work\IntelliJ\SpringBootCommunityWeb)
[ restartedMain] com.community.CommunityApplication : No active profile set, falling back to default profiles: default
[ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
[ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 40ms. Found 2 repository interfaces.
[ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$a49563c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 80 (http)
[ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
[ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.14]
[ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
[ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1177 ms
[ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...
[ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
[ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
[ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
[ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#56c75fda'
[ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
[ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
[ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#34a525ca, org.springframework.security.web.context.SecurityContextPersistenceFilter#1528961c, org.springframework.security.web.header.HeaderWriterFilter#7b2b261c, org.springframework.web.filter.CharacterEncodingFilter#63956f7c, org.springframework.security.web.authentication.logout.LogoutFilter#7246e327, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter#8fbe389, org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter#e7ddca2, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#738e18a0, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#71f1699c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#53c8ba78, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#3ed2760, org.springframework.security.web.session.SessionManagementFilter#4c4dac5a, org.springframework.security.web.access.ExceptionTranslationFilter#37fa78f5, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#74967f44]
[ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
[ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : 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
[ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 80 (http) with context path ''
[ restartedMain] com.community.CommunityApplication : Started CommunityApplication in 2.114 seconds (JVM running for 121.368)
[ restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
-- and the other one's logs that doesn't work :
[ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
[ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#8a78527, org.springframework.security.web.context.SecurityContextPersistenceFilter#7bf935e4, org.springframework.security.web.header.HeaderWriterFilter#6d018b44, org.springframework.web.filter.CharacterEncodingFilter#377ccf52, org.springframework.security.web.authentication.logout.LogoutFilter#3dd9bc77, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter#2ea4eccc, org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter#1de22b60, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#14a9769c, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#8cd9504, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#4add6362, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#2d6a7513, org.springframework.security.web.session.SessionManagementFilter#32857a38, org.springframework.security.web.access.ExceptionTranslationFilter#6c9237d8, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#3e410962]
[ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
[ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : 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
[ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 80 (http) with context path ''
[ restartedMain] com.community.CommunityApplication : Started CommunityApplication in 15.879 seconds (JVM running for 18.138)
**[p-nio-80-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
[p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
[p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 17 ms
[p-nio-80-exec-1] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory**
[ Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
[ Thread-5] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
[ Thread-5] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
[ Thread-5] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-197]
[ Thread-5] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
[ Thread-5] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
__ _ _
_ __ _ \ \ \ \
\/ _` | \ \ \ \
|| (_| | ) ) ) )
|_\__, | / / / /
==|___/=/_/_/_/
(v2.1.2.RELEASE)
[ restartedMain] com.community.CommunityApplication : Starting CommunityApplication on PC with PID 8468 (C:\workspace\SpringBoot\out\production\classes started by in C:\workspace\SpringBoot)
[ restartedMain] com.community.CommunityApplication : No active profile set, falling back to default profiles: default
[ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
[ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 111ms. Found 2 repository interfaces.
[ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$5ebc4d71] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 80 (http)
[ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
[ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.14]
[ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
[ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2766 ms
[ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...
[ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
[ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
[ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
[ restartedMain] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl#2812f6b8'
[ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
[ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
[ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#267bc281, org.springframework.security.web.context.SecurityContextPersistenceFilter#2afc1d8, org.springframework.security.web.header.HeaderWriterFilter#5962cf57, org.springframework.web.filter.CharacterEncodingFilter#7790e093, org.springframework.security.web.authentication.logout.LogoutFilter#77bf42d5, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter#319c14c1, org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter#37184e4e, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#5cff9178, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#97e2d0c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#46a95303, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#28faa11, org.springframework.security.web.session.SessionManagementFilter#796d63d, org.springframework.security.web.access.ExceptionTranslationFilter#732f1ea7, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#1fccb650]
[ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
[ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : 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
[ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 80 (http) with context path ''
[ restartedMain] com.community.CommunityApplication : Started CommunityApplication in 4.412 seconds (JVM running for 80.618)
[ restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
[p-nio-80-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
[p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
[p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 19 ms
Only different part is below and hot swap doesn't work if this shows in logs.
This could be a stupid question but I'm really wonder.
Do you have any suggestion for me?
**[p-nio-80-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
[p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
[p-nio-80-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 17 ms
[p-nio-80-exec-1] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory**

Spring boot - how to override the default username and password in spring security

I have a spring boot application and i am trying to implement the spring security to override the default username and password generated by spring .but its not working. spring still using the default user credentials.
#EnableWebSecurity
#Configuration
public class WebSecurityConfigurtion extends WebSecurityConfigurerAdapter {
#Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser("demo").password("demo").roles("USER").and().withUser("admin")
.password("admin").roles("USER", "ADMIN");
}
#Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().authenticated().and().httpBasic();
}
and this is my main spring boot class
#SpringBootApplication(exclude = { DataSourceAutoConfiguration.class,
DataSourceTransactionManagerAutoConfiguration.class ,SecurityAutoConfiguration.class})
#EnableAsync
#EntityScan({ "com.demo.entity" })
#EnableJpaRepositories(basePackages = {"com.demo.repositories"})
#ComponentScan({ "com.demo.controller", "com.demo.service" })
#Import({SwaggerConfig.class})
public class UdeManagerServiceApplication extends SpringBootServletInitializer {
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(UdeManagerServiceApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(UdeManagerServiceApplication.class, args);
}
This is the logs, and it shows the generated password
22:26:48.537 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
22:26:48.540 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-actuator/target/classes/, /spring-boot-devtools/target/classes/, /spring-boot/target/classes/, /spring-boot-starter-[\w-]+/, /spring-boot-autoconfigure/target/classes/, /spring-boot-starter/target/classes/]
22:26:48.540 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/C:/Work/Spring/UdeManagerService/target/classes/]
2018-10-18 22:26:48.797 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Adding PropertySource 'configurationProperties' with highest search precedence
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.4.RELEASE)
2018-10-18 22:26:49.218 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Adding PropertySource 'servletConfigInitParams' with lowest search precedence
2018-10-18 22:26:49.219 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Adding PropertySource 'servletContextInitParams' with lowest search precedence
2018-10-18 22:26:49.220 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Adding PropertySource 'systemProperties' with lowest search precedence
2018-10-18 22:26:49.221 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Adding PropertySource 'systemEnvironment' with lowest search precedence
2018-10-18 22:26:49.222 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Initialized StandardServletEnvironment with PropertySources [StubPropertySource {name='servletConfigInitParams'}, StubPropertySource {name='servletContextInitParams'}, MapPropertySource {name='systemProperties'}, SystemEnvironmentPropertySource {name='systemEnvironment'}]
2018-10-18 22:26:49.967 INFO 7652 --- [ restartedMain] c.c.U.UdeManagerServiceApplication : Starting UdeManagerServiceApplication on TRV-LT-ANSAR with PID 7652 (C:\Work\Spring\UdeManagerService\target\classes started by Ansar.Samad in C:\Work\Spring\UdeManagerService)
2018-10-18 22:26:49.973 DEBUG 7652 --- [ restartedMain] c.c.U.UdeManagerServiceApplication : Running with Spring Boot v2.0.4.RELEASE, Spring v5.0.8.RELEASE
2018-10-18 22:26:49.976 INFO 7652 --- [ restartedMain] c.c.U.UdeManagerServiceApplication : No active profile set, falling back to default profiles: default
2018-10-18 22:26:50.614 INFO 7652 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#23daa694: startup date [Thu Oct 18 22:26:50 IST 2018]; root of context hierarchy
2018-10-18 22:26:53.258 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Removing PropertySource 'defaultProperties'
2018-10-18 22:26:53.428 INFO 7652 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$82d409fb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-10-18 22:26:53.936 INFO 7652 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2018-10-18 22:26:53.959 INFO 7652 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-10-18 22:26:53.960 INFO 7652 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.32
2018-10-18 22:26:53.966 INFO 7652 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_162\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files (x86)/Java/jre1.8.0_181/bin/client;C:/Program Files (x86)/Java/jre1.8.0_181/bin;C:/Program Files (x86)/Java/jre1.8.0_181/lib/i386;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\phython3.6\Scripts\;C:\phython3.6\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jre1.8.0_131\bin;C:\cuia\bat;C:\apache-maven-3.5.0-bin\apache-maven-3.5.0\bin;JAVA_HOME;SPRING_HOME;C:\Program Files (x86)\Symantec\VIP Access Client\;C:\phython3.6;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;TESTNG_HOME;C:\TestNg\testng-6.8.jar;C:\python-3.6.5\Scripts;C:\python-3.6.5;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;;C:\Program Files\Microsoft VS Code\bin;C:\Users\Ansar.Samad\AppData\Local\Yarn\bin;C:\Users\Ansar.Samad\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Ansar.Samad\AppData\Roaming\npm;C:\spring-tool-suite-3.9.5.RELEASE-e4.8.0-win32\sts-bundle\sts-3.9.5.RELEASE;;.]
2018-10-18 22:26:54.081 INFO 7652 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-10-18 22:26:54.082 DEBUG 7652 --- [ost-startStop-1] o.s.web.context.ContextLoader : Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
2018-10-18 22:26:54.082 INFO 7652 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3468 ms
2018-10-18 22:26:54.192 INFO 7652 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-10-18 22:26:54.193 INFO 7652 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-10-18 22:26:54.193 INFO 7652 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-10-18 22:26:54.193 INFO 7652 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2018-10-18 22:26:54.194 INFO 7652 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2018-10-18 22:26:54.194 INFO 7652 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2018-10-18 22:26:54.274 DEBUG 7652 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Replacing PropertySource 'servletContextInitParams' with 'servletContextInitParams'
2018-10-18 22:26:54.308 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : Driver class com.mysql.jdbc.Driver found in Thread context class loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader#4e843ef9
2018-10-18 22:26:54.407 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : HikariPool-1 - configuration:
2018-10-18 22:26:54.409 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : allowPoolSuspension.............false
2018-10-18 22:26:54.409 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : autoCommit......................true
2018-10-18 22:26:54.409 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : catalog.........................none
2018-10-18 22:26:54.409 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : connectionInitSql...............none
2018-10-18 22:26:54.409 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : connectionTestQuery.............none
2018-10-18 22:26:54.410 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : connectionTimeout...............30000
2018-10-18 22:26:54.410 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSource......................none
2018-10-18 22:26:54.410 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSourceClassName.............none
2018-10-18 22:26:54.410 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSourceJNDI..................none
2018-10-18 22:26:54.411 DEBUG 7652 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSourceProperties............{password=<masked>}
2018-10-18 22:22018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationAuthReader': no URL paths identified
2018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationHiddenReader': no URL paths identified
2018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationHttpMethodReader': no URL paths identified
2018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationImplicitParameterReader': no URL paths identified
2018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationImplicitParametersReader': no URL paths identified
2018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationNicknameIntoUniqueIdReader': no URL paths identified
2018-10-18 22:35:45.240 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'operationNotesReader': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'systemProperties': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'systemEnvironment': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'messageSource': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'applicationEventMulticaster': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'servletContext': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'contextParameters': no URL paths identified
2018-10-18 22:35:45.256 DEBUG 6720 --- [ restartedMain] o.s.w.s.h.BeanNameUrlHandlerMapping : Rejected bean name 'contextAttributes': no URL paths identified
2018-10-18 22:35:45.256 INFO 6720 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-10-18 22:35:45.256 INFO 6720 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-10-18 22:35:45.271 DEBUG 6720 --- [ restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : Looking for exception mappings: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#275b060b: startup date [Thu Oct 18 22:35:35 IST 2018]; root of context hierarchy
2018-10-18 22:35:45.599 INFO 6720 --- [ restartedMain] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: e67dca07-3bc3-49e2-bc33-84c9643ef09a
2018-10-18 22:35:45.740 INFO 6720 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher#1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#6abf32c0, org.springframework.security.web.context.SecurityContextPersistenceFilter#b2b202e, org.springframework.security.web.header.HeaderWriterFilter#23ff67f5, org.springframework.security.web.csrf.CsrfFilter#a493c40, org.springframework.security.web.authentication.logout.LogoutFilter#776a660, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#334ce4e9, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter#1f4c6b47, org.springframework.security.web.authentication.www.BasicAuthenticationFilter#4a4c14a3, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#7793ba1a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#4edda6d8, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#3e492163, org.springframework.security.web.session.SessionManagementFilter#68661010, org.springframework.security.web.access.ExceptionTranslationFilter#6920b121, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#35279a68]
2018-10-18 22:35:45.836 INFO 6720 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2018-10-18 22:35:45.867 INFO 6720 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-10-18 22:35:45.867 INFO 6720 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-10-18 22:35:45.883 INFO 6720 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-10-18 22:35:45.883 INFO 6720 --- [ restartedMain] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147483647
2018-10-18 22:35:45.883 INFO 6720 --- [ restartedMain] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2018-10-18 22:35:45.899 INFO 6720 --- [ restartedMain] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2018-10-18 22:35:45.914 INFO 6720 --- [ restartedMain] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2018-10-18 22:35:46.086 INFO 6720 --- [ restartedMain] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: testUsingPOST_1
2018-10-18 22:35:46.101 INFO 6720 --- [ restartedMain] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getDataUsingGET_1
2018-10-18 22:35:46.117 DEBUG 6720 --- [ restartedMain] o.s.w.s.resource.ResourceUrlProvider : Looking for resource handler mappings
2018-10-18 22:35:46.117 DEBUG 6720 --- [ restartedMain] o.s.w.s.resource.ResourceUrlProvider : Found resource handler mapping: URL pattern="/**/favicon.ico", locations=[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], ServletContext resource [/], class path resource []], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver#3914bc92]
2018-10-18 22:35:46.117 DEBUG 6720 --- [ restartedMain] o.s.w.s.resource.ResourceUrlProvider : Found resource handler mapping: URL pattern="/webjars/**", locations=[class path resource [META-INF/resources/webjars/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver#3dc6f1f0]
2018-10-18 22:35:46.117 DEBUG 6720 --- [ restartedMain] o.s.w.s.resource.ResourceUrlProvider : Found resource handler mapping: URL pattern="/**", locations=[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], ServletContext resource [/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver#315362d4]
2018-10-18 22:35:47.196 DEBUG 6720 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.jdbc.JDBC4Connection#edd709c
2018-10-18 22:35:49.180 INFO 6720 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2018-10-18 22:35:49.180 DEBUG 6720 --- [ restartedMain] o.s.w.c.s.StandardServletEnvironment : Adding PropertySource 'server.ports' with highest search precedence
2018-10-18 22:35:49.180 INFO 6720 --- [ restartedMain] c.c.U.UdeManagerServiceApplication : Started UdeManagerServiceApplication in 14.132 seconds (JVM running for 14.884)
2018-10-18 22:35:50.929 DEBUG 6720 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.jdbc.JDBC4Connection#7a5e8413
In your application.properties file add this code
spring.security.user.name = root -- this is your username
spring.security.user.password = root -- this is your password
spring.security.user.roles = user --this is your role
You need to register a UserDetailsService bean.
In this case, just expose the InMemoryUserDetailsManager as a bean in your WebSecurityConfiguration.class, like this:
// expose the UserDetailsService as a bean
#Bean
#Override
public UserDetailsService userDetailsServiceBean() throws Exception {
return super.userDetailsServiceBean();
}
This can be done using following properties on application.properties or application.yaml file.
spring.security.user.name
spring.security.user.password
spring.security.user.roles
Take a look at this.
Issue fixed by adding the config package where the security classes are availble into the component scanning of the main class.

DSLContext bean takes several minutes to be created

After incorporating JOOQ into my Spring-Boot application, the internal Tomcat server boot time is more than 5 minutes!
I configured my application with JOOQ like documented on the Spring Boot documentation.
When I enable 'debug' logging you can notice it takes about 5 minutes for creating bean 'dslContext'. It seems that HikariCP is doing some stuff in the background for several minutes. This didn't happen before I configured JOOQ in my application.
Debug logging below:
21:04:59.292 [ main] DEBUG --- Creating shared instance of singleton bean 'dslContext'
21:04:59.292 [ main] DEBUG --- Creating instance of bean 'dslContext'
21:04:59.292 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.cache.config.internalCacheAdvisor'
21:04:59.292 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.retry.annotation.RetryConfiguration'
21:04:59.292 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
21:04:59.293 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor'
21:04:59.293 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration$DslContextConfiguration'
21:04:59.299 [ main] DEBUG --- Creating shared instance of singleton bean 'jooqConfiguration'
21:04:59.300 [ main] DEBUG --- Creating instance of bean 'jooqConfiguration'
21:04:59.300 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.cache.config.internalCacheAdvisor'
21:04:59.300 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.retry.annotation.RetryConfiguration'
21:04:59.300 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
21:04:59.300 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor'
21:04:59.301 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration$DslContextConfiguration'
21:04:59.376 [ main] DEBUG --- Eagerly caching bean 'jooqConfiguration' to allow for resolving potential circular references
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.cache.config.internalCacheAdvisor'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.retry.annotation.RetryConfiguration'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.cache.config.internalCacheAdvisor'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.retry.annotation.RetryConfiguration'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
21:04:59.386 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor'
21:04:59.551 [ main] DEBUG --- Finished creating instance of bean 'jooqConfiguration'
21:04:59.562 [ main] DEBUG --- Autowiring by type from bean name 'dslContext' via factory method to bean named 'jooqConfiguration'
21:04:59.942 [ main] DEBUG --- Eagerly caching bean 'dslContext' to allow for resolving potential circular references
21:05:00.023 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.cache.config.internalCacheAdvisor'
21:05:00.023 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.retry.annotation.RetryConfiguration'
21:05:00.023 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
21:05:00.027 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor'
21:05:00.027 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.cache.config.internalCacheAdvisor'
21:05:00.027 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.retry.annotation.RetryConfiguration'
21:05:00.027 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
21:05:00.027 [ main] DEBUG --- Returning cached instance of singleton bean 'org.springframework.security.methodSecurityMetadataSourceAdvisor'
21:05:20.109 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:05:50.113 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:06:20.114 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:06:50.116 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:07:13.126 [Engine[Tomcat]]] DEBUG --- Start expire sessions StandardManager at 1520539633101 sessioncount 0
21:07:13.128 [Engine[Tomcat]]] DEBUG --- End expire sessions StandardManager processingTime 27 expired sessions: 0
21:07:20.118 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:07:50.121 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:08:20.124 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:08:50.126 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:09:20.130 [iCP housekeeper] DEBUG --- SpringBootHikariCP - Pool stats (total=3, active=0, idle=3, waiting=0)
21:09:43.440 [ main] DEBUG --- Finished creating instance of bean 'dslContext'
Any ideas...?
After taking a thread dump it became clear that the problem is caused by aspectjweaver.
More info can be found here.
By excluding org.jooq in pointcut matching the problem is solved.

Resources