0

Spring Boot deployment in Vertx 3.2.1

I am trying to deploy services which are developed using Spring Boot in vertx framework.

The services are developed in Spring Boot and deployed using Gradle. The following is my development environment a) Java version - 1.8 b) Spring boot version - 1.2.8.RELEASE c) Gradle version - 2.0 d) Vertx version - 3.2.1.

The vertx application is launched using the command vertx run samplevertx.java -cp sampleFAT.jar. When I start the vertx application, the following exception is thrown

    WARN  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container.
    nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
    ERROR o.s.boot.SpringApplication - Application startup failed
    org.springframework.context.ApplicationContextException: Unable to start embedded container 
    nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:690)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:322)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:970) 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:959) 
    at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111) [vertx-core-3.2.1.jar:na]
    at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$163(DeploymentManager.java:429) [vertx-core-3.2.1.jar:na]
    at io.vertx.core.impl.ContextImpl.lambda$wrapTask$18(ContextImpl.java:335) ~[vertx-core-3.2.1.jar:na]
    at io.vertx.core.impl.OrderedExecutorFactory$OrderedExecutor.lambda$new$265(OrderedExecutorFactory.java:91) ~[vertx-core-3.2.1.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_73]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_73]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_73]
    Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

I tried the following solutions that was posted by other members but I had no luck.

Solution 1, Solution 2, Solution 3 and Solution 4.

I have added the necessary annotations and the dependencies in build.gradle file however, the problem still persists.

Can anybody in the forum help me to resolve this issue?

Community
  • 1
  • 1

0 Answers0