1

I have an application that has two dependencies, starter-jdbc and stater-web. This runs both locally and deployed fine in PCF. If I add starter-actuator dependency, I get the error below in PCF but no locally. Any idea what's going on? Thanks in advance

2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT 12:56:25.742 [main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT 12:56:25.747 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at com.homedepot.assortment.transmission.MerchTransmissionApplication.main(MerchTransmissionApplication.java:10)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:202)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:178)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152)
   2019-07-18T08:56:25.74-0400 [APP/PROC/WEB/0] OUT     ... 8 common frames omitted
   2019-07-18T08:56:25.77-0400 [APP/PROC/WEB/0] OUT Exit status 1
   2019-07-18T08:56:25.77-0400 [CELL/SSHD/0] OUT Exit status 0
   2019-07-18T08:56:32.78-0400 [CELL/0] OUT Cell 3e951dff-2425-4c92-b7bb-94071ffc2ac5 stopping instance a4a2bdc5-d02e-4312-748e-8eb2
   2019-07-18T08:56:32.78-0400 [CELL/0] OUT Cell 3e951dff-2425-4c92-b7bb-94071ffc2ac5 destroying container for instance a4a2bdc5-d02e-4312-748e-8eb2
   2019-07-18T08:56:32.81-0400 [API/4] OUT Process has crashed with type: "web"
Al Jacinto
  • 300
  • 2
  • 7
  • Possible duplicate of [ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean](https://stackoverflow.com/questions/50231736/applicationcontextexception-unable-to-start-servletwebserverapplicationcontext) – jpganz18 Jul 18 '19 at 13:33
  • I tried that and it didn't work. I also tried where you have to derive your application class and no luck. – Al Jacinto Jul 18 '19 at 13:59
  • Then provide more information to determinate your error. dependencies and configurations. – jpganz18 Jul 18 '19 at 14:06

0 Answers0