I'm having this really tricky issue when deploying a .war file from Nexus repository into Wildfly using a docker image.
When I directly deploy it from Intellij, both the .war deployment and its datasource are correctly deployed. However, when going through the same steps using a docker image, then it returns the following error message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"file2-0.0.2-20240313.080832-1.war\".component.\"jakarta.servlet.http.HttpServlet$NoBodyAsyncContextListener\".WeldInstantiator" => "Failed to start service
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class jakarta.servlet.http.HttpServlet$NoBodyAsyncContextListener
Caused by: java.lang.IncompatibleClassChangeError: jakarta.servlet.http.HttpServlet and jakarta.servlet.http.HttpServlet$NoBodyAsyncContextListener disagree on InnerClasses attribute"}}
This error doesn't seem to make sense in this situation, as it deploys correctly when done from IntelliJ.
Can you someone explain this issue to me?
I have also tried to exclude the dependencies: jakarta.servlet / javax.servlet and tomcat, as well as another attempt, where I added javaee-api. However, none of these changes seem to work, as they all return the same error message.
This is my dependency:tree
[INFO] file:file:war:0.0.2-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:3.2.3:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:3.2.3:compile
[INFO] | | \- org.springframework:spring-context:jar:6.1.4:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:3.2.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:3.2.3:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.4.14:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.4.14:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.21.1:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.21.1:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:2.0.12:compile
[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO] | +- org.springframework:spring-core:jar:6.1.4:compile
[INFO] | | \- org.springframework:spring-jcl:jar:6.1.4:compile
[INFO] | \- org.yaml:snakeyaml:jar:2.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:3.2.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:3.2.3:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.15.4:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.15.4:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.15.4:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:3.2.3:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:10.1.19:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:10.1.19:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:10.1.19:compile
[INFO] | +- org.springframework:spring-web:jar:6.1.4:compile
[INFO] | | +- org.springframework:spring-beans:jar:6.1.4:compile
[INFO] | | \- io.micrometer:micrometer-observation:jar:1.12.3:compile
[INFO] | | \- io.micrometer:micrometer-commons:jar:1.12.3:compile
[INFO] | \- org.springframework:spring-webmvc:jar:6.1.4:compile
[INFO] | \- org.springframework:spring-expression:jar:6.1.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jdbc:jar:3.2.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:3.2.3:compile
[INFO] | | +- com.zaxxer:HikariCP:jar:5.0.1:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:6.1.4:compile
[INFO] | \- org.springframework.data:spring-data-jdbc:jar:3.2.3:compile
[INFO] | +- org.springframework.data:spring-data-relational:jar:3.2.3:compile
[INFO] | | \- com.github.jsqlparser:jsqlparser:jar:4.6:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:3.2.3:compile
[INFO] | \- org.springframework:spring-tx:jar:6.1.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:3.2.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:3.2.3:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.21:compile
[INFO] | +- org.hibernate.orm:hibernate-core:jar:6.4.4.Final:compile
[INFO] | | +- jakarta.persistence:jakarta.persistence-api:jar:3.1.0:compile
[INFO] | | +- jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.5.3.Final:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:6.0.6.Final:runtime
[INFO] | | +- io.smallrye:jandex:jar:3.1.2:runtime
[INFO] | | +- com.fasterxml:classmate:jar:1.6.0:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.14.12:runtime
[INFO] | | +- org.glassfish.jaxb:jaxb-runtime:jar:4.0.4:runtime
[INFO] | | | \- org.glassfish.jaxb:jaxb-core:jar:4.0.4:runtime
[INFO] | | | +- org.eclipse.angus:angus-activation:jar:2.0.1:runtime
[INFO] | | | +- org.glassfish.jaxb:txw2:jar:4.0.4:runtime
[INFO] | | | \- com.sun.istack:istack-commons-runtime:jar:4.1.2:runtime
[INFO] | | +- jakarta.inject:jakarta.inject-api:jar:2.0.1:runtime
[INFO] | | \- org.antlr:antlr4-runtime:jar:4.13.0:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:3.2.3:compile
[INFO] | | \- org.springframework:spring-orm:jar:6.1.4:compile
[INFO] | \- org.springframework:spring-aspects:jar:6.1.4:compile
[INFO] +- org.springframework.security:spring-security-saml2-service-provider:jar:6.2.2:compile
[INFO] | +- org.springframework.security:spring-security-web:jar:6.2.2:compile
[INFO] | +- org.opensaml:opensaml-core:jar:4.3.0:compile
[INFO] | | +- commons-codec:commons-codec:jar:1.16.1:compile
[INFO] | | +- com.google.guava:guava:jar:31.1-jre:compile
[INFO] | | | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | | | +- org.checkerframework:checker-qual:jar:3.12.0:compile
[INFO] | | | +- com.google.errorprone:error_prone_annotations:jar:2.11.0:compile
[INFO] | | | \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] | | +- io.dropwizard.metrics:metrics-core:jar:4.2.25:compile
[INFO] | | \- net.shibboleth.utilities:java-support:jar:8.4.0:compile
[INFO] | +- org.opensaml:opensaml-saml-api:jar:4.3.0:compile
[INFO] | | +- org.opensaml:opensaml-messaging-api:jar:4.3.0:compile
[INFO] | | +- org.opensaml:opensaml-profile-api:jar:4.3.0:compile
[INFO] | | +- org.opensaml:opensaml-security-api:jar:4.3.0:compile
[INFO] | | | +- org.cryptacular:cryptacular:jar:1.2.5:compile
[INFO] | | | +- org.bouncycastle:bcprov-jdk18on:jar:1.72:compile
[INFO] | | | \- org.bouncycastle:bcpkix-jdk18on:jar:1.72:compile
[INFO] | | | \- org.bouncycastle:bcutil-jdk18on:jar:1.72:compile
[INFO] | | +- org.opensaml:opensaml-soap-api:jar:4.3.0:compile
[INFO] | | +- org.opensaml:opensaml-xmlsec-api:jar:4.3.0:compile
[INFO] | | \- org.apache.santuario:xmlsec:jar:2.3.2:compile
[INFO] | \- org.opensaml:opensaml-saml-impl:jar:4.3.0:compile
[INFO] | +- org.opensaml:opensaml-security-impl:jar:4.3.0:compile
[INFO] | +- org.opensaml:opensaml-soap-impl:jar:4.3.0:compile
[INFO] | +- org.opensaml:opensaml-storage-api:jar:4.3.0:compile
[INFO] | +- org.opensaml:opensaml-xmlsec-impl:jar:4.3.0:compile
[INFO] | +- org.apache.velocity:velocity-engine-core:jar:2.3:compile
[INFO] | | \- org.apache.commons:commons-lang3:jar:3.13.0:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO] | \- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:3.2.3:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:3.2.3:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:3.2.3:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:3.2.3:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.9.0:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.1:runtime
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:2.1.2:runtime
[INFO] | +- net.minidev:json-smart:jar:2.5.0:test
[INFO] | | \- net.minidev:accessors-smart:jar:2.5.0:test
[INFO] | | \- org.ow2.asm:asm:jar:9.3:compile
[INFO] | +- org.assertj:assertj-core:jar:3.24.2:test
[INFO] | +- org.awaitility:awaitility:jar:4.2.0:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.10.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] | | | +- org.junit.platform:junit-platform-commons:jar:1.10.2:test
[INFO] | | | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.10.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.10.2:test
[INFO] | +- org.mockito:mockito-core:jar:5.7.0:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.14.12:test
[INFO] | | \- org.objenesis:objenesis:jar:3.3:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:5.7.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.1:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-test:jar:6.1.4:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.9.1:test
[INFO] +- de.bmg.coreapi2:core2:jar:0.0.2-SNAPSHOT:compile
[INFO] | +- com.vaadin:vaadin-spring-boot-starter:jar:24.3.5:compile
[INFO] | | +- com.vaadin:vaadin-spring:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:flow-server:jar:24.3.5:compile
[INFO] | | | | +- com.vaadin.servletdetector:throw-if-servlet3:jar:1.0.2:compile
[INFO] | | | | +- com.vaadin.external.gwt:gwt-elemental:jar:2.8.2.vaadin2:compile
[INFO] | | | | +- org.apache.commons:commons-fileupload2-jakarta:jar:2.0.0-M1:compile
[INFO] | | | | | \- org.apache.commons:commons-fileupload2-core:jar:2.0.0-M1:compile
[INFO] | | | | +- commons-io:commons-io:jar:2.15.0:compile
[INFO] | | | | +- org.jsoup:jsoup:jar:1.17.2:compile
[INFO] | | | | +- com.helger:ph-css:jar:7.0.1:compile
[INFO] | | | | | \- com.helger.commons:ph-commons:jar:11.1.0:compile
[INFO] | | | | +- com.vaadin.external:gentyref:jar:1.2.0.vaadin1:compile
[INFO] | | | | \- org.apache.commons:commons-compress:jar:1.25.0:compile
[INFO] | | | +- com.vaadin:flow-push:jar:24.3.5:compile
[INFO] | | | | \- com.vaadin.external.atmosphere:atmosphere-runtime:jar:3.0.3.slf4jvaadin2:compile
[INFO] | | | +- com.vaadin:flow-client:jar:24.3.5:compile
[INFO] | | | +- org.springframework:spring-websocket:jar:6.1.4:compile
[INFO] | | | +- org.hibernate.validator:hibernate-validator:jar:8.0.1.Final:compile
[INFO] | | | | \- jakarta.validation:jakarta.validation-api:jar:3.0.2:compile
[INFO] | | | \- org.reflections:reflections:jar:0.10.2:compile
[INFO] | | | \- org.javassist:javassist:jar:3.28.0-GA:compile
[INFO] | | \- com.vaadin:vaadin-core:jar:24.3.5:compile
[INFO] | | +- com.vaadin:vaadin-core-internal:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:flow-lit-template:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:flow-html-components:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:flow-data:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:flow-dnd:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-lumo-theme:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-material-theme:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-accordion-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-avatar-flow:jar:24.3.5:compile
[INFO] | | | | \- com.vaadin:vaadin-flow-components-base:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-button-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-checkbox-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-combo-box-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-confirm-dialog-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-custom-field-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-date-picker-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-date-time-picker-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-details-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-time-picker-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-select-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-side-nav-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-dialog-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-form-layout-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-field-highlighter-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-grid-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-icons-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-virtual-list-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-list-box-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-login-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-messages-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-ordered-layout-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-progress-bar-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-radio-button-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-renderer-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-split-layout-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-tabs-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-text-field-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-upload-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-notification-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-app-layout-flow:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:vaadin-context-menu-flow:jar:24.3.5:compile
[INFO] | | | \- com.vaadin:vaadin-menu-bar-flow:jar:24.3.5:compile
[INFO] | | \- com.vaadin:vaadin-dev:jar:24.3.5:compile
[INFO] | | +- com.vaadin:vaadin-dev-server:jar:24.3.5:compile
[INFO] | | | +- com.vaadin:license-checker:jar:1.12.7:compile
[INFO] | | | | +- com.github.oshi:oshi-core:jar:6.4.10:compile
[INFO] | | | | | +- net.java.dev.jna:jna:jar:5.14.0:compile
[INFO] | | | | | \- net.java.dev.jna:jna-platform:jar:5.14.0:compile
[INFO] | | | | +- com.nimbusds:nimbus-jose-jwt:jar:9.31:compile
[INFO] | | | | \- org.lucee:jcip-annotations:jar:1.0.0:compile
[INFO] | | | +- com.vaadin:open:jar:8.5.0:compile
[INFO] | | | +- com.github.javaparser:javaparser-core:jar:3.25.6:compile
[INFO] | | | \- io.methvin:directory-watcher:jar:0.18.0:compile
[INFO] | | \- com.vaadin:vaadin-dev-bundle:jar:24.3.5:compile
[INFO] | +- com.h2database:h2:jar:2.2.224:runtime
[INFO] | \- org.projectlombok:lombok:jar:1.18.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:3.2.3:compile
[INFO] | +- org.springframework:spring-aop:jar:6.1.4:compile
[INFO] | \- org.springframework.security:spring-security-config:jar:6.2.2:compile
[INFO] +- org.springframework.data:spring-data-envers:jar:3.2.3:compile
[INFO] | +- org.hibernate.orm:hibernate-envers:jar:6.4.4.Final:compile
[INFO] | \- org.slf4j:slf4j-api:jar:2.0.12:compile
[INFO] +- org.springframework.security:spring-security-test:jar:6.2.2:test
[INFO] | \- org.springframework.security:spring-security-core:jar:6.2.2:compile
[INFO] | \- org.springframework.security:spring-security-crypto:jar:6.2.2:compile
[INFO] +- org.apache.tomcat:tomcat-dbcp:jar:10.1.11:compile
[INFO] | \- org.apache.tomcat:tomcat-juli:jar:10.1.11:compile
[INFO] +- com.microsoft.sqlserver:mssql-jdbc:jar:12.4.2.jre11:runtime
[INFO] +- net.sf.jasperreports:jasperreports:jar:6.20.5:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- commons-digester:commons-digester:jar:2.1:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- org.apache.commons:commons-collections4:jar:4.2:compile
[INFO] | +- org.jfree:jcommon:jar:1.0.23:compile
[INFO] | +- org.jfree:jfreechart:jar:1.0.19:compile
[INFO] | +- org.eclipse.jdt:ecj:jar:3.21.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.15.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.15.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.15.4:compile
[INFO] | \- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.15.4:compile
[INFO] | +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] | \- com.fasterxml.woodstox:woodstox-core:jar:6.5.1:compile
[INFO] \- com.github.librepdf:openpdf:jar:1.3.30:compile
[INFO] \- com.google.code.findbugs:jsr305:jar:3.0.2:compile