java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

前端 未结 3 664
名媛妹妹
名媛妹妹 2021-02-07 07:56

After installing JDK9, I get this exception when running my Scala projects. Upgrading Scala to 2.12.2 also didn\'t resolve my problem.

3条回答
  •  心在旅途
    2021-02-07 08:51

    The java.xml.bind module is not resolved by default when running code on the module path. This means that if you depend on JAXB then you need to run with --add-modules java.xml.bind or else deploy JAXB on the class path (or module path).

    Update: The "Modules Shared with Java EE Not Resolved by Default" section of JDK 9 Migration Guide provides more information on this topic.

提交回复
热议问题