1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[JBoss] Error with Weld when I deploy a Spring app in wildfly

Discussão em 'StackOverflow' iniciado por Stack, Agosto 12, 2021.

  1. Stack

    Stack Membro Participativo

    I have a problem trying to deploy a Spring app in wildfly. the error is apparently related to Weld but I'm not sure why it uses Weld and not spring dependency injection.

    this is the error that the console shows:

    ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "name.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"name.war\".component.\"javax.servlet.http.HttpServlet$NoBodyAsyncContextListener\".WeldInstantiator" => "Failed to start service
    Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class javax.servlet.http.HttpServlet$NoBodyAsyncContextListener
    Caused by: java.lang.IncompatibleClassChangeError: javax.servlet.http.HttpServlet and javax.servlet.http.HttpServlet$NoBodyAsyncContextListener disagree on InnerClasses attribute"}}


    as general information:

    • The project is a Spring application "but not spring boot".
    • Project is using Wildfly 24 and the Spring version is 5.3.8.
    • the app works perfectly in tomcat.

    I have disabled Weld from the profiles, in the wildfly standalone.xml file but after I disable it the server cannot start. finally, I have seen forums but I have not found any information that can help me. so any information will be highly valued.

    Here are the dependencies from my pom.

    <dependencies>
    <dependency>
    <groupId>commons-fileupload</groupId>
    <artifactId>commons-fileupload</artifactId>
    <version>1.4</version>
    </dependency>

    <dependency>
    <groupId>org.apache.myfaces.core</groupId>
    <artifactId>myfaces-api</artifactId>
    <version>${myfaces.version}</version>
    </dependency>

    <dependency>
    <groupId>org.apache.myfaces.core</groupId>
    <artifactId>myfaces-impl</artifactId>
    <version>${myfaces.version}</version>
    </dependency>

    <dependency>
    <groupId>javax.enterprise</groupId>
    <artifactId>cdi-api</artifactId>
    <version>2.0</version>
    <scope>provided</scope>
    </dependency>

    <dependency>
    <groupId>org.apache.taglibs</groupId>
    <artifactId>taglibs-standard-spec</artifactId>
    <version>1.2.5</version>
    </dependency>

    <dependency>
    <groupId>javax.activation</groupId>
    <artifactId>activation</artifactId>
    <version>1.1.1</version>
    <scope>provided</scope>
    </dependency>

    <dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>${primefaces.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <version>${spring-boot.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
    <version>${spring-boot.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>${spring.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-orm</artifactId>
    <version>${spring.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>${spring.version}</version>
    </dependency>

    <dependency>
    <groupId>org.reactivestreams</groupId>
    <artifactId>reactive-streams</artifactId>
    <version>1.0.3</version>
    </dependency>

    </dependencies>

    Continue reading...

Compartilhe esta Página