0

My freshly-created app written on springboot-2.7.1 fails to start with the following error

Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/abondar/.sdkman/candidates/java/21.3.0.r17-grl/bin/java'' finished with non-zero exit value 1

Absolutely weird. I have another app writeen 0n 2.6.3 running perfectly on the same jvm. Also downgrading of this app to 2.6.3 doesn't help.

Here is build.gradle

    plugins {
    id "java"
    id "idea"
    id "org.springframework.boot" version "$springBootVersion"
}

apply plugin: "java"
apply plugin: "io.spring.dependency-management"

group "org.abondar.experimental.cameldemo"
version '1.0-SNAPSHOT'


    repositories {
        mavenCentral()
}

dependencies {

implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation('ch.qos.logback:logback-core:1.2.11')


testImplementation("org.springframework.boot:spring-boot-starter-test")
}

test {
    useJUnitPlatform()
}

bootBuildImage {
    imageName = "abondar/shoppingCart"
}

From logs I can see the following

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.context.MissingWebServerFactoryBeanException: No qualifying bean of type 'org.springframework.boot.web.servlet.server.ServletWebServerFactory' available: Unable to start AnnotationConfigServletWebServerApplicationContext due to missing ServletWebServerFactory bean 681 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter -

What am I missing here?

Alex Bondar
  • 1,167
  • 4
  • 18
  • 35

1 Answers1

0

Made a dummy mistake in main.

Was failing because of

 public static void main(String[] args) {
      SpringApplication.run(SpringApplication.class,args);
  }
Alex Bondar
  • 1,167
  • 4
  • 18
  • 35