DEV Community

Ștefan Vîlce
Ștefan Vîlce

Posted on

1

Java error: import javax.xml.bind.JAXB

I work at one project which is developed on Java 8 (i.e. Java 1.8). I cloned the repo on my computer, I have installed the dependencies and I got this error:

Image description

The import javax.xml.bind.JAXBException cannot be resolved

Since Java 11 this library is not contained anymore in Java. I'm running Java 14. So, I don't have it. To fix this I had to add this dependency in pom.xml

<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>
Enter fullscreen mode Exit fullscreen mode

And that has fixed the project.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay