We are migrating to openjdk 11 from jdk 8. Some of our projects that uses soap to call third party apis are failing with error:
java.lang.NoClassDefFoundError: j
Include jaxws-api
in your dependencies:
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
The javax
APIs were transitioned to Jakarta
, so in 2020 the proper dependency is the following:
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>2.3.3</version>
</dependency>
Here's an article summarizing what happened: Java Magazine - Transition from Java EE to Jakarta EE
And here's a very useful table with mappings between the old artifacts and the new one.