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] Why does JBoss 7.4 choose a jar from jboss iso a jar in WEB-INF/lib of the application?

Discussão em 'StackOverflow' iniciado por Stack, Setembro 17, 2025.

  1. Stack

    Stack Membro Participativo

    In the pom of a project which uses jaxb there is the dependency,

    <dependency>
    <groupId>jakarta.xml.bind</groupId>
    <artifactId>jakarta.xml.bind-api</artifactId>
    <version>2.3.3</version>
    </dependency>


    When you build the application the corresponding jar is in WEB-INF/lib.

    In the code I ask which jar JAXBContext is in;

    URL location = JAXBContext.class.getProtectionDomain().getCodeSource().getLocation();

    It says that it is not the jar in WEB-INF/lib, but the jar in jboss,

    jboss-eap-7.4_upgrade/modules/system/layers/base/javax/xml/bind/api/main/jboss-jaxb-api_2.3_spec-2.0.1.Final-redhat-00001.jar!/


    I expected that it would have been the jar in WEB-INF/lib. Which rule JBoss uses to choose the jar?

    Continue reading...

Compartilhe esta Página