Using Jersey 3x + Jetty to develop endpoints, but hits the jakarta.activation.DataSource warning during application startup?

Terminal

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
May 27, 2021 10:09:48 AM org.glassfish.jersey.message.internal.MessagingBinders$EnabledProvidersBinder bindToBinder

WARNING: A class jakarta.activation.DataSource for a default provider MessageBodyWriter<jakarta.activation.DataSource> was not found.
The provider is not available.

May 27, 2021 10:09:48 AM org.glassfish.jersey.server.wadl.WadlFeature configure
WARNING: JAX-B API not found . WADL feature is disabled.
Application started.
Stop the application using CTRL+C  

Solution

We can fix the warning by including the jakarta.activation-api dependency.

pom.xml

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

References

Leave a Reply

Your email address will not be published. Required fields are marked *