question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jakarta.activation version conflict in 2.13

See original GitHub issue

I’ve tried to upgrade to 2.13 branch just recently to get rid of old jaxb namespaces (https://github.com/FasterXML/jackson-modules-base/pull/116). However after I’ve tried to build my app with jlink I’ve got this:

Error: Two versions of module jakarta.activation found in ..\target\modules (jakarta.activation-api-1.2.1.jar and jakarta.activation-2.0.1.jar)

I’m using new Jakarta XML Bind module, here is dependency tree fragment:

[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.0:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.0:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.13.0:compile
[INFO] |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-properties:jar:2.13.0:compile
[INFO] |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.13.0:compile
[INFO] |  |  +- org.codehaus.woodstox:stax2-api:jar:4.2.1:compile
[INFO] |  |  \- com.fasterxml.woodstox:woodstox-core:jar:6.2.6:compile
[INFO] |  +- com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:jar:2.13.0:compile
[INFO] |  |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:3.0.1:compile
[INFO] |  |  |  \- com.sun.activation:jakarta.activation:jar:2.0.1:compile
[INFO] |  |  \- jakarta.activation:jakarta.activation-api:jar:1.2.1:compile
[INFO] |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.13.0:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.28:compile

So, jakarta.activation-api:jar:1.2.1 (Jackson dependency) conflicts with jakarta.activation:jar:2.0.1 (Jakarta XML Bind transitive dependency), because they’re both using same module name.

To fix this you probably should either exclude jakarta.activation-api from module dependencies or switch to the 4.x branch that doesn’t depend on old activation API. Links to compare:

3.x 4.x

A simple workaround is to include Bind API 4.x branch as a direct dependency, it’s on RC stage.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
cowtowncodercommented, Mar 8, 2022

@flozano No problem: actually we have separate module for new “jakarta” annotations; old “JAXB annotations” will not be upgraded and will retain old dependency. This because like you say it is a major incompatibility, fork point.

So the idea is that only new jakarta-xmlbind will move to use Jakarta dependency. This was added in 2.13.

0reactions
cowtowncodercommented, Mar 8, 2022

This was released in 2.13.2, out now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java modularization. Error: Two versions of module jakarta ...
Java modularization. Error: Two versions of module jakarta.activation found(jakarta.activation-api-1.2.2.jar and jakarta.activation-1.2.2.jar).
Read more >
Dependency Versions - Spring
Group ID Artifact ID Version ch.qos.logback logback‑access 1.4.5 ch.qos.logback logback‑classic 1.4.5 ch.qos.logback logback‑core 1.4.5
Read more >
Jakarta EE Platform
As of Jakarta EE 9, the Jakarta Activation Framework is now part of the Jakarta ... may conflict with the current or future...
Read more >
Change log : jakarta-jmeter package : Ubuntu - Launchpad
jakarta-jmeter (2.13-3) unstable; urgency=medium * Team upload. * Add build-dep on libcommons-codec-java (Closes: #868910) * Bump Standards-Version to 4.0.0 ...
Read more >
com.palantir.conjure.java.runtime : conjure-java-legacy-clients : 7.31 ...
<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found