Java 8 to 11 Upgrade: org.glassfish.jersey.server.wadl.WadlFeature configure WARNING: JAX-B API not found . WADL feature is disabled

Viewed 1165

I am getting the below error while trying to upgrade a java project from 8 to 11.

org.glassfish.jersey.server.wadl.WadlFeature configure
WARNING: JAX-B API not found . WADL feature is disabled.

Tried adding the below dependencies as per the suggestions in the community,

<dependency>
   <groupId>javax.xml.bind</groupId>
   <artifactId>jaxb-api</artifactId>
   <version>2.3.1</version>
</dependency>

<dependency>
   <groupId>org.glassfish.jaxb</groupId>
   <artifactId>jaxb-runtime</artifactId>
   <version>2.3.3</version>
</dependency>

But the warning is still unresolved. Am I missing any additional dependencies? Can you please help me with it?

2 Answers

As you can see in its maven dependency information, the jaxb-runtime library requires javax.activation which became jakarta.activation after JEE rebranding.

Please, try including the following dependency in your pom.xml, I think it can be of help:

<dependency>
    <groupId>jakarta.activation</groupId>
    <artifactId>jakarta.activation-api</artifactId>
    <version>2.0.1</version>
</dependency>

you can disable wadl feature if you don't use it. by adding init param of org.glassfish.jersey.servlet.ServletContainer as following in your web.xml

        <init-param>
            <param-name>jersey.config.server.wadl.disableWadl</param-name>
            <param-value>true</param-value>
        </init-param>
Related