Skip to content

ClassNotFoundException: javax.xml.bind.* #8

Description

The java.xml.bind package is deprecated in Java 9 and not included in the default classpath. Code which tries to use classes under java.xml.bind.* will throw ClassNotFoundException. For example, from clavatar:

java.lang.ClassNotFoundException: javax.xml.bind.annotation.adapters.HexBinaryAdapter

The fix, as described in How to upgrade your Clojure projects to use Java 9, is to add the JVM option --add-modules "java.xml.bind". In a Leiningen project.clj file, this is:

:jvm-opts ["--add-modules" "java.xml.bind"]

Libraries affected by this:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions