Spring boot Syslog UDP receiver shuts down - java

I am writing a UDP syslog message receiver in Spring Boot 1.5.6.RELEASE and it shuts down if I don't add spring-boot-starter-web dependency. The thing is I don't need web dependency because the application only receives, filters and sends the log further via TCP. I'm using org.springframework.integration.syslog.inbound.UdpSyslogReceivingChannelAdapter.
Receiver:
#Bean
public UdpSyslogReceivingChannelAdapter udpReceiver() {
final UdpSyslogReceivingChannelAdapter adapter = new UdpSyslogReceivingChannelAdapter();
adapter.setPort(properties.getUdp().getLocalPort());
adapter.setOutputChannelName("routingChannel");
adapter.setConverter(converter);
return adapter;
}
This is the console output and it shows no exceptions:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.6.RELEASE)
2018-10-05 08:55:18.338 INFO 21016 --- [ main] h.b.iptv.stream.IptvStreamApplication : Starting IptvStreamApplication on DESKTOP-0S65L7N with PID 21016 (D:\Projects\iptv\iptv-stream\target\classes started by tomiv in D:\Projects\iptv)
2018-10-05 08:55:18.342 INFO 21016 --- [ main] h.b.iptv.stream.IptvStreamApplication : No active profile set, falling back to default profiles: default
2018-10-05 08:55:18.386 INFO 21016 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#384ad17b: startup date [Fri Oct 05 08:55:18 CEST 2018]; root of context hierarchy
2018-10-05 08:55:19.325 INFO 21016 --- [ main] o.s.i.config.IntegrationRegistrar : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2018-10-05 08:55:19.400 INFO 21016 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2018-10-05 08:55:19.546 INFO 21016 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2018-10-05 08:55:19.552 INFO 21016 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2018-10-05 08:55:19.674 INFO 21016 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [org.springframework.beans.factory.config.PropertiesFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-10-05 08:55:19.678 INFO 21016 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationGlobalProperties' of type [java.util.Properties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-10-05 08:55:19.986 INFO 21016 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2018-10-05 08:55:20.064 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Trying to find master from available Sentinels...
2018-10-05 08:55:20.082 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Redis master running at 10.10.20.49:6379, starting Sentinel listeners...
2018-10-05 08:55:20.091 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Created JedisPool to master at 10.10.20.49:6379
2018-10-05 08:55:20.093 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Trying to find master from available Sentinels...
2018-10-05 08:55:20.096 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Redis master running at 10.10.20.49:6379, starting Sentinel listeners...
2018-10-05 08:55:20.097 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Created JedisPool to master at 10.10.20.49:6379
2018-10-05 08:55:20.097 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Trying to find master from available Sentinels...
2018-10-05 08:55:20.099 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Redis master running at 10.10.20.49:6379, starting Sentinel listeners...
2018-10-05 08:55:20.100 INFO 21016 --- [ main] redis.clients.jedis.JedisSentinelPool : Created JedisPool to master at 10.10.20.49:6379
2018-10-05 08:55:20.400 INFO 21016 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-10-05 08:55:20.405 INFO 21016 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'payloadHandlingService.route.router.handler' has been autodetected for JMX exposure
2018-10-05 08:55:20.406 INFO 21016 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'payloadHandlingService.route.router.handler': registering with JMX server as MBean [org.springframework.integration.router:name=payloadHandlingService.route.router.handler,type=MethodInvokingRouter]
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase -2147483648
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {message-handler:streamConfiguration.handler.serviceActivator} as a subscriber to the 'udpOut' channel
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.integration.channel.DirectChannel : Channel 'application.udpOut' has 1 subscriber(s).
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started streamConfiguration.handler.serviceActivator
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {message-handler:streamConfiguration.tcpSender.serviceActivator} as a subscriber to the 'tcpOut' channel
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.integration.channel.DirectChannel : Channel 'application.tcpOut' has 1 subscriber(s).
2018-10-05 08:55:20.460 INFO 21016 --- [ main] .s.i.i.t.c.TcpNetClientConnectionFactory : started tcpConnectionFactory, host=localhost, port=3333
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started streamConfiguration.tcpSender.serviceActivator
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {router:payloadHandlingService.route.router} as a subscriber to the 'routingChannel' channel
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.integration.channel.DirectChannel : Channel 'application.routingChannel' has 1 subscriber(s).
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started payloadHandlingService.route.router
2018-10-05 08:55:20.460 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {service-activator:payloadHandlingService.handleAvrPayload.serviceActivator} as a subscriber to the 'anonymizationChannel' channel
2018-10-05 08:55:20.461 INFO 21016 --- [ main] o.s.integration.channel.DirectChannel : Channel 'application.anonymizationChannel' has 1 subscriber(s).
2018-10-05 08:55:20.461 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started payloadHandlingService.handleAvrPayload.serviceActivator
2018-10-05 08:55:20.461 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {service-activator:payloadHandlingService.handleUdpProbePayload.serviceActivator} as a subscriber to the 'loadBalancerChannel' channel
2018-10-05 08:55:20.461 INFO 21016 --- [ main] o.s.integration.channel.DirectChannel : Channel 'application.loadBalancerChannel' has 1 subscriber(s).
2018-10-05 08:55:20.461 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started payloadHandlingService.handleUdpProbePayload.serviceActivator
2018-10-05 08:55:20.463 INFO 21016 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2018-10-05 08:55:20.463 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2018-10-05 08:55:20.463 INFO 21016 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'application.errorChannel' has 1 subscriber(s).
2018-10-05 08:55:20.463 INFO 21016 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
2018-10-05 08:55:20.463 INFO 21016 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 1073741823
2018-10-05 08:55:20.464 INFO 21016 --- [ main] o.s.i.i.u.UnicastReceivingChannelAdapter : started org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter#70887727
2018-10-05 08:55:20.464 INFO 21016 --- [ main] s.i.s.i.UdpSyslogReceivingChannelAdapter : started udpReceiver
2018-10-05 08:55:20.471 INFO 21016 --- [ main] h.b.iptv.stream.IptvStreamApplication : Started IptvStreamApplication in 2.421 seconds (JVM running for 3.548)
2018-10-05 08:55:20.472 INFO 21016 --- [ Thread-10] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#384ad17b: startup date [Fri Oct 05 08:55:18 CEST 2018]; root of context hierarchy
2018-10-05 08:55:20.473 INFO 21016 --- [ Thread-10] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 1073741823
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.i.u.UnicastReceivingChannelAdapter : stopped org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter#70887727
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] s.i.s.i.UdpSyslogReceivingChannelAdapter : stopped udpReceiver
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] .s.i.i.t.c.TcpNetClientConnectionFactory : stopped tcpConnectionFactory, host=localhost, port=3333
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.channel.PublishSubscribeChannel : Channel 'application.errorChannel' has 0 subscriber(s).
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : stopped _org.springframework.integration.errorLogger
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase -2147483648
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : Removing {message-handler:streamConfiguration.handler.serviceActivator} as a subscriber to the 'udpOut' channel
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.integration.channel.DirectChannel : Channel 'application.udpOut' has 0 subscriber(s).
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : stopped streamConfiguration.handler.serviceActivator
2018-10-05 08:55:20.474 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : Removing {message-handler:streamConfiguration.tcpSender.serviceActivator} as a subscriber to the 'tcpOut' channel
2018-10-05 08:55:20.475 INFO 21016 --- [ Thread-10] o.s.integration.channel.DirectChannel : Channel 'application.tcpOut' has 0 subscriber(s).
2018-10-05 08:55:20.475 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : stopped streamConfiguration.tcpSender.serviceActivator
2018-10-05 08:55:20.475 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : Removing {router:payloadHandlingService.route.router} as a subscriber to the 'routingChannel' channel
2018-10-05 08:55:20.475 INFO 21016 --- [ Thread-10] o.s.integration.channel.DirectChannel : Channel 'application.routingChannel' has 0 subscriber(s).
2018-10-05 08:55:20.475 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : stopped payloadHandlingService.route.router
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : Removing {service-activator:payloadHandlingService.handleAvrPayload.serviceActivator} as a subscriber to the 'anonymizationChannel' channel
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.integration.channel.DirectChannel : Channel 'application.anonymizationChannel' has 0 subscriber(s).
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : stopped payloadHandlingService.handleAvrPayload.serviceActivator
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : Removing {service-activator:payloadHandlingService.handleUdpProbePayload.serviceActivator} as a subscriber to the 'loadBalancerChannel' channel
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.integration.channel.DirectChannel : Channel 'application.loadBalancerChannel' has 0 subscriber(s).
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.i.endpoint.EventDrivenConsumer : stopped payloadHandlingService.handleUdpProbePayload.serviceActivator
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-10-05 08:55:20.476 INFO 21016 --- [ Thread-10] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
2018-10-05 08:55:20.477 INFO 21016 --- [ Thread-10] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
Process finished with exit code 0
While debugging I've tried to use org.springframework.integration.syslog.inbound.TcpSyslogReceivingChannelAdapter and the application doesn't shut down even though the web dependency isn't added. What is the reason for the app to be shutting down while using the org.springframework.integration.syslog.inbound.UdpSyslogReceivingChannelAdapter? Can I use UdpSyslogReceivingChannelAdapter without spring-boot-starter-web dependency?

