Garmaine Staff asked 1 year ago

I am getting an error due to a dependency in my Gradle build. The dependency that is causing the issue is,

implementation 'org.springframework.boot:spring-boot-starter-web'

If I comment out that line then my project builds without an issue.

The error I am getting is,

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@c387f44]

My full dependency list,

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter'
    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    implementation "org.apache.commons:commons-lang3:3.9"
    implementation 'org.flywaydb:flyway-core'
    compileOnly 'org.projectlombok:lombok'
    compile group: 'org.springframework', name: 'spring-web', version: '4.3.11.RELEASE'
    runtimeOnly 'mysql:mysql-connector-java'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation "org.testcontainers:testcontainers:1.13.0"
    testImplementation "org.testcontainers:junit-jupiter:1.13.0"
    testImplementation "org.testcontainers:mysql:1.12.5"
    testAnnotationProcessor 'org.projectlombok:lombok'
    testCompileOnly 'org.projectlombok:lombok'

}

Thanks.