ClassNotFoundException for JAXB ContextFactory on Java 9+

Description

Affects CLI 4.5.0-rc-3

zanata-cli pull -e

Response
[ERROR] Execution failed:
javax.xml.bind.JAXBException

  • with linked exception:
    [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:241)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:477)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:656)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:599)
    at org.zanata.client.commands.OptionsUtil.readProjectConfigFile(OptionsUtil.java:157)
    at org.zanata.client.commands.OptionsUtil.applyProjectConfigToProjectOptions(OptionsUtil.java:87)
    at org.zanata.client.commands.OptionsUtil.applyConfigFiles(OptionsUtil.java:55)
    at org.zanata.client.commands.ArgsUtil.runCommand(ArgsUtil.java:42)
    at org.zanata.client.ZanataClient.processArgs(ZanataClient.java:182)
    at org.zanata.client.ZanataClient.main(ZanataClient.java:103)
    Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:594)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:239)
    ... 9 more
    ```

Environment

Java 9.0.1
Windows 10 Home 1803

Assignee

Sean Flanigan

Reporter

Jia Rong Yee

Labels

Tested Version/s

None

Components

Sprint

None

Fix versions

Priority

High
Configure