The underlying UDP adapter uses a daemon thread by default (daemon threads do not prevent JVM exit).
You can provide a different task executor that doesn't use daemon threads...
#Bean
public UdpSyslogReceivingChannelAdapter udpReceiver() {
final UdpSyslogReceivingChannelAdapter adapter = new UdpSyslogReceivingChannelAdapter();
adapter.setUdpAdapter(receiver());
adapter.setOutputChannelName("routingChannel");
adapter.setConverter(converter);
return adapter;
}
#Bean
public UnicastReceivingChannelAdapter receiver() {
UnicastReceivingChannelAdapter adapter = new UnicastReceivingChannelAdapter(properties.getUdp().getLocalPort());
adapter.setTaskExecutor(executor());
return adapter;
}
#Bean
public TaskExecutor executor() {
ThreadPoolTaskExecutor exec = new ThreadPoolTaskExecutor();
exec.setCorePoolSize(5);
return exec;
}

Related

Spring Boot application shutting down immediately after start

I can't figure out why my dockerized Spring Boot application terminates immediately after starting up. I looked into similar issues but couldn't find a reason for mine to fail yet.
The docker image runs ok locally, but when running on Azure Container Apps it does an auto-shutdown.
This is the log with Hikari on debug:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.4)
2022-10-02 23:09:00.444 INFO 1 --- [ main] io.pomatti.app.books.BookApplication : Starting BookApplication v0.0.1-SNAPSHOT using Java 17.0.4.1 on app-books--sw6babs-6db8f449fb-n2pvt with PID 1 (/opt/app/*.jar started by root in /opt/app)
2022-10-02 23:09:00.509 INFO 1 --- [ main] io.pomatti.app.books.BookApplication : No active profile set, falling back to 1 default profile: "default"
2022-10-02 23:09:02.933 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-10-02 23:09:03.111 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 169 ms. Found 1 JPA repository interfaces.
2022-10-02 23:09:04.535 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-10-02 23:09:04.542 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-10-02 23:09:04.542 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-10-02 23:09:04.715 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-10-02 23:09:04.715 INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4080 ms
2022-10-02 23:09:04.927 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : Driver class com.microsoft.sqlserver.jdbc.SQLServerDriver found in Thread context class loader TomcatEmbeddedWebappClassLoader
context: ROOT
delegate: true
----------> Parent Classloader:
org.springframework.boot.loader.LaunchedURLClassLoader#28c97a5
2022-10-02 23:09:05.833 INFO 1 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-10-02 23:09:06.014 INFO 1 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.11.Final
2022-10-02 23:09:06.327 INFO 1 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-10-02 23:09:06.617 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : HikariPool-1 - configuration:
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : allowPoolSuspension................................false
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : autoCommit................................true
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : catalog................................none
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionInitSql................................none
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTestQuery................................none
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : connectionTimeout................................30000
2022-10-02 23:09:06.620 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSource................................none
2022-10-02 23:09:06.621 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceClassName................................none
2022-10-02 23:09:06.621 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceJNDI................................none
2022-10-02 23:09:06.621 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : dataSourceProperties................................{password=<masked>}
2022-10-02 23:09:06.621 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : driverClassName................................"com.microsoft.sqlserver.jdbc.SQLServerDriver"
2022-10-02 23:09:06.621 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : exceptionOverrideClassName................................none
2022-10-02 23:09:06.621 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckProperties................................{}
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : healthCheckRegistry................................none
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : idleTimeout................................600000
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : initializationFailTimeout................................1
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : isolateInternalQueries................................false
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : jdbcUrl................................jdbc:sqlserver://sql-autoscale-2996.database.windows.net:1433;database=sqldb-autoscale-2996;user=dbadmin#sql-autoscale-2996;password=<masked>#777;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : keepaliveTime................................0
2022-10-02 23:09:06.622 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : leakDetectionThreshold................................0
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : maxLifetime................................1800000
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : maximumPoolSize................................10
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : metricRegistry................................none
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : metricsTrackerFactory................................com.zaxxer.hikari.metrics.micrometer.MicrometerMetricsTrackerFactory#5e8a459
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : minimumIdle................................10
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : password................................<masked>
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : poolName................................"HikariPool-1"
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : readOnly................................false
2022-10-02 23:09:06.623 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : registerMbeans................................false
2022-10-02 23:09:06.624 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : scheduledExecutor................................none
2022-10-02 23:09:06.624 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : schema................................none
2022-10-02 23:09:06.624 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : threadFactory................................internal
2022-10-02 23:09:06.624 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : transactionIsolation................................default
2022-10-02 23:09:06.624 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : username................................none
2022-10-02 23:09:06.624 DEBUG 1 --- [ main] com.zaxxer.hikari.HikariConfig : validationTimeout................................5000
2022-10-02 23:09:06.624 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-10-02 23:09:07.726 DEBUG 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: 1061c2f8-febf-4f1f-b9f6-86ee6dd22af4
2022-10-02 23:09:07.732 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-10-02 23:09:07.824 INFO 1 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.SQLServer2012Dialect
2022-10-02 23:09:07.832 DEBUG 1 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Pool stats (total=1, active=1, idle=0, waiting=0)
2022-10-02 23:09:08.027 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:2 ClientConnectionId: 5035df48-1a77-406f-95b1-99d289e2d70e
2022-10-02 23:09:08.227 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:3 ClientConnectionId: 2f01f8bb-e542-4351-9b5c-dcf7cd6084ef
2022-10-02 23:09:08.411 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:4 ClientConnectionId: fd8950e7-85e8-4ae2-80be-8d88d3a7c84d
2022-10-02 23:09:08.614 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:5 ClientConnectionId: 73205252-2e69-4a7d-b347-9ba7d8e6458f
2022-10-02 23:09:08.737 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:6 ClientConnectionId: 0814ccbd-f55c-4442-925d-be9046619eb5
2022-10-02 23:09:08.921 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:7 ClientConnectionId: f5fb5f48-1c99-4b0c-9b58-828627cfaac2
2022-10-02 23:09:09.119 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:8 ClientConnectionId: 730e1bf3-1e7b-4416-980e-9a64cda711ea
2022-10-02 23:09:09.319 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:9 ClientConnectionId: 23786119-d561-4da6-a59e-08ceb76c7065
2022-10-02 23:09:09.519 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection ConnectionID:10 ClientConnectionId: 9cc6c870-b6a2-4ee3-bc06-14d81bd03471
2022-10-02 23:09:09.519 DEBUG 1 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - After adding stats (total=10, active=0, idle=10, waiting=0)
2022-10-02 23:09:09.826 INFO 1 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-10-02 23:09:09.832 INFO 1 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-10-02 23:09:10.419 WARN 1 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-10-02 23:09:11.224 INFO 1 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'
2022-10-02 23:09:11.314 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-10-02 23:09:11.325 INFO 1 --- [ main] io.pomatti.app.books.BookApplication : Started BookApplication in 11.913 seconds (JVM running for 12.911)
2022-10-02 23:09:11.412 INFO 1 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2022-10-02 23:09:11.415 INFO 1 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2022-10-02 23:09:11.415 DEBUG 1 --- [ionShutdownHook] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Before shutdown stats (total=10, active=0, idle=10, waiting=0)
2022-10-02 23:09:11.416 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:1 ClientConnectionId: 1061c2f8-febf-4f1f-b9f6-86ee6dd22af4: (connection evicted)
2022-10-02 23:09:11.416 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:2 ClientConnectionId: 5035df48-1a77-406f-95b1-99d289e2d70e: (connection evicted)
2022-10-02 23:09:11.417 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:3 ClientConnectionId: 2f01f8bb-e542-4351-9b5c-dcf7cd6084ef: (connection evicted)
2022-10-02 23:09:11.417 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:4 ClientConnectionId: fd8950e7-85e8-4ae2-80be-8d88d3a7c84d: (connection evicted)
2022-10-02 23:09:11.418 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:5 ClientConnectionId: 73205252-2e69-4a7d-b347-9ba7d8e6458f: (connection evicted)
2022-10-02 23:09:11.418 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:6 ClientConnectionId: 0814ccbd-f55c-4442-925d-be9046619eb5: (connection evicted)
2022-10-02 23:09:11.419 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:7 ClientConnectionId: f5fb5f48-1c99-4b0c-9b58-828627cfaac2: (connection evicted)
2022-10-02 23:09:11.419 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:8 ClientConnectionId: 730e1bf3-1e7b-4416-980e-9a64cda711ea: (connection evicted)
2022-10-02 23:09:11.420 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:9 ClientConnectionId: 23786119-d561-4da6-a59e-08ceb76c7065: (connection evicted)
2022-10-02 23:09:11.420 DEBUG 1 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection ConnectionID:10 ClientConnectionId: 9cc6c870-b6a2-4ee3-bc06-14d81bd03471: (connection evicted)
2022-10-02 23:09:11.421 DEBUG 1 --- [ionShutdownHook] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - After shutdown stats (total=0, active=0, idle=0, waiting=0)
2022-10-02 23:09:11.421 INFO 1 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
My pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>io.pomatti.app</groupId>
<artifactId>order</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>order</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>11.2.1.jre17</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Main class:
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
#SpringBootApplication
#RestController
#RequestMapping("/api/books")
public class BookApplication {
public static void main(String[] args) {
SpringApplication.run(BookApplication.class, args);
}
#Autowired
BookRepository repository;
#PostMapping("/")
public Book post(#RequestBody Book order) {
var book = new Book();
book.setName("Eternal Sunshine");
book.setAuthor("Anonymous");
return repository.save(book);
}
}
Dockerfile:
# syntax=docker/dockerfile:1
FROM eclipse-temurin:17-jdk-jammy as builder
WORKDIR /opt/app
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
RUN ./mvnw dependency:go-offline
COPY ./src ./src
RUN ./mvnw clean install
FROM eclipse-temurin:17-jre-jammy
WORKDIR /opt/app
EXPOSE 8080
COPY --from=builder /opt/app/target/*.jar /opt/app/*.jar
ENTRYPOINT ["java", "-jar", "/opt/app/*.jar" ]
Pods were being restarted due to a too short initial delay for the health probe, which I had set for 3s. I've increased it to 10s and it solved the issue.
probes = [
{
type = "Liveness"
httpGet = {
path = "/actuator/health"
port = var.ingress_target_port
httpHeaders = [
{
name = "Custom-Header"
value = "Awesome"
}
]
}
initialDelaySeconds = 10
periodSeconds = 5
}
]
I've found that out by looking into the System Logs available for each container.

why I see this when compiling my project in bootstrap? "Found 0 JPA repository interfaces."

I have created a Bootstrap project in which I have 3 repositories. When I compile the project I do not receive any errors but unfortunately I can not see my controllers in Swagger!!!
I have found out that line 4 says:
Finished Spring Data repository scanning in 4 ms. Found 0 JPA
repository interfaces.
I think this the reason that I can not see the controllers. Any idea to solve this? Thank you in advance.
2021-12-14 00:26:13.768 INFO 5472 --- [ main] WBSthesis.rotab.RotabApplication
: No active profile set, falling back to default profiles: default
2021-12-14 00:26:14.648 INFO 5472 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-12-14 00:26:14.661 INFO 5472 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : ***Finished Spring Data repository scanning in 4 ms. Found 0 JPA repository interfaces.***
2021-12-14 00:26:15.592 INFO 5472 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-12-14 00:26:15.609 INFO 5472 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-12-14 00:26:15.609 INFO 5472 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.54]
2021-12-14 00:26:15.718 INFO 5472 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-12-14 00:26:15.718 INFO 5472 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1885 ms
2021-12-14 00:26:15.975 INFO 5472 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-12-14 00:26:16.051 INFO 5472 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.32.Final
2021-12-14 00:26:16.226 INFO 5472 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-12-14 00:26:16.356 INFO 5472 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-12-14 00:26:16.562 INFO 5472 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-12-14 00:26:16.580 INFO 5472 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect
2021-12-14 00:26:16.856 INFO 5472 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-12-14 00:26:16.866 INFO 5472 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-12-14 00:26:17.090 WARN 5472 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-12-14 00:26:17.225 INFO 5472 --- [ main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)]
2021-12-14 00:26:17.490 INFO 5472 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-12-14 00:26:17.491 INFO 5472 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2021-12-14 00:26:17.511 INFO 5472 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2021-12-14 00:26:17.544 INFO 5472 --- [ main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2021-12-14 00:26:17.698 INFO 5472 --- [ main] WBSthesis.rotab.RotabApplication : Started RotabApplication in 4.468 seconds (JVM running for 4.958)
More info of your project would be helpful, but maybe your interfaces are not inside the right package. I was facing this once...
Here is an example.
Notice that all sub-packages are on the same level as the #SpringBootApplication.

How to run springboot app with Hikari datasource without HikariPool shutdown initiated

I have a spring boot app with maven and use Hikari data source to connect Mysql database. But when I run spring boot application, the HikariPool shutdown initiated happen as below:
C:\Users\Admin\.jdks\corretto-11.0.12\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.2\lib\idea_rt.jar=58795:C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.2\bin" -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath C:\Users\Admin\Desktop\PiratedMovieWeb\target\classes;C:\Users\Admin\Desktop\PiratedMovieWeb\lib\javax.jms.jar;C:\Users\Admin\Desktop\PiratedMovieWeb\lib\javax.servlet.jsp.jstl.jar;C:\Users\Admin\Desktop\PiratedMovieWeb\lib\javax.resource.jar;C:\Users\Admin\Desktop\PiratedMovieWeb\lib\javax.servlet.jar;C:\Users\Admin\Desktop\PiratedMovieWeb\lib\javax.ejb.jar;C:\Users\Admin\Desktop\PiratedMovieWeb\lib\javax.servlet.jsp.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-oauth2-client\2.5.5\spring-boot-starter-oauth2-client-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter\2.5.5\spring-boot-starter-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.5.5\spring-boot-starter-logging-2.5.5.jar;C:\Users\Admin\.m2\repository\ch\qos\logback\logback-classic\1.2.6\logback-classic-1.2.6.jar;C:\Users\Admin\.m2\repository\ch\qos\logback\logback-core\1.2.6\logback-core-1.2.6.jar;C:\Users\Admin\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.14.1\log4j-to-slf4j-2.14.1.jar;C:\Users\Admin\.m2\repository\org\apache\logging\log4j\log4j-api\2.14.1\log4j-api-2.14.1.jar;C:\Users\Admin\.m2\repository\org\slf4j\jul-to-slf4j\1.7.32\jul-to-slf4j-1.7.32.jar;C:\Users\Admin\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\Admin\.m2\repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;C:\Users\Admin\.m2\repository\com\sun\mail\jakarta.mail\1.6.7\jakarta.mail-1.6.7.jar;C:\Users\Admin\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-config\5.5.2\spring-security-config-5.5.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-aop\5.3.10\spring-aop-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-context\5.3.10\spring-context-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-core\5.5.2\spring-security-core-5.5.2.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-crypto\5.5.2\spring-security-crypto-5.5.2.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-expression\5.3.10\spring-expression-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-oauth2-client\5.5.2\spring-security-oauth2-client-5.5.2.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-oauth2-core\5.5.2\spring-security-oauth2-core-5.5.2.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-web\5.5.2\spring-security-web-5.5.2.jar;C:\Users\Admin\.m2\repository\com\nimbusds\oauth2-oidc-sdk\9.9.1\oauth2-oidc-sdk-9.9.1.jar;C:\Users\Admin\.m2\repository\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;C:\Users\Admin\.m2\repository\com\nimbusds\content-type\2.1\content-type-2.1.jar;C:\Users\Admin\.m2\repository\com\nimbusds\lang-tag\1.5\lang-tag-1.5.jar;C:\Users\Admin\.m2\repository\org\springframework\security\spring-security-oauth2-jose\5.5.2\spring-security-oauth2-jose-5.5.2.jar;C:\Users\Admin\.m2\repository\com\nimbusds\nimbus-jose-jwt\9.10.1\nimbus-jose-jwt-9.10.1.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-devtools\2.5.5\spring-boot-devtools-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot\2.5.5\spring-boot-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.5.5\spring-boot-autoconfigure-2.5.5.jar;C:\Users\Admin\.m2\repository\org\projectlombok\lombok\1.18.20\lombok-1.18.20.jar;C:\Users\Admin\.m2\repository\net\minidev\json-smart\2.4.7\json-smart-2.4.7.jar;C:\Users\Admin\.m2\repository\net\minidev\accessors-smart\2.4.7\accessors-smart-2.4.7.jar;C:\Users\Admin\.m2\repository\org\ow2\asm\asm\9.1\asm-9.1.jar;C:\Users\Admin\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;C:\Users\Admin\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;C:\Users\Admin\.m2\repository\net\bytebuddy\byte-buddy\1.10.22\byte-buddy-1.10.22.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-core\5.3.10\spring-core-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-jcl\5.3.10\spring-jcl-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.5.6\spring-boot-starter-data-jpa-2.5.6.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.5.5\spring-boot-starter-aop-2.5.5.jar;C:\Users\Admin\.m2\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.5.5\spring-boot-starter-jdbc-2.5.5.jar;C:\Users\Admin\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\Admin\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\Admin\.m2\repository\org\hibernate\hibernate-core\5.4.32.Final\hibernate-core-5.4.32.Final.jar;C:\Users\Admin\.m2\repository\org\jboss\logging\jboss-logging\3.4.2.Final\jboss-logging-3.4.2.Final.jar;C:\Users\Admin\.m2\repository\org\javassist\javassist\3.27.0-GA\javassist-3.27.0-GA.jar;C:\Users\Admin\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Admin\.m2\repository\org\jboss\jandex\2.2.3.Final\jandex-2.2.3.Final.jar;C:\Users\Admin\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\Admin\.m2\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;C:\Users\Admin\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\Admin\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.5\jaxb-runtime-2.3.5.jar;C:\Users\Admin\.m2\repository\org\glassfish\jaxb\txw2\2.3.5\txw2-2.3.5.jar;C:\Users\Admin\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;C:\Users\Admin\.m2\repository\org\springframework\data\spring-data-jpa\2.5.5\spring-data-jpa-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\data\spring-data-commons\2.5.5\spring-data-commons-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-orm\5.3.10\spring-orm-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-aspects\5.3.10\spring-aspects-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.5.5\spring-boot-starter-web-2.5.5.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.5.5\spring-boot-starter-json-2.5.5.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.12.5\jackson-datatype-jdk8-2.12.5.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.12.5\jackson-datatype-jsr310-2.12.5.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.12.5\jackson-module-parameter-names-2.12.5.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-web\5.3.10\spring-web-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-webmvc\5.3.10\spring-webmvc-5.3.10.jar;C:\Users\Admin\.m2\repository\javax\ws\rs\javax.ws.rs-api\2.1.1\javax.ws.rs-api-2.1.1.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.12.5\jackson-annotations-2.12.5.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.12.5\jackson-core-2.12.5.jar;C:\Users\Admin\.m2\repository\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-jdbc\5.3.9\spring-jdbc-5.3.9.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-beans\5.3.10\spring-beans-5.3.10.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-tx\5.3.10\spring-tx-5.3.10.jar;C:\Users\Admin\.m2\repository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;C:\Users\Admin\.m2\repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;C:\Users\Admin\.m2\repository\mysql\mysql-connector-java\8.0.16\mysql-connector-java-8.0.16.jar;C:\Users\Admin\.m2\repository\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar;C:\Users\Admin\.m2\repository\io\swagger\swagger-annotations\1.6.2\swagger-annotations-1.6.2.jar com.example.piratedmovieweb.PiratedMovieWebApplication
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.5.5)
2021-11-08 21:09:15.272 INFO 11796 --- [ restartedMain] c.e.p.PiratedMovieWebApplication : Starting PiratedMovieWebApplication using Java 11.0.12 on DESKTOP-OFQLT9I with PID 11796 (C:\Users\Admin\Desktop\PiratedMovieWeb\target\classes started by Admin in C:\Users\Admin\Desktop\PiratedMovieWeb)
2021-11-08 21:09:15.273 INFO 11796 --- [ restartedMain] c.e.p.PiratedMovieWebApplication : No active profile set, falling back to default profiles: default
2021-11-08 21:09:15.307 INFO 11796 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2021-11-08 21:09:15.307 INFO 11796 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2021-11-08 21:09:15.717 INFO 11796 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-11-08 21:09:15.732 INFO 11796 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 9 ms. Found 0 JPA repository interfaces.
2021-11-08 21:09:15.910 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : Driver class com.mysql.cj.jdbc.Driver found in Thread context class loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader#13c357f2
2021-11-08 21:09:15.977 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : HikariPool-1 - configuration:
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : allowPoolSuspension.............false
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : autoCommit......................true
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : catalog.........................none
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : connectionInitSql...............none
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : connectionTestQuery.............none
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : connectionTimeout...............30000
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSource......................none
2021-11-08 21:09:15.979 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSourceClassName.............none
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSourceJNDI..................none
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : dataSourceProperties............{password=<masked>}
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : driverClassName................."com.mysql.cj.jdbc.Driver"
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : exceptionOverrideClassName......none
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : healthCheckProperties...........{}
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : healthCheckRegistry.............none
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : idleTimeout.....................600000
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : initializationFailTimeout.......1
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : isolateInternalQueries..........false
2021-11-08 21:09:15.980 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : jdbcUrl.........................jdbc:mysql://localhost:3306/piratedmovie?allowPublicKeyRetrieval=true&useSSL=false
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : leakDetectionThreshold..........0
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : maxLifetime.....................1800000
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : maximumPoolSize.................5
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : metricRegistry..................none
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : metricsTrackerFactory...........none
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : minimumIdle.....................5
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : password........................<masked>
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : poolName........................"HikariPool-1"
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : readOnly........................false
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : registerMbeans..................false
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : scheduledExecutor...............none
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : schema..........................none
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : threadFactory...................internal
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : transactionIsolation............default
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : username........................"root"
2021-11-08 21:09:15.981 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.HikariConfig : validationTimeout...............5000
2021-11-08 21:09:15.981 INFO 11796 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-11-08 21:09:16.078 DEBUG 11796 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl#405e1d52
2021-11-08 21:09:16.080 INFO 11796 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-11-08 21:09:16.141 INFO 11796 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-11-08 21:09:16.180 INFO 11796 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.32.Final
2021-11-08 21:09:16.182 DEBUG 11796 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Pool stats (total=1, active=0, idle=1, waiting=0)
2021-11-08 21:09:16.189 DEBUG 11796 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl#56b5de06
2021-11-08 21:09:16.193 DEBUG 11796 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl#1788d43d
2021-11-08 21:09:16.197 DEBUG 11796 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl#26d5246a
2021-11-08 21:09:16.202 DEBUG 11796 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl#77a72b72
2021-11-08 21:09:16.202 DEBUG 11796 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - After adding stats (total=5, active=0, idle=5, waiting=0)
2021-11-08 21:09:16.284 INFO 11796 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-11-08 21:09:16.362 INFO 11796 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
2021-11-08 21:09:16.746 INFO 11796 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-11-08 21:09:16.752 INFO 11796 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-11-08 21:09:16.872 INFO 11796 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2021-11-08 21:09:16.890 INFO 11796 --- [ restartedMain] c.e.p.PiratedMovieWebApplication : Started PiratedMovieWebApplication in 1.93 seconds (JVM running for 2.75)
2021-11-08 21:09:16.898 INFO 11796 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2021-11-08 21:09:16.901 INFO 11796 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2021-11-08 21:09:16.901 DEBUG 11796 --- [ionShutdownHook] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Before shutdown stats (total=5, active=0, idle=5, waiting=0)
2021-11-08 21:09:16.902 DEBUG 11796 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection com.mysql.cj.jdbc.ConnectionImpl#405e1d52: (connection evicted)
2021-11-08 21:09:16.904 DEBUG 11796 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection com.mysql.cj.jdbc.ConnectionImpl#56b5de06: (connection evicted)
2021-11-08 21:09:16.904 DEBUG 11796 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection com.mysql.cj.jdbc.ConnectionImpl#1788d43d: (connection evicted)
2021-11-08 21:09:16.904 DEBUG 11796 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection com.mysql.cj.jdbc.ConnectionImpl#26d5246a: (connection evicted)
2021-11-08 21:09:16.905 DEBUG 11796 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection com.mysql.cj.jdbc.ConnectionImpl#77a72b72: (connection evicted)
2021-11-08 21:09:16.905 DEBUG 11796 --- [ionShutdownHook] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - After shutdown stats (total=0, active=0, idle=0, waiting=0)
2021-11-08 21:09:16.905 INFO 11796 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
Process finished with exit code 0
I configured properties file as below and can get data query by using Unit Test normally:
# =============Database config==================
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/piratedmovie?allowPublicKeyRetrieval=true&useSSL=false
spring.datasource.username=root
spring.datasource.password=123456_
spring.datasource.hikari.maximum-pool-size=5
# ==============JPA / HIBERNATE=================
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.generate-ddl=true
spring.main.web-application-type=none
logging.level.com.zaxxer.hikari.HikariConfig=DEBUG
logging.level.com.zaxxer.hikari=TRACE
I also add spring-boot-starter-web, HikariCP, spring-boot-starter-data-jpa as many people advice but cannot resolve this issues.
Anyone can give solution for me to fix this issue.
Thanks
When you specify spring.main.web-application-type=none you are telling Boot not to start the embedded servlet container. So, your application initializes and starts and then shutsdown. Comment out this property and it should start baring any other issues.

Intellij Community Edition showing this error on schema.sql file as can see on image that I droped here

When I run the application this shutdown and don't allow me enter on H2 database on localhost h2 URL.
Is anyone else having this same problem?
:: Spring Boot :: (v2.4.1)
2020-12-22 15:23:08.377 INFO 4937 --- [ restartedMain] c.l.suraapp.SuraAppApplication : Starting SuraAppApplication using Java 15 on goemon with PID 4937 (/home/leporoni/Documents/JavaProjects/SuraApp/target/classes started by leporoni in /home/leporoni/Documents/JavaProjects/SuraApp)
2020-12-22 15:23:08.381 INFO 4937 --- [ restartedMain] c.l.suraapp.SuraAppApplication : No active profile set, falling back to default profiles: default
2020-12-22 15:23:08.554 INFO 4937 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-12-22 15:23:10.115 INFO 4937 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-12-22 15:23:10.228 INFO 4937 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 84 ms. Found 1 JPA repository interfaces.
2020-12-22 15:23:11.011 INFO 4937 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-12-22 15:23:11.580 INFO 4937 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-12-22 15:23:11.836 INFO 4937 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-12-22 15:23:11.972 INFO 4937 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.25.Final
2020-12-22 15:23:12.653 INFO 4937 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2020-12-22 15:23:12.967 INFO 4937 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2020-12-22 15:23:13.927 INFO 4937 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-12-22 15:23:13.941 INFO 4937 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-12-22 15:23:13.959 INFO 4937 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2020-12-22 15:23:14.520 INFO 4937 --- [ restartedMain] c.l.suraapp.SuraAppApplication : Started SuraAppApplication in 7.451 seconds (JVM running for 9.275)
2020-12-22 15:23:14.529 INFO 4937 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-12-22 15:23:14.564 INFO 4937 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2020-12-22 15:23:14.581 INFO 4937 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
Process finished with exit code 0

Spring boot application is getting stuck while running

This is my first spring-boot application. I ran a sample code and it is getting stuck at "Initialized JPA EntityManagerFactory for persistence unit 'default' ".
Below is the code
package com.fredo.webservices.homefredoServcies;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class HomeFredoServciesApplication {
public static void main(String[] args) {
SpringApplication.run(HomeFredoServciesApplication.class, args);
}
}
below are the logs
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.0.RELEASE)
2020-06-07 20:58:15.807 INFO 1496 --- [ restartedMain] c.f.w.h.HomeFredoServciesApplication : Starting HomeFredoServciesApplication on ANGU with PID 1496 (C:\Users\ASUS\Desktop\java ms\home-fredoServcies\target\classes started by Angu in C:\Users\ASUS\Desktop\java ms\home-fredoServcies)
2020-06-07 20:58:15.811 INFO 1496 --- [ restartedMain] c.f.w.h.HomeFredoServciesApplication : No active profile set, falling back to default profiles: default
2020-06-07 20:58:15.881 INFO 1496 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-06-07 20:58:15.882 INFO 1496 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-06-07 20:58:16.799 INFO 1496 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2020-06-07 20:58:16.822 INFO 1496 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13ms. Found 0 JPA repository interfaces.
2020-06-07 20:58:17.861 INFO 1496 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-06-07 20:58:17.876 INFO 1496 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-06-07 20:58:17.877 INFO 1496 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.35]
2020-06-07 20:58:18.038 INFO 1496 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-06-07 20:58:18.038 INFO 1496 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2156 ms
2020-06-07 20:58:18.100 INFO 1496 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-06-07 20:58:18.335 INFO 1496 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-06-07 20:58:18.342 INFO 1496 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:b2c0eff5-9805-4a71-9f66-c6c863d910f5'
2020-06-07 20:58:18.548 INFO 1496 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-07 20:58:18.629 INFO 1496 --- [ task-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-06-07 20:58:18.674 WARN 1496 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-06-07 20:58:18.720 INFO 1496 --- [ task-1] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.15.Final
2020-06-07 20:58:18.966 INFO 1496 --- [ task-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-06-07 20:58:19.203 INFO 1496 --- [ task-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2020-06-07 20:58:19.210 INFO 1496 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2020-06-07 20:58:19.317 INFO 1496 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-06-07 20:58:19.322 INFO 1496 --- [ restartedMain] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories…
2020-06-07 20:58:19.324 INFO 1496 --- [ restartedMain] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
2020-06-07 20:58:19.344 INFO 1496 --- [ restartedMain] c.f.w.h.HomeFredoServciesApplication : Started HomeFredoServciesApplication in 3.985 seconds (JVM running for 4.795)
2020-06-07 20:58:19.554 INFO 1496 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-06-07 20:58:19.562 INFO 1496 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
I had same problem with application started by Eclipse and Spring Tool Run Configuration in Debug Mode.
A breakpoint was referencing a line on some removed block code, after removing faulty breakpoint, the application start new properly again.
Window-> Show View -> Breakpoints
try to hit http://localhost:8080/h2-console if you get response. your server is up and running. In logs it says H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:b2c0eff5-9805-4a71-9f66-c6c863d910f5'

Categories