JDK 11: java.lang.NoClassDefFoundError: javax/xml/ws/handler/soap/SOAPHandler

前端 未结 2 815
自闭症患者
自闭症患者 2021-02-12 15:58

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         


        
相关标签:
2条回答
  • 2021-02-12 16:22

    Include jaxws-api in your dependencies:

    <dependency>
        <groupId>javax.xml.ws</groupId>
        <artifactId>jaxws-api</artifactId>
        <version>2.3.1</version>
    </dependency>
    
    0 讨论(0)
  • 2021-02-12 16:22

    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.

    0 讨论(0)
提交回复
热议问题