Main Tutorials

jakarta.activation.DataSource was not found

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

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
2 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
ngong
1 year ago

Does not work for me. Added the dependency but the error remains.

Divakar
1 year ago

Hi Sir, I want to use javax.ws.rs instead jakarta, but I try i using this I get the above warning. what’s the way to use javax.ws.rs beacuse it is also compatible with swagger.

<dependency>
    <groupId>javax.ws.rs</groupId>
    <artifactId>javax.ws.rs-api</artifactId>
    <version>2.1.1</version>
</dependency>