title: Spring Boot initialization not completing [Application stuck]
body: <p>While starting the Spring boot, application gets stuck and SpringApplication.run is not returning.</p>
  
  <pre class="lang-java prettyprint-override"><code>@Configuration
  @ComponentScan
  @EnableAutoConfiguration
  public class AccountServiceApplication extends SpringBootServletInitializer {
  
      public static void main(String[] args) {
          ConfigurableApplicationContext context = SpringApplication.run(AccountServiceApplication.class, args);
          System.out.println("----------------------------- I'm done -------------------------");
      }
  }
  </code></pre>
  
  <p>I can see that Spring creates all the beans but it never returns, though embedded tomcat is started on 9000, it's not listening </p>
  
  <pre><code>class org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory's object [after] tomcatEmbeddedServletContainerFactory
  [05/16/19 06:17:44:044 IST]  INFO tomcat.TomcatEmbeddedServletContainer: : Tomcat initialized with port(s): 9000 (http)
  May 16, 2019 6:17:44 AM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-nio-9000"]
  May 16, 2019 6:17:44 AM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service [Tomcat]
  </code></pre>
  
  <pre><code>Trying 127.0.0.1...
  Connection failed: Connection refused
  Trying ::1...
  telnet: Unable to connect to remote host: Connection refused
  </code></pre>
  
  <p>Application is stuck forever post creating JMS connection.</p>
  
  <pre><code>class org.springframework.expression.spel.support.StandardEvaluationContext's object [after] integrationEvaluationContext
  class org.springframework.integration.handler.LoggingHandler's object [after] _org.springframework.integration.errorLogger.handler
  class org.springframework.integration.config.ConsumerEndpointFactoryBean's object [before]_org.springframework.integration.errorLogger
  class org.springframework.integration.config.ConsumerEndpointFactoryBean's object [after] _org.springframework.integration.errorLogger
  class org.springframework.integration.config.IdGeneratorConfigurer's object [before]org.springframework.integration.config.IdGeneratorConfigurer#0
  class org.springframework.integration.config.IdGeneratorConfigurer's object [after] org.springframework.integration.config.IdGeneratorConfigurer#0
  [05/16/19 05:58:02:002 IST]  INFO annotation.AnnotationMBeanExporter: : Registering beans for JMX exposure on startup
  class org.springframework.expression.spel.support.StandardEvaluationContext's object [after] integrationEvaluationContext
  [05/16/19 05:58:02:002 IST]  INFO support.DefaultLifecycleProcessor: : Starting beans in phase 0
  [05/16/19 05:58:02:002 IST]  INFO endpoint.EventDrivenConsumer: : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
  [05/16/19 05:58:02:002 IST]  INFO channel.PublishSubscribeChannel: : Channel 'application:9000.errorChannel' has 1 subscriber(s).
  [05/16/19 05:58:02:002 IST]  INFO endpoint.EventDrivenConsumer: : started _org.springframework.integration.errorLogger
  [05/16/19 05:58:02:002 IST]  INFO support.DefaultLifecycleProcessor: : Starting beans in phase 2147483647
  [05/16/19 05:58:02:002 IST]  INFO connection.CachingConnectionFactory: : Established shared JMS Connection: ActiveMQConnection {id=ID:SDSD121SFSSDF.local-54305-1557966482134-1:1,clientId=null,started=false}
  </code></pre>
  
  <p>Any pointer on how can I debug it?</p>